aboutsummaryrefslogtreecommitdiff
path: root/src/player.s
Commit message (Collapse)AuthorAgeFilesLines
* Add the Game Over screenMiquel Sabaté Solà2026-03-051-11/+7
| | | | | | | This is still missing the support for player 2, but I've left traces about it. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Update lifes left for player 1Miquel Sabaté Solà2026-03-041-2/+21
| | | | | | | The whole handling of player 2 will come whenever I set to implement multi-player for this game. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Add collision with the playerMiquel Sabaté Solà2026-03-041-0/+32
| | | | | | | This allows for explosions to run after making the player to disappear, and it re-runs the entering scene timer. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Remove target velocities from the playerMiquel Sabaté Solà2026-02-101-4/+0
| | | | | | This was mostly from an old implementation and no longer relevant. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Adapt the code to play well with nasm's asanMiquel Sabaté Solà2025-12-151-34/+34
| | | | | | | The address sanitizer from nasm provides quite a few goodies, so let's adapt the code more to it to benefit from those. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Implement the base for moving bulletsMiquel Sabaté Solà2025-05-141-0/+3
| | | | | | | | | | | This establishes a way for bullets to move, be displayed as independent sprites, cycle these sprites, and check for the collision on the background. This is still lacking the collision check with enemies and has some obvious bugs that will be fixed on the next commits. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Implement hoverMiquel Sabaté Solà2025-04-021-0/+12
| | | | | | | | | This is a way to stop vertical velocity mid-air, which is something I did not know you could do until I read the original manual. The down arrow has been picked since it was the same choice of the original game when played on joystick. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Rename throttle to the proper wordingMiquel Sabaté Solà2025-04-021-19/+19
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Full stop when not moving on walking stateMiquel Sabaté Solà2025-04-021-3/+8
| | | | | | | | Before this commit the same logic as in throttle state was applied in which acceleration was applied. This brings back the logic more closely to the original game. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Switch to a throttle state when fallingMiquel Sabaté Solà2025-04-021-0/+22
| | | | | | | As it's done in the original game, switch to a throttle state when falling off a platform. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Adapt velocity constants for PALMiquel Sabaté Solà2025-04-021-13/+9
| | | | | | | | | | | | | | | | | | | In 2f140cfb7ea7 ("player: First PAL implementation") the rate of acceleration was adapted for PAL. Now the values for velocities have been adapted as well, in a way that we get (virtually) the same experience in PAL and in NTSC. This has been done by moving the velocity constants into configurable values, which are then picked up by a new bin/values.rb script. This script allows us to write the constants in plain floating point numbers, does the conversion to fixed point numbers as expected, and it also does the same for PAL by applying the proper NTSC to PAL conversion. As a cherry on top, some values have also been tuned to match the original game more closely, even if some more fine tuning might still be needed here and there. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* player: First PAL implementationMiquel Sabaté Solà2025-04-021-7/+48
| | | | | | | | | The steps by which a player increases its current velocity to reach the target one has been adapted on PAL, so every five frames it takes an extra step compared to NTSC. This at least brings PAL to grow its values at the same rate as NTSC. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* player: Implement background collisionMiquel Sabaté Solà2025-04-011-61/+199
| | | | | | | This adds a first implementation of collision checks between the player and the background. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* player: Inline the position to screen translationMiquel Sabaté Solà2025-03-201-49/+35
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add walking animationMiquel Sabaté Solà2025-03-201-11/+87
| | | | | | This also corrects a pixel from one of the animations on the chr file. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* player: Add initial code for horizontal motionMiquel Sabaté Solà2025-03-201-15/+92
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* player: Update its sprites on heading and throttleMiquel Sabaté Solà2025-03-191-54/+143
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Expanded ground collision to the other platformsMiquel Sabaté Solà2025-03-181-34/+101
| | | | | | This comes with a more general approach to handle background collision. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add basic vertical movementMiquel Sabaté Solà2025-03-171-0/+317
Collisions are not quite there yet, and horizontal movement is still to be done. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>