Scrolling Game Development Kit Forum
SGDK Version 2 => Help, Errors, FAQ => Topic started by: Tanja on 2008-01-19, 02:24:11 PM
-
i looked into the sample game at the menu and there is one point i do not understand.
i've read the rules, and these are easy. the only thing i really don't understand is, how do the yellow arrows change their position when the player presses up and down?
there is a counter which keeps track of at what menu point you are. but where is the rest? these yellow arrows confuse me...
-
Each arrow is a separate tile. The frames in the tile are defined as ABB, BAB, BBA (I think... if there are three of them. Can't remember). A is the frame with the graphic, and B is a black (blank) frame.
Each tile is defined to be controlled by the counter. Thus, if the counter is at 0, the first tile is on A, while the other two are on B. When the counter is at 1, each tile moves to frame 1 of its "animation", so the first tile is on B, the second is on A, and the third is on B, and so on.
-
To put it briefly, the arrow is based on 3 animated tiles connected to a counter affected by the arrow keys.
-
thank you guys. now i looked again. these mapped tiles are at the end of the list, there didn't look because there were already yellow arrows further up.
this is a quite clever method.