Here’s a 2d shooter template I was working on a while ago, if anyone wants to play around with it. If you’ve got any questions on how things work, let me know.
http://public.cschons.com/blender/sideScrollTemplateBLANKv4.blend.zip
A-shoot
S-Missle
D-speed up
R-reset
Q-quit
Some features:
-the ship is constrained to the screen with a script that finds the screen edges (only works for Z/X plane)
-There is only one keyboard sensor. All keys pressed or released are put into a 2 global lists which other objects can check against. (I can stand making a separate key sensor for each keypress)
-The ship has a slight impulse applied to it on key releases, to keep it from drifting.
Enemy spawning:
-Spawn points are in the format spawnFront.001, spawnFront.002, etc. and spawnBack.001, spawnBack.002
-all the spawn points are put into 2 lists, spawnFront and spawnBack.
-objects can be spawned behind or infront of player.
-objects can be spawned on screen by giving the spawn point prop: offset
-The spawnTrigger script turns on spawn points when they are close enough to the screen, or when the screen has passed the point for rear spawning.
-spawning is determined by scripts spawn_row, spawn_col, etc.