|
Post by nra on Jan 10, 2013 12:32:39 GMT
Here it is: many games use the global Frame clock (3 bytes) to synchro all the game rooms, so when one comes to the room and sees a flying monster he can return to the previous room and wait a reasonable amount of time for monster to change its direction.
Actually, I just want every monster or moving objects to live phase independently of the players position, not starting everything in the room from scratch whenever the player enters it.
Difficult enough?
|
|
|
Post by Jonathan Cauldwell on Jan 12, 2013 14:19:51 GMT
Movement and behaviour of sprites isn't AGD's job, that's up to the programmer. Using a REPEAT loop in the Sprite initialisation event should enable you to move a sprite around to a slightly different position each time the player enters a particular room.
|
|
|
Post by nra on Jan 13, 2013 11:40:24 GMT
I see, Jonathan, yet how about some system FRAME variable which can be perused for this purpose? I don't mean milliseconds or minutes-hours, just seconds--a traditional truncated byte as 256 seconds would do.
Certainly, it could be emulated at the cost of two AGD variables, but isn't it too costy? Besides, this variable is already available for Speccy; alas, not for the AGD yet.
|
|
|
Post by nra on Mar 31, 2013 18:02:06 GMT
Hello Jonathan) Are you considering adding such a feature? I mean a FRAME byte at 23673. Yep, it's a bit longer than seconds, but better than 1/50s at
Also, as far as there's a limit up to 12 sprites onscreen in the AGD, would it be more handy to have a specific variable for the number of currently used sprites instead of wasting another var?
TY
|
|
|
Post by Jonathan Cauldwell on Mar 31, 2013 18:45:17 GMT
Considering? It's already in the version of AGD 4 which is in development. The byte at 23672 will be available as a new CLOCK variable, which I always found to be most useful. I've added a couple of extra general purpose variables too.
It's true that AGD will support 12 16x16 sprites, but the next major update will have other options which could take up CPU time so you might have to play around to see exactly what combinations can be done in 25 FPS. Sprites can be individually coloured, there's a particle engine, scrolling text messages and an option to have 8 16x24 sprites instead of 12 16x16. Throwing everything on to the screen all at the same time will slow things down, so the trick will be to design your game carefully.
|
|
|
Post by nra on Mar 31, 2013 19:07:17 GMT
Oh my! Thank you)
|
|
|
Post by november on May 2, 2013 7:05:57 GMT
Very good share, a person writing articles has a purpose, which is good
|
|