Good. Well here I am with another doubt, before I start doing my first spectrum game.
In the engine that I use to make PC and Android games, there is a function called alarm. This what it does is that after certain frames, an action is carried out. In A.G.D or in Basic, is there something similar
I'm sorry to ask so much, but before I start doing anything, I'd like to have at least some basic questions by hand.
If the purpose is to set a timer, it's possible to use global variables in the MAIN LOOP event, e.g. to avoid too quick animations. Obviously, the higher the limit, the slower the time. Here's an example on how use two different timers to animate and "blink" a sprite:
Main Loop: IF A > 0 LET A = 0 ELSE LET A = 1 ENDIF
IF B > 14 LET B = 0 ELSE ADD 1 TO B ENDIF
Sprite Event: IF A = 1 ANIMATE ENDIF
IF B = 14 SPRITEINK 71 ELSE SPRITEINK 0 ENDIF
As you can see, the syntax logic is very direct and clear (very close to the Basic Language), however, it's important to understand that AGD events are "cyclic", that is, every event is a loop which stops at a kill event, a victory (completed game event) or an end (lost game event). Outside these loops there are the initialisation events, e.g. the "initialisation game" event where you have to set the variables, and the "sprite initialisation" where you can tell what's happening at the very first sprite type spawn.
You can learn more by watching the AGD video tutorials by Paul Jenkinson.
Last Edit: Apr 19, 2018 2:02:07 GMT -5 by lukebord1