aboutsummaryrefslogtreecommitdiff
path: root/src/player.s
Commit message (Collapse)AuthorAgeFilesLines
* 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>