A few quick questions?

Previous topic - Next topic

Schurmy

If I put in a title screen for instance: PRINT "GOOD LUCK!", 15, 50
then after I put in the loadbmp and sprites how do I get passed the title screen because I put a mousewait on the print and once I click it exits the whole thing....

Also how do I get a multiple bullets to come out of a objects gun moving left to right and how do I do collision for bullets hitting lets say an alien form?

Kitty Hello

LOADBMP as first. It clears your backbuffer and puts the image on.
Loadsprite does not matter. Must be just before Sprite call, obviously.
Before the mousewait you want a SHOWCREEN, OK?

For multiple bullets: Learn the basics, then read about arrays in the tutorials (F1 in editor)

Schurmy

so I need the LOADBMP before my PRINT?

Schurmy

I am unfamiliar with these rays Im 15 and the ray thing is confusing me in an easier way of telling me how can I get a bullet to contact another object and cause that object to go away (disappear)?

Kitty Hello

There's nothing about rays I said - is there?
Well, 15 is the perfect age for starting game programming. I was 13, but that was a bit too young now that I think back. Don't expect to write DOOM V next year, take it slowly. Read the tutorials. Write some small code snippets and try these. Play with the commands. Learn how program flow works (IF/WHILE/FOR/FUNCTION).

For a shot - hit - disapear sequence the pseudocode is like:
Code (glbasic) Select
make array of shot positions
make array of enemy positions

setup enemy positions

loop:
   move enemies
   move player/add shots
   move shots
   for each enemy
      for each shot
         if shot hits enemy
            remove enemy
            remove shot
           
         endif
      next // shot
 
      if player hits enemy then gameover
   next // enemy

   
   draw stuff
   showscreen
GOTO loop