No -but here goes!
1/Butterflame - by the STAZ - is one of the PG examples
don't be fooled. Grab it and put it in a folder where it
can't run away.
2/ For arcade style games you usually need at least 2 GWorlds
(and you thought one was hard enough!). Why?
the first one contains you background (more on this later) the
second will receive your background and then the sprites (the
things that move), before itself being copied to screen.
2/1 Schematically there are 2 styles of background: either all
is visible, or your user has to scroll around (piece of advice:
go for the first this time, you can add scrolling later when you
get the hang of things. Otherwise you faced with the decision -
do I make one mega-bi background in GWorld 1 and then just copy
in the rect centered on my user controlled sprite? Do I build
the Background Gworld on the fly.
2/2 Sometimes you will more than 2 offscreen worlds, but again,
start with 2 (why would you need more than 2 - if your background
changes - or even worse - it the user can interract with the background:
think SimCity - bg1 is the land, rivers etc: bg2 is the buildings and
intrastucture, these have then little people, planes or godzilla
placed over them in GWorld 3 before being zapped to screen.
3/ Suss out your event loop:
00:startup
01:prepare the necessary number of GWorlds
02:remember to check memory available to continue :-)
03:other inits - not level specific - just for game and env
04:get userlevel
05: if userlevel is 0 (not started yet go to 08)
06: if userlevel is x (go to FN to load in level x - 10)
07:fall into eventloop
---
WHILE gameInProgress
FN copyBg2GWorld2
FN copyGWorld2Screen
FN getUserActions
FN createComputerActions
FN moveEveryoneAndReact
FN areWeEndOfLevel
WEND 'for speed you may only fall into HANDLEVENTS
'when the game is paused, using GETKEYS and GETMOUSE
'to read input directly.
----
08: FN build level O - a demo screen or something - gMode=0
09: return to eventloop
10: FN buildLevel( x)
11: return to eventloop
4/ In this sort of game, there is a usually an enormaous 'database'
ie bunches of records following everything. The FN getUserActions
and FN createCOmputerActions would just update and change these
records, FN moveEveryoneAndReact is where the changes would translate
into onscreen drawing.
5/ Grab the GWorld info from Butterflame - it's good - it's STAZ
and it's fairly easy to understand!
Keep posting questions
jonathan
-------------------------------------------------------------
! "format utile" studio de graphisme/graphic design studio !
! 32 bd de Menilmontant, 75020 Paris, France !
! phone +33 1 43 49 02 04 +++ fax +33 1 43 49 16 51 !
-------------------------------------------------------------
*** coming soon to a browser near you ***
<http://www.cybercities.com/formatutile>
-------------------------------------------------------------