I am trying to make a 2D game but I don’t know what to use. Should I use libGDX?
Or something else?
Could someone give me a clean fresh example of a 2 d game with a map added?
I am trying to make a 2D game but I don’t know what to use. Should I use libGDX?
Or something else?
Could someone give me a clean fresh example of a 2 d game with a map added?
You’re asking someone to write the entire source of a game for you? :cranky:
Use libGDX if you want a high level 2D library with maximum compatibility, maybe opengl/lwjgl if you want something more low level. Follow a tutorial, even if you did manage to get the full source of a game you still wouldn’t understand it so it would be useless.
He’s asking for sample code, to show usage, which is reasonable enough. The advice remains the same though: use GDX. The source distribution for LibGDX comes with several examples.
Not sure how complicated your game will be, but I am working with OpenGL-accelerated canvases and images. I get pretty good frame rates. If I weren’t limiting it to 60fps, i could get close to 200 with a bunch of rotating/scaling images. Just don’t use bicubic interpolation. For some reason, that really kills framerate. You will need to create your own transformation stack. (Sorry if I am not using the right term, but I am fairly new to game development.) Best of all is that a bunch of libraries have support for Java canvases.