Tags: ped7g/SpecBong
Tags
Part 12 - assembling the pieces together into "game" The final stretch including: Refactoring code to put some repeating things into sub-routines. End of level logic with stars-animation over Santa's bag while adding level-bonus to score. Logic and init of state when player gets killed, finishes level or starts a new game (in other words does lose last life), 50k score bonus life (it's there, you will have to believe me). Snowballs launching, mostly random with increasing difficulty for each level (probably unhuman around level 8, hopefully completely impossible to pass to level 99, as the game is not ready for level 100). Tiny gameplay changes (making again possible to jump at top of the ladder and making the player collision radius even one pixel less).
Part 11 - jump-over-ball bonus score counting When the player jumps, the game does note the coordinates of player's sprite (advances them +-4px in direction of jump) and keeps invisible collision detector in that place for the whole duration of jump. When some ball collides with this detector, it's counted as "jump-evasion bonus", added to the score - each jump resets the jump-bonus to zero, then first ball adds 100 and every following one doubles the bonus, so the total sum per jump is: 100, 300, 700, 1500, 3100, ... (probably 3 balls with single jump are maximum any way). Such collision will also emit new "star" sprite visually communicating to player that some bonus is being added to the score, and animates the star (going up slowly and changing mirror/rotate flags to flicker "randomly").
Part 10 - game UI and helper functions (random, add-score, level-init… …, ...) Now most of the elements (to assemble simple "game" out of this) are in place, the only major item missing is scoring the "jump over snowball". In this part 10 we did add UI elements like score/bonus/lives, they are displayed in classic ULA layer, on "white" paper which is in palette set to be transparent, and layers priorities were modified to "USL", so these UI texts are above anything else (including sprites). We added also simple random generator from Baze, and added some debug features like random score increments to test new routines. And finally the code will switch to 3.5MHz at beginning, to give us some fun perspective on how much of frame time this little of machine code can take, and how difficult it was to produce more complex games on classic ZX Spectrum (where you would have to add all the manual drawing of sprites and background restoring).
Part 8: player controls: left+right and jump+fall mechanics Walking on platforms, falling down off the ledge, jumping, staying within play-field, detecting when falling from too high (will just disable controls for 1s in this version). No ladder mechanics yet (will be part 9)
Part 6: collision detection "player vs snowball" calculating the collision based on distance between the centre point player sprite and snowball (not pixel-level collision masking individual pixels of sprites, just two "virtual circles", when overlap = collision)
PreviousNext