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 / Alien Flight path

Author
Message
Toxitalk
18
Years of Service
User Offline
Joined: 13th Feb 2006
Location:
Posted: 19th Feb 2006 22:40
Im trying my bext to create my first DB classic game.

Im using 3d graphics as a 2d display for my shoot em up (in later level the camera will come into play)

I want to do some sort of random flight path for the aliens to follow (just left and right) but I dont want them just to 'sweep' accross the screen like space invaders. Currently I have tried generating a random number and on the basis of that each alien goes either left or right.

The trouble is they look too random and often shake instead of moving.

Any ideas.

Thanks

Mark.

Smoke me a kipper.....
The end is near
19
Years of Service
User Offline
Joined: 19th Jun 2005
Location: USA
Posted: 20th Feb 2006 04:18 Edited at: 11th Mar 2006 09:38
`I dont know if this will work,
randomize timer()
do
move=rnd(10)
if move=0 then position sprite 2,sprite x(2),sprite y(2)+1
if move=1 then position sprite 2,sprite x(2),sprite y(2)-1
loop

Login to post a reply

Server time is: 2024-09-24 17:41:21
Your offset time is: 2024-09-24 17:41:21