aboutsummaryrefslogtreecommitdiff
path: root/src/enemies.s
Commit message (Collapse)AuthorAgeFilesLines
* Remove the usage to zp_enemy_arg in most placesMiquel Sabaté Solà2026-02-281-73/+30
| | | | | | | | | | | | | | Everywhere except the 'basic' algorithm don't really need this argument. In the beginning I was using it to define some custom velocities, but in the end tweaking the inner timer on the 'extra' value for all enemies turned out to be more productive. Hence, remove this usage almost everywhere and make the code simpler as a side-effect. The usage on 'basic' is still under revision, just to check if 'homing' really needs to set a special argument whenever the 'homing' attack needs this sort of behavior. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Move the 'extra' initialization to a functionMiquel Sabaté Solà2026-02-281-51/+53
| | | | | | | | This allows us to be able to initialize each enemy separately, giving a more random appearance to it all. This will also come in handy whenever we want to make enemies re-appear. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Make 'basic' more true to the original gameMiquel Sabaté Solà2026-02-271-22/+44
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Initial implementation for the homing algorithmMiquel Sabaté Solà2026-02-271-2/+119
| | | | | | | Not the whole thing has been implemented, as it needs a rebump on the 'basic' algorithm so I can re-use it for 'homing' as well. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Set the enemy pool size on 'init_pool' loop's initMiquel Sabaté Solà2026-02-131-4/+3
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Implement the 'erratic' algorithm for enemiesMiquel Sabaté Solà2026-02-131-4/+173
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Fix sprites and waves for fighter jetsMiquel Sabaté Solà2026-02-121-6/+6
| | | | | | | I apparently got them all messed up. Let's put them as they were originally. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Implement the 'bounce' algorithm for enemiesMiquel Sabaté Solà2026-02-121-7/+202
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Initial iteration of enemy movementMiquel Sabaté Solà2026-02-121-33/+317
| | | | | | | For now only the basic algorithm has been written, but the framework for adding the rest has also been written down. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Improve the "other" states from fighter jetsMiquel Sabaté Solà2026-02-101-4/+4
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Allocate all enemies on sprite cyclingMiquel Sabaté Solà2026-02-101-0/+6
| | | | | | | The previous commit only tackled the first enemy, this one handles the "rest_o_enemies" code flow, which was entirely missing. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* enemies: add inner movement and facing logicMiquel Sabaté Solà2026-02-101-18/+231
| | | | | | | | | Enemies now have the ability to be displayed on screen, face at the direction that they were assigned to at random during initialization time, and they also have a timer that dictates some inner movement, similarly as it happened in the original game. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Add missing enemy tile definitionsMiquel Sabaté Solà2026-02-031-4/+36
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Adapt the code to play well with nasm's asanMiquel Sabaté Solà2025-12-151-1/+1
| | | | | | | 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>
* Initialize enemies at a random Y coordinateMiquel Sabaté Solà2025-05-161-1/+3
| | | | | | | | | 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>
* Add the skeleton code for enemiesMiquel Sabaté Solà2025-05-151-0/+58
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>