[gameprogrammer] Java Approach - Real-time or Turn-based strategy games...

  • From: "Mike Gillissie" <Niyoto@xxxxxxxxxx>
  • To: <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Sat, 3 Sep 2005 12:39:13 -0400

Hi guys,

I've been working on a strategy game in Java, mostly using AWT. In this 
particular instance, I've got a large map image that I'm using as a static 
background - it's 2000x2000 pixels. The map is segmented into tiles, each being 
10 by 10, but the user has the ability to zoom in to see certain areas of the 
battle more clearly (as you zoom in, the images representing the individual 
units are scaled based on the scale of the map itself - from 1.0 zoom, for 
example, you can barely see the units at all - once you zoom to 8.0, you can 
see the images at 1.0 scale, if that makes sense).

My purpose behind this approach was an attempt to have a large number of units 
in a single battle - I'd like to have as many as 500, if I can pull it off... 
more if possible. ;)

So far it's going well, but as a test I've loaded about 200 or so units onto 
the screen, and the process of scrolling the map becomes painful with that many 
units being drawn. I was playing around with a few other ideas, mostly with 
off-screen buffering, and I think I'm missing something fundamental.

With the basic requirements being
  1) 200 by 200 tile map
  2) Ability to zoom in for better detail
  3) Large number of units on the map at the same time
am I biting off more than Java can chew?

I've been looking at examples from OpenGL and LWJGL, but I'm not sure if I'm 
just not getting something that would make my life easier... :)

Sorry for the long message, but if there are any tips for me on this, I'll sing 
your praises for days, or until somebody tells me to stop singing...

Have a good one guys!
-Mike

Other related posts: