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.

2D All the way! / I need help with my space shooter

Author
Message
PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 21st Mar 2004 17:37
I'm triyng to make a simple 2d space shooter, I think it's going well, but I'm having troubles with the shooting, wen the ship fires, it stops moving, I can't fix this problem...
Anyone has some sujestions?
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 21st Mar 2004 18:22
This stops your ship......

while sprite y(2) > -10
move sprite 2,8
endwhile

This doesn't......
if sprite exist(2)
If sprite y(2) < -10
Move sprite 2,8
endif
endif

But the second version has to be part of your main loop.

PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 21st Mar 2004 18:48
Thanks, much better now. =)
PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 25th Mar 2004 16:40
I can't make multiple shots, so that the beam won't disapear wen the space bar is pressed befor the shot is out of the screen.
Does anyone has any sujestions??
Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 25th Mar 2004 17:05
I suggest you buy a dictionary, or else use a spell checker.....

GIve me more power!
Morloc
21
Years of Service
User Offline
Joined: 21st Mar 2004
Location: UK
Posted: 25th Mar 2004 17:17
lol

Morloc
PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 25th Mar 2004 17:21
Sorry for the spelling..... but u can get the idea of what i wan't... some persons have a life and don't spend their life learing other stupid culter's language
Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 25th Mar 2004 17:34
Sorry, only making a joke. Im a Troll!

GIve me more power!
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 25th Mar 2004 18:17
Quote: "stupid culter's language "


No culture is stuiped. Im sure if you had respect for that culture you'd learn there language or attempt to? it really isnt that hard. what are you english? well it may be hard to learn arabic or something but english was made for the common moron didnt you know that?

The search continues.

Current project - A space game
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 25th Mar 2004 18:40
while spacekey()=1
sprite 2,sprite x(1)+27,sprite y(1)+7,3
endwhile

You still have while/endwhile in your code. I told you that it stops your program a few lines up the page.

PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 25th Mar 2004 20:58
It's a diferent part of the code...
So english was made for the comon moron, that's why english ppl are all moron, they had to invent a language that would fit their capabilities
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 25th Mar 2004 22:47
English is not a language made for morons. It's a magpie language. Little bits are borrowed from a dozen different languages and this actually makes it very complex for a non-native speaker.

I'll cut the non-natives some slack. People from the UK or US that are sloppy need a swift kick every now and then.

Given the easy edit features of this forum, there is no need for rushed posting or allowing obvious mistakes to stay uneditted.
--
TAZ

PST, if your code has changed since the first post, you may want to re-post it so that we're in sync.

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Mar 2004 00:34
Anyhow you can't use loops that wait for something, and your loop waits for you to release the space bar.

UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 26th Mar 2004 01:53
Quote: "So english was made for the comon moron, that's why english ppl are all moron, they had to invent a language that would fit their capabilities "


Well most english people i meet are morons....and it hurts my head...

The search continues.

Current project - A space game
Scouseknight
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 26th Mar 2004 02:36
I suggest you go elsewhere to meet them then

I am English and would like to know what you mean my moron - what do most English people you meet do that make them morons to you?

This isn't an argumentative post it's a genuine question - and apologies for those genuinely posting in here to help.

UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 26th Mar 2004 05:53
by english i don't mean people from england i mean people that speak english in general...and mark my words i said MOST so nah!

Someone that has no potential to do anything and you can always tell this by how they talk. They sound like idiots and useually are too.

The search continues.

Current project - A space game
Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 26th Mar 2004 14:18
Hey, if you assume(as I do in my more negative moments) that 90% of the worlds population are morons, it explains alot. We all live in democracies, right? (read for that "demo-crazy") So Im always wondering why we have evil morons for leaders. Then I remember that we give the vote to the public, 90% of whom are morons, so VOTE IN MORONS to represent them. Representational government, dont you LOVE it?

GIve me more power!
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 26th Mar 2004 15:23
I wonder if you two need to think more and post less.
--
TAZ

Scouseknight
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 26th Mar 2004 16:24
Your post did say "english people" and not "english speaking people" so pulling me up on that is a little harsh don't you think

Perhaps you are right and all the English speaking people you have met have been morons, but then, you haven't met any of the English speaking people I have met - of which 99% are decent folk and like in any culture anywhere, there is the odd moron.

Now, what was this thread about again...

Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 26th Mar 2004 16:44
I wonder if you two need to think more and post less.
--
TAZ


Game Beavers


Which two people? Maybe you should think more and post less you norbert.

GIve me more power!
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 26th Mar 2004 19:01
I'm just trying to keep things on topic. But, I think PST has gone into hiding.
--
TAZ


And Norbert rocks!

PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 26th Mar 2004 22:55
I'm sorry but my internet wen't dead...
I just wan't to say that u people should forget about that english stuff, i was just answering to he's stupid coment...
I've posted the code i have done so far... but i can't seem to fix my problem...
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 26th Mar 2004 23:16 Edited at: 26th Mar 2004 23:17
Trolling is fun... "sujestions" is my new favorite spelling. It's almost phonetic.

I'm old fashioned, I don't use sprites. I just paste images and redraw the whole screen. Not a huge fan of the built in collision, even though it's effective enough...I'd rather write my own routine using bounding boxes with a subroutine that checks at the pixel level with conditions.

Use an array for your projectiles and set a flag for your shots. If a shot has been fired then it jumps to a subroutine or a function that updates the projectile array.

As soon as I get home, I'll paste some source that does this. I use paste image instead of sprites, but it'll be easy for you to convert it. You can do whatever you want with it. I just did it as a exercize in timing and framerate.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
Scouseknight
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 26th Mar 2004 23:32 Edited at: 26th Mar 2004 23:46
PST - I can't help thinking that the reason it is stopping is because when you press Space, it cancels out the Arrow Keys thus the loop is therefore not adding or subtracting anymore.

I would do it slightly differently.

I would store the current direction of the ship and keep on moving it until the arrow keys alter the direction.

I have attached a snippet to show you what I mean.

That is assuming I understand the problem of course!

PST
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location:
Posted: 27th Mar 2004 18:33
Ok people, problem solved, managed to do what I wanted.
The code I made goes with this post...
Thanks for the help anyway =)

Login to post a reply

Server time is: 2025-06-30 06:44:55
Your offset time is: 2025-06-30 06:44:55