| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This is the animation that is done after clearing a stage. Moreover, and
for the first time since I started development, now we can move into the
next level as intended from the game's design.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function relies on a pre-computed table to get the "random" numbers
from, but most of the times this is used, it needs to be between some
safe boundaries.
Before this commit, this was done inside of the function, correcting the
fetched value to be above or below these limits. But there was a bug on
the below the grounds limit, in which the 'sbc' instruction could
subtract too much from the fetched value and make enemies appear below
the sky.
Now, this is easy to correct, but since we are cheating with a
pre-computed table, I thought it would be vastly easier to just get a
random table with the "proper" values. That is, random but within the
required boundaries already. Plus, it makes the
'random_valid_y_coordinate' function much faster.
This commit adds a ruby script in bin/ which produces a pseudo-random
table when called, making sure all the requirements are met. We have to
make sure to call this script if we ever change the boundaries at some
point.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
Some sprites like enemies and objects are meant to appear maximum at a
certain Y coordinate. Increase that as the former could mean sprites
going on about the scores, whereas that shouldn't be possible.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
| |
The randomness comes from a pre-computed table of "random" numbers. This
is of course the most simple technique you can come across a code base
for the NES/Famicom, but for the purposes of this game is good enough
and (most importantly) fast.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
|
| |
This was a leftover from a previous implementation and is no longer
needed. Moreover, I have also added a comment clarifying that the 'y'
register is preserved.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
| |
|
|
|
|
|
| |
This adds a first implementation of collision checks between the player
and the background.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|
|
|
This comes with a more general approach to handle background collision.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
|