Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Again, space invaders

Author
Message
Patgarret
21
Years of Service
User Offline
Joined: 24th Jun 2003
Location:
Posted: 11th Jan 2004 18:36
ok Guys here is my attempt at space invaders, very basic...

The aliens go, from side to side, they do it right even if there is a slight problem of superimposing with the last alien, but I think I can work it out...

The real problem is with the sincronization of the movement. here is the problem. The aliens go...the spaceship move in a sluggish way, I think that's because the loop as it is constructed gets in the way of smooth movement. Moreover the missile, when I fire (after several pressures of the up key) freeze everything...that's because the missile loop is actually external and does block anything else that's happening.

Now...what I would like to have is just some tips to proceed on the way of creating a playable game

thanks...

Dav
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Jan 2004 20:58
don`t cls every loop, that defeats the point of using sprites

don`t move the bullet in a loop, set a flag (like bullet_running=1) and then every loop do

if bullet_running=1 then inc g

then check if the bullet is offscreen with

if g=240 then bullet_running=0:g=1:hide sprite 32

that will reset the bullet when it gets offscreen, the spaceship moveing n a sluggish way is just the speed you move it, increas the amount of pixels per loop and it will run faster, cheers.

Mentor.

System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD (using icewave hd coolers ), DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800Pro 128mb.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Jan 2004 22:06
You need to think like this...



BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php

Login to post a reply

Server time is: 2024-11-25 23:34:50
Your offset time is: 2024-11-25 23:34:50