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.

DarkBASIC Discussion / Oh my god... I need help!

Author
Message
Ghost Pirate Bob
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 16th Jul 2004 14:21
Hey guys, its the pirate back again with another problem I can't figure out.

Thanks to the fine people in this forum, I've overcome my previous two problems.

However! Now listen to this...

Ok, so right now I have the player flying down an endless track with three spheres on the left, center, and right of the track...

When you hit a, the left one fires, when you hit s, the middle, d, the right...

Ok, anyway, on this track are several other spheres... like... flying down a line.

The object of the game is going to be to hit these spheres as they come down the track.

The Problem:
I need that when you fly down the track, and hit the spheres, it keeps tally of your streak. If you miss one, it drops down to 0.

I've gotten the code to work so that it keeps the tally, but ONLY if you shoot the other sphere on the very first frame that the blaster spheres overlap. Otherwise, it says "Hey, you hit the sphere, but you didnt fire... you must have missed, lets restart"

Its not so much the syntax (although I'm having some problem with that) as the logic...

HELP ME!

Me
FROGGIE!
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 17th Jul 2004 03:50
posting some code would be useful

I should have changed my signature when asked
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 17th Jul 2004 04:29
I think you'd be better off just checking for sphere's passing by the player, like if a sphere is shot, disable it - if not it gets past the player. Maybe even have a shield thing at the back to act as lives. You could easily increment a score system for level advancement, kill 100 spheres to change level or something.


Van-B


Muhahahahaha.
eat much pie
21
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 17th Jul 2004 04:32
I'd need to see some code, but just off the top of my head you could use the intersectobject command (http://forum.thegamecreators.com/?m=forum_view&t=31051&b=5 , thanks to Sparky) to check across the front of your spheres for any of the other objects. If one of these other objects crosses the intersect and you don't hit it, then that counts as a miss.

Hope that helps!

Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Ghost Pirate Bob
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 17th Jul 2004 15:13
Thanks guys! sorry for not posting code... the actual sphere collision section is actually part of a rather big program right now (about 10 .dba files) that all have common variables and stuff...
..
so I was looking for some logic idea to it.

I went with kind of a score system, and it seems to be working well so far.

I just didn't want someone to see a good 800+ lines of code for one blip of a problem.

Thanks guys!
GNAAAR

Me

Login to post a reply

Server time is: 2025-05-24 21:57:49
Your offset time is: 2025-05-24 21:57:49