I wish that I had more time on my hands, as I'm working on a Java
framework for games that would be brilliant for something kind of
like this (though I don't have rendering exclusion working yet--
heck, it's not even roughed in! ^_^). The thing is, it's really not
ready for someone to USE yet, 'cause it doesn't even really handle
INPUT yet, nor does it do any audio. I've got a good idea HOW to get
audio in, I just haven't implemented and tested, due to school and
another (paying) project right now... >.<
I would also like to create a simple game to go alongside the
framework, so that everyone can kind of see how things should be
designed and interact with each other in the framework, 'cause it's a
little bit different from most things I've seen. It's entirely
object-oriented, and objects will send messages to each other, and
process messages and such, rather than telling the program what
they're doing, and the program has to babysit all of the entities --
they work things out on their own!
I know it won't be of much use to you right now, so sorry for the
semi-off-topic post, I just get excited every time I read about
someone doing their project in Java, 'cause I <3 Java... ^_^
--Scott
On 03 Sep, 2005, at 11:01 AM, Mike Gillissie wrote:
Nick Howes wrote,
Hi. Rendering onto buffers could give some speed benefit, for instance if you render the background first to a separate screen- sized (or slightly larger) buffer, it would speed up scrolling if you simply moved the buffer a few pixels and only redrew the tiles that the scroll reveals. This ought to be a bit quicker as a large blit is faster than doing many small blits each time so the more you can pre-render the better.
I'm beefing up on my buffers right now - I'm learning all of this fun stuff as I go along, so I think it takes me a bit longer than I was originally expecting... ;)
I really like the idea of the larger buffer, though - I've already got the thing rendering only the units that are within the current VisibleRect, which saves time too...
Who knows, I may even be stressing myself out too much - the only time I'll have to draw ALL units is if you were zoomed out all the way, in which case I should be replacing the images with simple colour splotches - you're not going to see any detail anyway, so I think something like an influence map could avoid the problem altogether... :)
Also, as I was testing, I gave myself the worst-case scenario, just filling a 20 x 20 section of the map with one unit per tile, which may not be a common occurance once the game is actually working... :)
It does seem like you have a lot of objects on screen so it could be that Java graphics isn't coping very well. In fact it might struggle even using SDL, so perhaps LWJGL or JOGL would be useful especially as you then get the hardware acceleration. I'd give the buffers a quick go first though, see if that gives much improvement.
I've been reading up on hardware accelaration, and it sounds like something I want to figure out, but I haven't gotten the knack for it yet - have to read about it more...
Thanks for the VERY quick feedback, Nick! :) -Mike
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html