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 / Space Invaders - enemy sprite problems

Author
Message
DaveTheStudentAt28
21
Years of Service
User Offline
Joined: 12th Jul 2003
Location: United Kingdom
Posted: 24th Jul 2003 19:51
Hi All,

I'm trying to make a basic Space Invaders game (with a Star Wars theme ) but i'm having trouble getting the enemy sprite(s) to appear on screen and move (you know how they do - across then down a bit then across etc.) All i get is a really tiny dot moving where the enemy sprite should be. If anyone could check my code and give me a few pointers it'd be a real help.

Cheers,
Dave.
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 24th Jul 2003 20:06
Change SPRITE N, EnemyX(N), EnemyY(N), SpriteNum(N)
to SPRITE N, EnemyX(N), EnemyY(N), 1

The problem here is that you tried to create sprites from non-existing images. As all your sprites use the same image, they use the same image number. The image number for the enemies you use is 1, but for each enemy it increased in your code.

Whatever I did I didn't do it!
DaveTheStudentAt28
21
Years of Service
User Offline
Joined: 12th Jul 2003
Location: United Kingdom
Posted: 24th Jul 2003 20:27
Cheers Kentaree,

I tried your suggestion and it worked like a charm; now i can tackle the lasers and collision stuff (eek!)

Bye,
Dave

Login to post a reply

Server time is: 2024-09-20 17:52:48
Your offset time is: 2024-09-20 17:52:48