Personally I am an IntelliJ fanboy.
https://www.jetbrains.com/idea/download/
A lot comes down to personal preference and you will find people will use what they are familiar with.
I use to use Netbeans, could never get into using Eclipse. I think at that point in my life was more concerned with getting stuff shipped than having to learn a new tool.
I made the jump the IntelliJ after several serious recommendations over many beers. Bit the bullet and never looked back.
With libGDX, if you use the setup tool, it will be a Gradle based project, so really IDE dependent (win!) so what every IDE you use, be wary of ones that want to hijack certain points i.e. running the desktop app as IntelliJ likes to think it is a plain java project and it won't trigger a build of the dependencies unless you configure the run task. However if you use the Gradle route in the IDE all is groovy (or java ;) )
>What exactly is LibGDX?
A good start would be a visit to the libgdx website. http://libgdx.badlogicgames.com/ The landing page should answer this question.
>How would it help me in developing a game?
A mind-blowing amount of work is already done for you. http://libgdx.badlogicgames.com/features.html
>Are there alternatives that are more suitable for beginners?
If you are familiar with Java, libgdx is easy to pickup!
Yes, you can run it without gradle. You need to add the relevant jar-files. Download the latest nightly build and add the corresponding jar-files to your project: http://libgdx.badlogicgames.com/nightlies/
I think those 4 should do the trick.
Not sure I understand you question. If you create a new music, set it to looping and play it you don't have to worry about any audio backend stuff. Example:
song = Gdx.audio.newMusic(...); song.setLooping(true); song.play();
Edit: As for having a intro to the loop just play a different Music variable and give it an onCompleteListener.
PS: Use OGG, MP3 isn't suited for looping.
The daemon is used to speed up builds. While not perfect, it allows for gradle to watch for changes in stead of scanning everything. Then when you run the build command, it knows everything is up to date.
./gradlew --daemon # Start the daemon ./gradlew --stop # Stops the daemon
http://www.gradle.org/docs/current/userguide/gradle_daemon.html
Hi and sorry for my english
Check the docs for the Pixmap class
Basically, create a pixmap of the desired size then update the pixmap using drawPixel(int x, int y) method using the x and y coordinates from the touch and finally render the pixmap to the screen.
Good luck!
You should pre-process your spritesheet to remove background. If there's too many images for manual processing, you should automate the process using ImageMagick or similar tool.
First reason is that doing it in game will increase start-up time and waste battery (if on mobile device). The second reason is that if image is not pure pixel art (if it uses anti-aliasing on edges), the results will have ugly whitish edge which can only be removed in good image editor. The third reason is if your spreadsheet uses white as normal color (not only as background color), removing the background will require human judgement.
If for some reason you still want to do it in game, you have two options. You can write your own shader that will skip over white pixels, or you can modify your bitmaps before you convert them to textures.
Basically you load image from disk into Pixmap object, then use getPixel and drawPixel methods to control value of each pixel.
Check it out here:
Play Store: https://play.google.com/store/apps/details?id=com.tory.island
App Store: https://itunes.apple.com/us/app/island-survival-pixel-paradise/id1217411327
I'd be happy to answer any questions about the game or its development. Feedback is welcome, and much appreciated!
No offence, but there's enough wrong with your code that shows a lack of understanding of how libgdx works. For instance, you shouldn't be generating and disposing fonts every render call. I recommend you read through a couple of books on libgdx which you can do at safari books with a free trial, and follow the structure of the superjumper demo game more closely.
This question seems unrelated to libgdx, but you can use a GWT RPC to connect the GWT app to a server app. On the server you can access the mySQL server directly via JDBC then.
If you want it to be cross-platform without any risk I'd use their REST-API and use the built in LibGDX networking API. Your other option is use one of the Java API implementations but there's no guarantee that it'll work across all platform if you use this code in your core. The third option is to use platform specific code (via callbacks) and implement the most fitting API per platform, this however is the most amount of work.
If I were you I'd go with the REST approach.
The featurelist on their webpage is a good place to start: http://libgdx.badlogicgames.com/features.html
The engine can do pretty much anything you need it to, I think part of your problem may be not knowing where to look for documentation on features.
API docs are essential for this kind of stuff: http://libgdx.badlogicgames.com/nightlies/docs/api/
Probably the most straight forward, at least for basic text. Create a BitmatFont object, and between your SpriteBatch .begin and .end calls draw on the BitmapFont object
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/BitmapFont.html
I have only used it in 2d and "3d" tilemap + sprite games, but the framework is built on the Lightweight Java Game Library, which is mostly a wrapper for OpenGL. Check the docs to see if there are enough of the 3d tools builtin for what you need.
I created and published a very simple game created with libGDX that uses the Box2D library, and released it earlier this year in March. Available for both iOS and Android. Performance is great on my end, and I have an old crusty iPhone 5s. Filesize is ~70megs.
Ignore what /u/Flarfanex is saying about libGDX being dead. I mean sure, it's no Unity, but the community is still pretty active, and help is always around the corner especially if you hang out on the #libgdx IRC channel on freenode. The documentation on the libGDX github is pretty thorough as well too!
In the end libGDX is just a tool and what you make with it depends on you. For me, it was the first "game framework" I learned mostly because I came to it with a bit of Java knowledge. I enjoyed learning it a lot because there was no GUI and I was able to truly understand (mostly) what was happening behind the scenes.
This is from an android drawing app:
https://play.google.com/store/apps/details?id=hu.magyar.pixenator.android&hl=en
I'm not sure how it runs on later androids, i last updated it 3 years ago.
More of a tech demo than anything else; fully multi threaded drawing, fully custom UI code.
I highly recommend switching to android studio, there is no difference if you are developing for desktop as well, all libgdx projects follow the same structure so it should work the same. The only difference for me when switching from eclipse to AS was I had to create my own desktop launcher but it was as simple as selecting 3 dropdown list options. Here is how you do that if you need it - http://words.strivinglife.com/post/Configuring-a-libGDX-project-to-run-as-a-desktop-application-in-Android-Studio/
It's almost 11pm where I live and I am pretty drunk so I will send you the project tomorrow when I am in a more sober state of mind haha. I will more than likely just send you this game - https://play.google.com/store/apps/details?id=com.dogshackstudio.shadowmaze&hl=en_GB, its a simple game using box2d and box2d lights but it has all the code needed for GPS and also for in app purchases as well so it should help you on your way to using them.
My app Sputter (Google Play) is developed with LibGdx as an UI. It is mainly custom Widgets. After getting into it I think that Scene2D.UI is quite good and easy to work with. Have considered other options, but always come back. It is simple yet sufficient and flexible. Only thing which is limited compared to other UI libraries is text handling.
Sputter is currently $3.50 or so, but if you PM me I can give you a free coupon code. It is not open source, though (although the audio engine is), but I can provide you with details and examples if you wish.
For centering you need to get the width of the text. For that you can use GlyphLayout.
Then you add that to the width calculation.
layout.setText(menuFont, "Play"); menuFont.draw(batch, "Play", Gdx.graphics.getWidth() / 2 - (layout.width / 2), Gdx.graphics.getHeight() - 300);
Hey!
Firstly are you using the Project Setup tool? And are you hooking up everything with Gradle?
If not, I suggest you download -http://libgdx.badlogicgames.com/download.html - the setup and then use the wiki to build and run the HTML5/Javascript component - https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline
This will hopefully restore some faith in the HTML export.
Next I would gradually implement the parts, say the inputprocessor, into this test setup. So this is more of a debugging exercise. Finally I usually find I get an undefined error when I am trying to access an asset through the AssetManager class which hasn't been loaded.
I am more and happy to take a look at your code, if you wish to share?
Cheers.
If you slice it up into the tiles, and append each tile filename with _# so something like tileMap_00.png..tileMap_99.png it will index them in the atlas. That combined with using the AtlasTmxMapLoader should let you use the atlas. You will need to add a property at the map level with the key being 'atlas' and the value being the location of the atlas to use relative to the path of the tmx.
You got it. There is also a debug renderer that lets you see the bodies. This can be very helpful, because the one confusing part about Box2d is that their world is going to be on a different scale from your game world. You will need to convert between the two different scales, and a lot of times to get this right it really helps to be able to see where your bodies are being drawn. If you're not converting right, then you'll notice all of your bodies are tiny and drawn in the lower left hand of the screen, instead of overlapping with the world the way they should be. The conversion is explained here, if you get lost.
Assuming you mean BitmapFont and not some other kind.
Not in the same way you'd think; Bitmaps don't know how to do that. You can change the scale, though, with the setScale methods detailed in that link. It will distort or pixelate heavily. If you want it to look clean, you'll need to make separate assets of each size you want (the default font is only 15pt, for instance).
Right now!
If you mean where can you get fonts, you'll find the format you're looking for on the linked documentation, and your favorite search engine can help you out from there.
Don't forget about the wiki and its list of tools in case you want to make your own.
I work alongside my brother who takes care of all the artwork. However there are sites out there where people sell asset packs and sometimes offer them freely. Have a browse on http://opengameart.org/ or https://www.assetstore.unity3d.com/en/ for example.
Is there any reason why you didn't just use RPG Maker - http://www.rpgmakerweb.com/ ?
If you haven't found Tiled yet ( http://www.mapeditor.org/ ) it will make your maps a lot easier and it has support built into libGDX. There is a really good tutorial for it on Games From Scratch.
The number of people who use libGDX for 3D work is relatively small. Even the 2D documentation could do with some work here and there. You may wish to use the gdx-gltf demo as a starting point, but it won't be easy. A precompiled version is available on the Google Play Store.
Dev here. This is my first app for iOS and Android, created with love with libGDX.
The app isn't really a game and is more of a Random Dog Generator. In the app, simply tap to kiss the dog to create a whole new dog! If you like the dog you generated, zoom in closer and take a photo of the pup. At the moment there are technically 10^17 possibilities, not including colour variations... whoa!
Animation was handled using Spine by Esoteric Software, and I have to say it's a lovely tool to work with.
Besides that I have a few promo codes I'd be glad to give away. 5 for iOS and 5 for Android. First come first serve. Just send me a PM.
Besides that I'd be happy to answer any questions about the process.
edit: and durp, here are the appstore links if you're curious. iOS and Android.
My game is rather old, used to be pure java/android sdk/raw GL ES 1.0 calls, then moved to libGDX, recently translated to Kotlin. Originally released it half-backed in 2012, then improved many-many-many times. Spent zero $ on promotion. Good download drivers are alternative app stores/app directories like slideme & appbrain, forums like xda & 4pda
SOLVED!
Gdx.app.getApplicationListener() doesn't seem to work. I had to replace that by passing my application along as an argument.
And some lazy initialisation of a texture did not work either. Weird.
Anyway, this is the result, enjoy:
http://users.telenet.be/geek/connectdiscs/
Read the description: https://play.google.com/store/apps/details?id=be.geek.connectballs.android
Pause the game with 'p'.
I <3 the superdev mode. That made debugging this a whole lot easier!
Hi, sorry about that. Wasn't thinking. Link.
If you could I'd love some criticism and reviews. I always like hearing back about what people like/dislike.
Spent the better half of last year working on it and wanted to share it with the LibGDX community since you guys helped so much answering all my questions. It’s a fast paced platformer similar to Geometry Dash, you hop through short and long levels using an intuitive dragging down motion to load your jump, would love some constructive feedback!
Download links for android and ios here:
https://play.google.com/store/apps/details?id=ca.dangerbros.blobjump
https://apps.apple.com/us/app/blob-jump-hop-through-levels/id1609784740
I was thinking of starting a shared folder on google drive. Does anybody want to do this?
As for Trello, here's the invite: https://trello.com/invite/b/wxV4WpRV/c26808a78a6797ca8b4ab246f7b7ada6/terraria-like-game
Let's come up with a name for the game.
I've had similar problems with collision in projects before. What I recommend is adding an extra condition to your collision code (to make sure it's not running the collision code multiple times and reversing direction when it shouldn't be). I'll write it out a bit in pseudocode to help give you an indication of what I'm talking about
Authenticate Using Google Sign-In on Android, just use the firebaseAuthWithGoogle() method instead of firebaseAuthWithPlayGames(). When I played with the code, that method worked too.
libGDX is in "maintenance mode" at this point, which means no new features are being developed. That's polite developer speak for, "This tool is old now. If you are starting a new project then use a new tool that's actively developed like Godot instead."
Ah, right, I forgot that Sprite doesn't inherit from WidgetGroup. WidgetGroup basically comprises all the Actors that have a table-like arrangement system.
You can call layout() on a table-like Actor to force all the child Actors to position and size themselves according to all the current data. If you have any tables that involve your actors, it seems like it's generally a good idea to call layout() on their parent tables before you get precise sizing and positioning info.
I'm not sure how you would implement my method in your case. It would most likely require rewriting your rendering system just like I did when I realized I needed/wanted to have y-sorted entity rendering between Tiled map layers.
I haven't used anything called engine.draw(). I create an Ashley engine, add the systems, and do engine.update() in gameScreen.render() (implements Screen). My maps class isn't a system but just an object that gets passed into the systems that need it.
OrderedRenderSystem does use a Comparator:
public class YComparator implements Comparator<Entity> { private ComponentMapper<PosC> posM = ComponentMapper.getFor(PosC.class); private Float y1; private Float y2;
@Override public int compare (Entity e1, Entity e2) { y1 = posM.get(e1).y; y2 = posM.get(e2).y; return -y1.compareTo(y2); } }
Edit: wording
Not really. I haven't tried this but it seems that PolygonSpriteBatch can draw a PolygonRegion at a position. So you create the polygon regions which represents your shapes and then you draw them on the screen at the position you want. You can also do scaling and rotation using this method.
Hi! > How would I go about having the height of the change depending upon how long the jump button is held down (to a maximum value)?
You should count the time between the event keyDown and the event keyUp (http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/InputProcessor.html).
Once you have the time between this events, you have to modulate to a maximum and mínimum value.
if(MyInput.keyDown(MyInput.JUMPBUTTON) && contactListener.isPlayerOnGround()){ timePressed = 0f; //this var should inc by deltatime in each iteration, for example in act() }
if(MyInput.keyUp(MyInput.JUMPBUTTON) && contactListener.isPlayerOnGround()){
Vector2 v = modulateV(timePressed);
player.getBody().applyForceToCenter(v.x, v.y, true);
}
...
//MAX_MOD_VELOCITY and MIN_MOD_VELOCITY are the max and min values, respectively; MOD_DIFF_VELOCITY = MAX_MOD_VELOCITY - MIN_MOD_VELOCITY;
//this can be achieved in a lot of ways. In this example, both values, X and Y are involved. You maybe just want to use y.
private Vector2 modulateV(v){
float factor;
if (v > MAX_MOD_VELOCITY){
factor = (MAX_MOD_VELOCITY/v)/100f;
} else if (v < MIN_MOD_VELOCITY){
factor = (MIN_MOD_VELOCITY/v)/100f;
} else {
factor = ((MIN_MOD_VELOCITY + (v*MOD_DIFF_VELOCITY/MAX_MOD_VELOCITY))/v)/100f;
}
return new Vector2(vX*factor, vY*factor);
}
I hope this helps. Let me know if you had any trouble with this.
SelectBox does not have an align method, nor does any of the objects it extends. That was one of the first things I checked :( (the docs for reference: http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/SelectBox.html)
Circle is just data. It doesn't do anything on its own. What interaction do you want? If you want to detect collisions and write your own code for resolving collisions, use Intersector utility. If you want automatic interaction between objects, you'll have to learn box2d. It's more complicated to construct bodies in box2d, but the additional complexity is worth it.
You should check out the Pixmap class. It has a lot of functions for creating basic shapes and you can create a Texture that takes a Pixmap as a constructor argument.
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html
It looks like there's a setTransform function that you can set the angle. I'm not sure if that will rotate the shape though or just set the value. I'm basing it just off the documentation, http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/Body.html#Body(com.badlogic.gdx.physics.box2d.World, long).
https://play.google.com/store/apps/details?id=com.getimage
Hello to all developers Here is a game written with Libgdx library Can you comment on the improvements to be made so that the game is more fun, I am available to any critic don't hesitate even if it is unpleasant
thank you so much
Download on Google play: https://play.google.com/store/apps/details?id=com.ookigame.masterjuggler
​
I'm really impressed with the framework, feel super productive while developing this!
​
Any feedback is welcome :)
Made with libGDX and MagicaVoxel.
​
Available on Google Play: https://play.google.com/store/apps/details?id=com.aurhe.ap46
I trust your guys' judgement. If you're interested to give it a shot let me know if you have any major issues lol
Just played a bit, first: congrats! It's a cool idea
Some actual feedback:
- little inconsistency on graphics:
- tutorial at start need a bigger font
- tutorial boxes are not alwyas horizontally aligned
- on main game screen some cube spaces are overlapped with background, just look upper one
- ux/ui:
- what if as player I need to re-run tutorial? there is a way
- first screen is great, but what does mean little trophy ? not clear
- why prefer double tap to slide to move the cube ?
- okay for ads, not intrusive, but they refersh every bit.. some players can find it annoying
- random thoughts:
- online leaderboard / google achievement integration planned?
- music effect?
- maybe this game can be pivoted into a level game, or solve a specific scenario ?
From dev side of view, for my game , Number+, I need some proper animations, do you have some example code or which way you animate it, I like way you are able to pop up cube in the middle, contact me via dm, thanks!
Hi,
Thanks for the comment.
Great idea - hadn't considered blending.
Will add it into my to-do list but it may not happen. From my current apps on the Play Store, I would earn enough each month for 1 coffee (sometimes even a large one!), so putting more time into Rotatron at this point is unlikely.
I'm currently adding a Spanish option to my word game ( Word Bowl Soup ) and improving the leveling up schema and User Interface; so my spare time is going into this. Hopefully this will kick-start it again.
Got an idea for a fun little arcade-type game as well - could have potential. Stay tuned. :)
Take care - keep coding.
pretty cool that you guys are doing this! i was thinking of learning libgdx in order to make games. hopefully not too far in the future I'll be able to participate, currently I'm still learning regular android dev. a quick question since I'm commenting here... for a simple text based adventure rpg, kinda like King of the dragon pass, would libgdx be appropriate? That's the kind of game I want to make first.
If your physics are simple you don't need a library. You can do a few calculations and you are good to go.
I released this game: https://play.google.com/store/apps/details?id=com.laltin.nhits just yesterday. It has only ball to wall and ball to target(both circles) collisions and everything except ball is static. So physics calculations was very simple I didn't use any libraries and I wrote around 10 lines of code.
Even if you can't come up with collision math I am sure there are many people here or sites like StackOverflow you can find to help you.
Hi Reddit! Just released my physics-based "throw-the-bouncy-ball" game. 100 levels now available, revamped UI, monetization through ads (hope not too frequent and annoying), no IAP at the moment, no lives, no coins, etc.
https://play.google.com/store/apps/details?id=com.appdeko.physics
Game powered by libGDX + Kotlin + libKTX + Box2D and is only 4Mb. I'm solo dev and it's hard to test and measure level and UI complexity.
So your feedback is more than welcome, thank you!
Hi Reddit!
Please, help me to test my new physics game, where you throw a bouncing ball into a magic hat. It's kinda 2.5D - mixing box2d physics and 3D looks.
https://play.google.com/store/apps/details?id=com.appdeko.physics
So far I've created 50 different levels. On each level, you launch your ball into the hat, ricocheting ball off the walls, moving platforms, flying through narrow gaps, avoiding barriers and (sometimes moving) obstacles.
Touch and drag your finger within red-dotted area, control the trajectory and strength by pulling back with your finger and letting go. Last trajectory line remains to help you to make your next perfect shot.
Game is very lightweight, it is around 3.5 Mb, written in Kotlin + libGDX + libKTX + box2d. I'm solo dev, and Magic Hat is my first box2d game, so expect rough edges and glitches.
Your feeback is very welcome. Thank you.
I'm currently following the "Libgdx Cookbook" and am loving it. You might run into a few hiccups with IDE's, but it should be easy enough to google those.
Oops. Its wasn't in English? Im so sorry. Here is English link.
https://play.google.com/store/apps/details?id=com.sneakycrago.undercore&hl=en
Yes. This game is made in Libgdx. However I'm a newbie programmer ;P
I don't understand the question???
I redid all the artwork after practicing pixel skills for a while and have just barely gotten back into the code. I've fixed some collision issues but will be polishing a bit more in the coming weeks. I'm also working on the music and do want to rename the game.
An updated version with better graphics is on the play store and the app store.
Well, talking of THE favorite game is a bit difficult. I have no favorite game at all, every game I try has some things I really like. If there are many things I like, it is a good game.
But concerning libGDX, I am not very interesting in how good the game mechanics are but what is technically done.
To find some libGDX games, just browse through this sub. Some devs announce their new games here, for example Battle of the pucks
Another nice libGDX game I discovered via Twitter and searching for #libGDX was PaperWarz. @libGDXGames is a Twitter account announcing new libGDX-made games. Follow it.
And announce your game here when you are done. :-)
Yep, project was setup as per the wiki.
Great suggestion! I'll revert to an early version and gradually add stuff until it breaks. You'd think I'd have come up with that doing the same technique at work. ;)
I'm mulling over sharing the code on a definite basis.
In the meantime here's what I have released sofar:
https://play.google.com/store/apps/details?id=be.geek.connectballs.android