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 / My Work on a Sidescroller

Author
Message
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 18th Jan 2005 10:15 Edited at: 18th Jan 2005 10:20
I've been basing my first game (after pong) on the wonderful sidescroller in the 2d section. I must admit 2d is a bit confusing but I think I've got it figured out, sorta-ish-ness. But I'm having some problems. First of all I can't get the enemy ship to show up on screen . I tried using variables as the x and y to have it constantly moving, then I tried just regular numbers in the sprite command, but still no ship. So I'm putting the code on here and I'd like to help, after my most recent change (adding the part where I blow up) I get the "unable to close nest" error. Any help will be appreciated, i'll attach the media.

edit: oops forgot to attach the media but its not working, just try finding junk and use it (sry for the inconvenience)

editedit: now its working, my zip wasn't working right

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.

Attachments

Login to view attachments
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 18th Jan 2005 19:06
*bump* Well after an entire night of waiting, still no answer.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
Los
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Location:
Posted: 18th Jan 2005 23:57
erm.. never done any sprites ontop of a 3d display before.. but I made some code and found out it displayed the sprite easily enough



no media.. cool.

Erm, one thing I did see was the co-ords of the enemy ship are way over the 600 limit.. so maybe you could make the display bigger? set display mode 800,600,16

you would have to fiddle with the IF left() and sprite X Y stuff to get your limits again... but.. that's what I could make of it.

no no no no no no no no
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 19th Jan 2005 02:30 Edited at: 19th Jan 2005 02:43
Well, that fixed the problem with the enemy ship, but the nest still isn't closing, whatever that means, any explanation or tips on how to fix that?

edit: Also, within the code starting at about line 99 I have the enemy setup to move, shouldn't it be moving? or should I have to set something up in the moveall sub?

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 19th Jan 2005 03:04
Well, I'm posting up some new code now with new problems, like how to get the enemy to shoot. The old questions still need to be answered, but for now the bad stuff, as far as I know, is remmed out.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
X_MEN
21
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 19th Jan 2005 04:14
try this

remstart
if sprite exist (1)=1
if sprite hit(2,1)
gosub blowmeup
endif
endif
remend

take out the remstart and rem end

You can do it if you try
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 19th Jan 2005 04:31
Wow, that was simple, and it was fixed on all the other things, that was dum of me, sorry for wasting that space, anyway, how should I setup the enemy to shoot?

(oh, and thankyou xmen)

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 19th Jan 2005 09:59
Well, I'm sure somebody knows, I bet this is just a government conspiracy to put my life on hold.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 19th Jan 2005 18:33 Edited at: 19th Jan 2005 18:39
Uh, I hate to keep posting like this, but I'm not receiving any help... I'm beginning to wonder if something is wrong with effeciency on these boards or if my question isn't the right thing to ask...

edit: Ok I got the guy to shoot by pretty much saying if enemy=myy make the sprite

then in the subroutine moveall I set it to move towards my player instead off the screen... I feel so proud. But my enemy still won't move. Any ideas why?

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 19th Jan 2005 19:09
Ok, well I'm posting up the code. I got the enemy to shoot and move up but for some reason he doesn't come back down... I checked over the code and couldn't find my flaw... Any fixes?


And what exactly are the dimensions of the moniter, I keep getting confused....

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 19th Jan 2005 20:29
You can get the dimensions of the screen by using "Screen Width()" and "Screen Height()".
And you can't expect people to debug code for you, its not an enjoyable or interesting thing to do. I'd much rather help someone design a new way of handling collision in which i learn something aswell, than pointing out places where you've missed endif's etc.


http://www.dbspot.com/NYC
New years competition... Fo Shizzle.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 20th Jan 2005 19:12
Good point, I'll fly solo for a while and figure out where my stuff is. I guess I just want to know that I have support waiting when I go crazy and type random nonsense in the game.

Thanks a lot everyone!

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.

Login to post a reply

Server time is: 2024-09-23 10:25:38
Your offset time is: 2024-09-23 10:25:38