[gameprogrammer] Re: Java Advice - 2D RTS Graphics
- From: Stephen <gp@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Sun, 23 Oct 2005 12:46:38 +0100
I've written an RTS using Java
(http://www.carlylesmith.karoo.net/simwar/) and I only used the standard
AWT/Swing stuff and never had any performance problems with the
graphics; I think it all comes down to how you implement it. Are you
using the BufferStrategy? I assume you're not re-drawing the whole
image each time, only whats changed since the last frame.
Having something like health bars above each unit shouldn't add much
extra overhead if you don't actually draw these in your "master image";
just paint them on each frame (and only for the units on screen, natch).
Hope that helps in some small way,
Stephen
--
Mike Gillissie wrote:
Hey folks, how's everyone doing, you're all looking lovely today. :)
I've been working on a Java game that's most closely related to an RTS
in presentation. Strictly 2D, with lots of units (I actually had
22,000 units on the screen at once while I was testing, although
that's definately overkill...).
This is the first game I've ever tried to create, and I'm not
"formally" trained in Java - picking up things as I go along. I've
been using SWING components for my display, with three JPanels - one
for the Mini Map, one for the orders interface, and the other
containing the main game screen.
In the game screen, I've been using a 2000x2000 pixel image as the
map. All of the units and special features (buildings, destruction,
etc) are drawn on top. As you can probably guess, my current method of
doing this is pretty intensive, and may be restricting me in what I'm
actually able to do.
Given the above considerations, should I be looking at using something
like the lwjgl or openGL or something like that? Or will my Graphics2D
calls work well enough with a bit of tweaking? I'd love to be able to
increase the resolution of the background map, since zooming in to see
the units in better detail makes the map look understandably
pixelated... I'd love to be able to redraw only certain portions of
the screen to reflect unit movement / attacks / whatever as it
happens, and even more, I'd love to be able to include health-bars on
the units without having to dread the thought of the performance hit...
That, plus I love to learn new things... ;)
What do you guys think? Is a jump to a real graphics toolkit the
answer I'm looking for?
And in case you're curious, I've got some screenshots of the current
interface here:
http://lordgank.proboards30.com/index.cgi?board=general&action=display&thread=1126661947
<http://lordgank.proboards30.com/index.cgi?board=general&action=display&thread=1126661947>
Please don't mind the graphics - the unit images are basically just
tile-based, and for testing purposes I'm using avatars from message
boards until I can design my own unit images...
Thanks for the read, guys! :)
-Mike
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- From: Mike Gillissie
- References:
- [gameprogrammer] Java Advice - 2D RTS Graphics
- From: Mike Gillissie
Other related posts:
- » [gameprogrammer] Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- » [gameprogrammer] Re: Java Advice - 2D RTS Graphics
I've been working on a Java game that's most closely related to an RTS in presentation. Strictly 2D, with lots of units (I actually had 22,000 units on the screen at once while I was testing, although that's definately overkill...).
This is the first game I've ever tried to create, and I'm not "formally" trained in Java - picking up things as I go along. I've been using SWING components for my display, with three JPanels - one for the Mini Map, one for the orders interface, and the other containing the main game screen.
In the game screen, I've been using a 2000x2000 pixel image as the map. All of the units and special features (buildings, destruction, etc) are drawn on top. As you can probably guess, my current method of doing this is pretty intensive, and may be restricting me in what I'm actually able to do.
Given the above considerations, should I be looking at using something like the lwjgl or openGL or something like that? Or will my Graphics2D calls work well enough with a bit of tweaking? I'd love to be able to increase the resolution of the background map, since zooming in to see the units in better detail makes the map look understandably pixelated... I'd love to be able to redraw only certain portions of the screen to reflect unit movement / attacks / whatever as it happens, and even more, I'd love to be able to include health-bars on the units without having to dread the thought of the performance hit...
That, plus I love to learn new things... ;)
What do you guys think? Is a jump to a real graphics toolkit the answer I'm looking for?
And in case you're curious, I've got some screenshots of the current interface here:
http://lordgank.proboards30.com/index.cgi?board=general&action=display&thread=1126661947 <http://lordgank.proboards30.com/index.cgi?board=general&action=display&thread=1126661947>
Please don't mind the graphics - the unit images are basically just tile-based, and for testing purposes I'm using avatars from message boards until I can design my own unit images...
Thanks for the read, guys! :)
-Mike
- [gameprogrammer] Re: Java Advice - 2D RTS Graphics
- From: Mike Gillissie
- [gameprogrammer] Java Advice - 2D RTS Graphics
- From: Mike Gillissie