I’m not a newbie to programming or java but when it comes to java game programming I am truely a new born. I’ve made games in Direct3D, OpenGL, Windows GDI, blah blah blah and I’ve worked as a java programmer for about 5 years now on enterprise level apps. Ok so I got some of the basics down.
In java apps I’ve coded they were all buisness apps so there were never any issues with screen refreshes ect. But now I want to expand my knowledge a bit and experiment with some AI stuff.
I was wanting to make a simple applet/application like the Zombie Infection Simluator. The graphics would essentially be one pixel, each color representing people, zombies, werewolves, whatever. The ZIS is writting in something called Processing which is a simplified language that gets translated to java and then ran. I’m not quite sure what it uses but its bascially there to hide the java from the programmer. But since I don’t fear most of Java I figured it would be good enough to just try and figure it out on my own.
So heres what I was thinking about:
Graphics wise it would be very simple, either a pixel or a small sprite. The various Zombie Infection Simulators essentially just set pixels to the correct color and thats about it. The thought of setting individual pixels kind makes my skin crawl… but it seems to work well, some of the simulators have more than 10000 entities on the screen. Would blitting 10000 actually be as fast?
I would like to support at least 1000 enties in the game to make things interesting.
My dev system is a TBird 900mhz with a Geforce 2 MX in it.
Rendering needs to be a simple as possible since I really mainly want to play around with the AI, maybe some flocking behavior stuff, possibly genetic algorithms to breed smarter people to avoid zombies, ect. I wouldn’t mind some intereting stuff like particle effects but I think that would only be feasible with an accelerated graphics.
I want this to mainly run in an applet, but with the option of running as an application.
Naturally I’d like it to be as fast as possible but I also thought it would be interesting to see if I could control the CPU usage (so that it doesn’t just peg the CPU out to 100%). I’m not quite sure how to do this in java… maybe a System option or possible just making the thread sleep for longer periods of time… not sure.
So given all of this, especially the applet requirement, would it be good to use straight Java2D, or perhaps something like GAGE? I checked out LWJGL but it can’t run as an applet.