-
Notifications
You must be signed in to change notification settings - Fork 1
For developers
At the time I’m going to copy/paste some common question I’ve received by personal messages and mail. I hope that someone will help on making some order here.
The scroller.stage1 object encapsulate all the actions performed during the game and the image sequence but, in the game, are handled in 2 different ways.
The “scroller” subobject defines some details of the “stage tape”: the stage width and the blocks that composed the stage.
Solitude, into the “stagehandler” object that is created during stage start, takes this structure and, after cloning them (for keeping the original data in memory for another play), generates an object with “generateScroller” into the “backround” group. This object simply “unroll” the stage automatically, at given speed and draw it on the screen each “blit” phase. Since was created into the background group, that is the first rendered group, all the sprites will be drawn over that layer.
The unroller doesn’t do anything else, so, for making something happen, the same object calls that “script” portion you’ve mentioned, passing the current position of the roller and the cycle number, since the unroller can loop into a part of his image roll. That “script” part spawns enemies, change the roller speed, starts dialogurs and changes the rolling part, depending on the roller position given as argument.
That’s all: the roller draws background automatically, the “stagehandler” watch for his position and tells to the script block what to do.
Just a note: have a look to all the “scroller.xxxxxxx” calls in Solitude for better understanding how it works: you probably need to add one more sea block and define a loop.