UnderwareDESIGN

PlayBASIC => Show Case => Topic started by: kevin on July 24, 2010, 01:40:25 AM

Title: Invaders From Space
Post by: kevin on July 24, 2010, 01:40:25 AM
 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,

[pbcode]
         ; -----------------------------------------------------------
         ; ------------------>> HANDLE THE SCENE <<------------------
         ; -----------------------------------------------------------

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

[/pbcode]



   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 (http://www.underwaredesign.com/forums/index.php?topic=2245.0)


 
Title: Re: Invaders From Space
Post by: kevin on July 24, 2010, 10:23:31 PM
  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.

[pbcode]


         ; -----------------------------------------------------------
         ; ------------------>> 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

[/pbcode]

     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.    :)

Title: Re: Invaders From Space
Post by: kevin on July 26, 2010, 03:33:26 AM
  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.  

Title: Re: Invaders From Space
Post by: Vee on July 26, 2010, 09:39:20 AM
all this looks really awesome, but erm where or when can we play it :)?
Title: Re: Invaders From Space
Post by: kevin on July 26, 2010, 11:50:10 PM

well..  that's overstating it somewhat,  after all it's space invaders.. sort of...
Title: Re: Invaders From Space
Post by: kevin on July 27, 2010, 02:00:56 AM
  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.  
Title: Re: Invaders From Space
Post by: kevin on July 27, 2010, 09:34:48 PM
 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 (https://www.youtube.com/channel/UCXQyxsbmG8EMEATz47gHFyg) channel.    



Watch  'Aliens From Space'  (http://www.youtube.com/watch?v=JSkpDcN6VFg) On YouTube




  DOWNLOAD

      (Destructible) Aliens From Space  (https://www.underwaredesign.com/forums/index.php?topic=4577.0)