Hi, just testing out a new demo. Still need to figure out how to create enemies and bullets!



Dealing with multiple actors (player, enemies, bullets) is easier when, instead of having separate logic for each type of actor (draw and move the player, draw and move the enemies, draw and move the bullets), you have common logic for all your actors and, inside that logic, you check the type of actor (move/draw all actors; if actors is player do this, if enemy do that, if bullet to that.). That way you can have a table that contains all actors and you can just add or remove actors from that table with the ADD and DEL functions.



But you could also have different tables for each type of actor (a player table, an enemy table, a bullets table) and work like that as well.
[Please log in to post a comment]