Scroll & Sprites

Page 3/3
1 | 2 |

By thegeps

Champion (272)

thegeps's picture

13-02-2019, 08:59

I will verify later (few basic lines are enough to test it). So i'll know what to do

By thegeps

Champion (272)

thegeps's picture

13-02-2019, 19:08

@TomH
you were right. tried a few basic line code: 4 zero pixel sprites in the same line and 1 fullpixel sprite moved by cursor keys. It disappeared completely as passed on the same line

By TomH

Champion (327)

TomH's picture

13-02-2019, 19:51

Well, credit where it's due, I was just interpreting the hard-earnt results of the openMSX team as per that timing diagram posted earlier. No original insight here!

By thegeps

Champion (272)

thegeps's picture

13-02-2019, 20:03

just implemented clear score board by putting 4 zeropixels sprites at y=-1 x=255 Smile
now I have sprites 0-1 player's starship
sprites 2-5 mask sprites for score board
sprite 6-8 for front shot, left diag shot and right diag shot
with 8 enemies on screen sprites 9-24 for them
now I have 7 sprites left.
I was planning to use 3 more sprites to have double shot without waiting first shots reached a target or exit from screen
so 4 sprites left...
only 4 enemies' bullets?
Maybe I have to low enemies quantity on screen? Let me know what you think guys

By santiontanon

Paladin (833)

santiontanon's picture

14-02-2019, 09:01

wow, you are going to use all 32 sprites! haha

What I have done in my previous games for enemies/player bullets is to have a set of sprites (16 or so) that can be used for multiple purposes (enemies, enemy bullets, etc.) and depending on what is on the screen, I allocate them for one thing or another. Another option is to have flickering and that lets you have more than 32 objects in the screen. For example, look at this game (I think flickering is too much, but it's a solution!): https://www.youtube.com/watch?v=yH7o1CmBYKM (at around 3:35 I think there must be more than 32 sprites at the same time on the screen, but of course, with a lot of flickering, since I think the author rotates which elements get drawn in each frame to go beyond the 32 sprite limit)

By thegeps

Champion (272)

thegeps's picture

14-02-2019, 18:38

I'm doing the same! reserved sprites are 2 for starship, 6 for player shots, 4 scoreboard mask. other 20 sprites are for multipurposes. I have a routine that check, starting from sprite 9 (I have only a triple shot now, then it will become 12) the first inactive sprite and assign it whenever an event is about to begin. So, if no sprites are free the event will be skipped. If we have a wave of 8 sprites incoming and no sprites left, then first sprite will be skipped, wait for second sprite time, if a sprite is now free (one or some is/are out of screen or destroyed) then wave will start from sprite 2 and will be a 7 sprites wave, else from third and so on (but I think the most times sprites will be destroyed or are out of screen before new wave event). This afternoon the boss assign me at office, so I played some shot'em up for msx1 and they haven't a lot of sprites on screen so I think that if sometimes one or two sprites will be skipped it will not be a big trouble... And if one or two sprites will be aborted soon there will be 2 or 4 free sprites for enemies' bullets LoL

Page 3/3
1 | 2 |