Forum Overview
::
Game Development
::
Re: NICE
[quote name="Mysterio"][quote name="Ice Cream Jonsey"]At this point in my life, the "rush" is coming from getting an engine going. I'm a little mentally drained on Cyberganked because, having created an RPG engine in a text adventure language, I want to do it in a proper language like Java. But I don't know how to get tiles up on the screen in Java. Maybe people use Swing for that. It seems like it shouldn't be too hard. I dunno.[/quote] Swing/AWT gives you a "canvas" to draw on and a window to put it in, but you need something more to actually do the drawing. "Java 2D" is the standard Java API for drawin stuff. It works and is powerful enough to do probably more than enough for your purposes. But it would probably be much slower than something like OpenGL. This may or may not matter to you. If you wanted to gain skills that you could use with many other languages/platforms, and also make your program easier to port, and just generally be cooler and less like TDARCOS, then you would maybe use OpenGL. Java isn't an ideal language to work with OpenGL in but it's good enough. You'd need an OpenGL library to make it work, beyond just the standard Java libraries. JOGL and LWJGL are well-known ones and either would probably work fine for you. These days, OpenGL is strongly focused around shaders, which are little programs for your graphics card that you also have to write. You would write them in the language GLSL, not in Java. GLSL is somewhat like C and shouldn't be terribly hard to deal with. To make a 2D grid of tiles or whatever would take a pretty simple set of shaders. In either case, Swing/AWT gives you a way to accept keyboard/mouse input from your drawing window, and to put buttons and textboxes and crap alongside it if you want to. Maybe SDL is also a thing worth considering? http://www.libsdl.org/ I don't know I never used it but it's popular? And apparently some recent indie games use it <a href="http://en.wikipedia.org/wiki/List_of_games_using_SDL">http://en.wikipedia.org/wiki/List_of_games_using_SDL</a> but maybe it wouldn't offer a lot in Java, which already gives you a cross-platform standard library that does some of the same stuff[/quote]