News:

Function Finder  Find all the functions within source code files

Main Menu

Invaders From Space

Started by kevin, July 24, 2010, 01:40:25 AM

Previous topic - Next topic

kevin

 Invaders From Space

   This is a bit of a  Space Invaders tech demo (shock, horror), with a one key difference though ! - In this version, the game controls more than one  Alien Swarm.   All of which is easily managed with some of PlayBASIC high level array controls.  Namely the ability to pass and array  handles around.  So the game stores a main linked  list of array handles that make up this scene.  Then during each redraw, we run through the scene list and dispatch the arrays to the handler/drawing routines.    

   Which looks like this,

PlayBASIC Code: [Select]
         ; -----------------------------------------------------------
; ------------------>> HANDLE THE SCENE <<------------------
; -----------------------------------------------------------

for each Scene()

Select Scene.TypeOfHandle
case ArrayHandleType_AlienWave
MakeArray Wave.TAlienWave
wave.tAlienWave=Scene.Handle
Handle_Wave(Wave())

Endselect

Next






   So far the game is basically running the swarm movement, player controls/ player firing with collision.  So there still needs to be some Alien to player, plus bunker collisions added.
 
  The artwork is just some stuff stored in data statements scaled up a bunch of times (since they're tiny).  You can find the them here


 

kevin

#1
  Invaders From Space V0.02

   Updated the demo a bit more,  added alien bullets and collision support between alien/player bullets and the bunkers.    The game play has been tweaked a so it's a little bit less like Space Invaders and more like a variation of the theme.  


  Edit: added another shot, just testing the scene manager here, as it now supports drawing and killing of the lists of the aliens.  

  Ie.

PlayBASIC Code: [Select]
         ; -----------------------------------------------------------
; ------------------>> HANDLE THE SCENE <<------------------
; -----------------------------------------------------------
MakeArray Wave.TAlienWave

for each Scene()
if Scene.Status=true

Select Scene.TypeOfHandle
case ArrayHandleType_AlienWave
wave.tAlienWave=Scene.Handle
scene.Status=Handle_Wave(Wave())
Endselect

else

Select Scene.TypeOfHandle
case ArrayHandleType_AlienWave
wave.tAlienWave=Scene.Handle
Delete_Attack_Wave(wave())
scene=Null
Endselect

endif

Next




     The loop currently only supports the 'alienwave' groups,  just need to add the saucer type.  So everything is dispatched/cleaned up from the one main loop.   Could also use CallFunction here, but I'm sure it's confusing enough as it is.    :)


kevin

#2
  Invaders From Space V0.03

  Added the saucers code (those huge white things :) ),  ripped the filtering to get a real authentic retro look, and added an idea i've been sitting on now for few decades.    Which is that rather than have lives, the players ship is now destructible, in the same way as the bunkers are.  So when it gets hit by a alien bomb, the bomb wipes out some of the pixels.   This will in turn to be extended to the aliens also, but it's not in this demo.    Ideally it'd be nice have the ships repair themselves also.   But I've a feeling that'd make it impossible to play, although it's pretty easy atm.  


Vee

all this looks really awesome, but erm where or when can we play it :)?

kevin


well..  that's overstating it somewhat,  after all it's space invaders.. sort of...

kevin

#5
  Invaders From Space V0.04 - Destructible Everything


   Had lots of house keeping work to do lately so not much time for code,  so this has been a nice distraction.   Anyway, as mentioned above, this version now support destructible  objects globally.    So when we shoot an alien or the saucer, this impact takes a chip out of the sprite.  When the sprite gets bellow the 50% threshold (50% of original pixels) it dies.   It's all pretty straight forward, what it does need though is something to show the pixels being removed, such as little particle explosion or something.  Atm, there's nothing really to represent an impact between anything.  

kevin

#6
 Invaders From Space V0.05 - Video

   Added (well.. cut and pasted :) ) some particles into it last night and decided to make it into another video for our PlayBASIC YouTube channel.    



Watch 'Aliens From Space' On YouTube




  DOWNLOAD

      (Destructible) Aliens From Space