Speeding up this handler
Shari
gypsyware at earthlink.net
Wed Apr 16 16:25:01 EDT 2003
>On a different note, does your game require scrolling? I'd be interested to
>know how your app performs when scrolling 99 objects. I remember doing
>game/scrolling experiments years ago in SuperCard, and trying to move groups
>of image objects around inside a smaller window. It worked, but the
>performance was nowhere near acceptable commercial game quality. I wound up
>creating a "jump" treatment for the background: when a character moves from
>one screen to another, the background instantly updates with a new image, as
>opposed to continually scrolling the background to match the character's
>position.
>
>Regards,
>
>Scott Rossi
Scott,
Actually, I am following the standard that was set in Realmz and the
Exile series of adventure games. Where the "man" is the center of
the map, and doesn't move. As he "moves", the map changes to reflect
where ever he is. I wanted to avoid moving the man, and just
changing the map when he moved to the edge into a new section.
The current 65 millisecond handler changes the map around the man as
fast as I can move him, which was the goal. It is visually
instantaneous.
At one time, I had thought to have a very large stack (the size of
the one I use to create the world, which fills my 21" screen). And
resize the stack to something small, with the rest of that section of
the world hidden. And I would have used scroll to move the man
around. This was my original plan. Though I've not attempted it. I
thought to save memory, it would be best if the actual play screen
map were much smaller. The small game window stack will have about
500 objects once it is done. If I'd tried to have a big stack where
most of it was hidden and use scroll, the game window stack would
have about 5000 objects. (In order to layer your objects, so that
you can have a main terrain image, an overlay image such as a desk,
or rug, or bookshelf, then another overlay image in case there is an
item to be found, and another overlay image in case a monster exists
there... you get the idea. Many things can exist in the same space
in this type of game.)
My map creator stack, which is huge, take up a big chunk of memory
when it is running. The stacks that I will use to create the game,
and the stacks players will use to run the game, will be very
different, the latter being much smaller and taking up much less
memory (I hope).
The biggest test of all will be when each move sets the icon of about
5 objects per square, or about 500 total objects, instead of the 100
I am working with now.
Shari C
--
--Shareware Games for the Mac--
http://www.gypsyware.com
More information about the metacard
mailing list