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 invader agian

Author
Message
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 15:37
well i'm tring to make space invaders but when i tried to run the exe once i made the images to see if they load nothing happens
here the code wots wrong with it?
it only the start.

just code
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 25th Jan 2004 16:40
Put a SYNC before WAIT KEY.
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 16:43
That don't work is it to do with my image format?

just code
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 25th Jan 2004 17:17
change:
load bitmap
to
load image

I wonder where that fish did go, a fish, a fish, a fish, O
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 17:23
no luck with that sugestion thanx thought.
any other sugestions?

just code
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 18:20
i've got the images to show how do i make the ship appear in the center of the x axis becuase it is a bit to the left of center when i put 400 as the x axis location x=800 y=600?

just code
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 21:41
and my bullet does not appear on the screen when the spacekey is pressed. please help.
here is my code this only one third of the way though the game.

just code
Gjl
20
Years of Service
User Offline
Joined: 28th Dec 2003
Location:
Posted: 25th Jan 2004 22:48 Edited at: 25th Jan 2004 23:00
When you position sprites they are positioned from the top left of the object corner I believe. Basically set the position to half the screen size plus or minus (either of the two, not sure) half the sprites size.

Oh and for the bullet problem, maybe you should set the position of the bullet to where you want it shot from (ie. the gun of your ship) when the spacekey is pressed. As far as I can see, at the moment it appears in the top left corner of the screen at the start of the game and moves up, going offscreen which explains why it is invisible. Hopefully what I said was right, I'm new to DBPro too.
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 23:03
the bullet still don't work could you tell me what the code i should be using is?
thanks.

just code
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 25th Jan 2004 23:06
could i use the move sprite command? if so can you tell me how to use it?

just code
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 26th Jan 2004 03:01
the best way to put some thing in the center of the screen, i think is:
Screen width()/2 then minus half the length of the image for your x position
screen height()/2 then minus half the height of the image for your y position

now its just a guess but when you show your sprite it will load at 0,0 as the hide player bullet code says if it is less than 40 it will hide it

so position your sprite somewhere else or get rid of the hide bullet code to see if ou can see it

i will try the code now and see what is wrong with it

I wonder where that fish did go, a fish, a fish, a fish, O
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 26th Jan 2004 03:59
I have put a snippet in of the code i have come up with i previously miss read what you said after i loaded it i figured it out

I wonder where that fish did go, a fish, a fish, a fish, O
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 26th Jan 2004 10:09
sorry but i dont see the bullet can you help?

just code
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 26th Jan 2004 19:37
I'm trying to make a space invader too

This should works, just change the variables



Is just of those days when you don't wanna wake up everything is *****, everybody sucks you really don't know why, but you wanna justify rippin' someone head off!
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 26th Jan 2004 19:59 Edited at: 26th Jan 2004 20:26
sorry but i still down't see anything please could you download my source and images from http://home.ripway.com/2004-1/61873/SpaceInvaders.zip and run it the make shore it works.
THANKS.

just code
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 27th Jan 2004 23:30
how do i make the enemy sprites fire a bullet every 50 second or so but only if it is on the bottom row?

just code
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 28th Jan 2004 00:14
also my shield are not looking right but when i made it just hide the first sprite and show the second but when i add the third one to show it displays a strange colored red line where the bits will fall of. I check the images and its definatly a problem in the code.
how can i solve this?
as i have said in earlier threads that my images are available at the above website.

just code
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 29th Jan 2004 03:01
it all looks ok to me

I wonder where that fish did go, a fish, a fish, a fish, O
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 29th Jan 2004 03:08
but when you shoot the sheild it dosent shoot of properly

to fix this you could make the collision detect tell you the number of the sprite it collides with then some code which moves the sprite off the screen or deletes it
the code to detect which sprite it hits
spritenum=sprite collision(bullet,0)
use this to see which sprite it hits then delete the sprite it hits or hide it or move it which ever suits you

I wonder where that fish did go, a fish, a fish, a fish, O

Login to post a reply

Server time is: 2024-11-26 02:05:48
Your offset time is: 2024-11-26 02:05:48