Monday, 23 March 2020

Aliens Unleashed

23rd March 2020

Last Saturday, I mentioned about the problems I had with the alien movement patterns, where I made things a lot harder for myself. Especially the previous weekend. This weekend, I started on working on the alien movement groups. After Saturday's major change of the code and pointers. After following the Starfysh code, I finally got somewhere and I am now ready to continue with working on the alien movement groups.

Alien movement is based on time instead of position. Once the timer table has reached the end, the next group of aliens can spawn. I have a lot more groups of aliens to work on, which will take some time time to make. Or should I say, a lot of time to make. Especially when the total number of enemy sprites drawn result to 26. I have used the border cycle on screen as a clock, so I can count which byte the table is read at, and also where I should time out the aliens to stop them wrapping across the screen.

On the plus side, since the game preview was released Summer last year. The majority of the game code is still there. Although at the moment I have disabled the collision, in order to test the aliens for their movement.

The new set of tables are as follows:



enemy1framelo !byte <Frame_AlienType2 ;Store low-byte of alien frame
enemy1framehi !byte >Frame_AlienType2 ;Store hi-byte of alien frame 
enemy1colour  !byte $0a               ;Store colour of alien
enemy1startx  !byte $0c               ;Start X-Position   
enemy1starty  !byte $f0               ;Start Y-Position
enemy1score   !byte $01               ;Amount of points to score
enemy1lives   !byte $01               ;Number or hits to kill alien
enemy1time    !byte $18,$18,$18,$1c,$18,$18,$18,$18 ;Timed movement
enemy1speedx  !byte $00,$00,$00,$00,$00,$00,$00,$00 ;Speed of movement accordingly X
enemy1speedy  !byte $fe,$fe,$fe,$fe,$00,$00,$00,$00 ;"                             Y

No comments:

2023 at a glance

2024 is here, and 2023 has been a really quiet year on the production front due to everything that had gone back to normality. The year has ...