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 / FlyShooter game!

Author
Message
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 3rd Oct 2003 03:35
I am making a game called FlyBlaster 2000. You shoot flies with the FlyShooter®. However, after completing the AI for the flies, the FlyShooter also follows the AI code. Even though nothing in the AI refers to object number 4(FlyShooters number)
What is wrong? Here is the AI code.

Am I an Idiot...or is everyone else just really smart?
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 3rd Oct 2003 04:08
Hmm... odd. You might try putting compressing all that into a single function though. That might help some...

Destroy you with my mind, I could!
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 3rd Oct 2003 04:36
its a gosub function currently. Is that what you meant?

Am I an Idiot...or is everyone else just really smart?
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 3rd Oct 2003 04:55
Err... no. This is what I meant:


Or... would that mess it up? (I don't understand the waits, exactly... so it probably needs tweeked)

Destroy you with my mind, I could!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 3rd Oct 2003 07:27
Every time you put in a wait command... it pauses the ENTIRE game... so that could be where your problem is...

Try putting the code into a function and using the timer command... Like this:



and then just put _random_move() in to replace where you have the gosub command...

Hope I Helped...

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 3rd Oct 2003 07:47
Now it always says Program ran into a function declaration. I haven't used function before so maybe i'm doing something wrong.

Am I an Idiot...or is everyone else just really smart?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 3rd Oct 2003 08:08
ah, ok, well you need to create a whole new *.dba document and paste that code into it and save it as whatever.dba in the same directory as your main program.
Then, anywhere in your program (ussually at the top) you put in the line:
#INCLUDE "whatever.dba"

then, like i said, put in the line:
_random_move()
instead of the gosub line...

Hope I Helped...

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 3rd Oct 2003 17:53
I am enlightened.

Am I an Idiot...or is everyone else just really smart?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 3rd Oct 2003 19:21
ah, but does it work?


I hope so...

Hope I Helped...

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...
koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 4th Oct 2003 01:28 Edited at: 4th Oct 2003 01:29
you dont need to put in the include# command
if you have a function, place the function after the loop
somewhere where the game wont run into it. eg

if there is no loop in the game then place the command 'end' where you want to stop the game and place the function after that.



"Hello this is the suicide hotline, please hold..."
http://www.rovokaa.tk/ -
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 4th Oct 2003 02:07
I just figured out what was wrong. I won't tell you because it was extremley STUPID of me... Sorry for your time.

Am I an Idiot...or is everyone else just really smart?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Oct 2003 09:55
Cmon man, tell us... we wont learn unless we know what not to do...

Hope I Helped...

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...
koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 4th Oct 2003 12:35
hoped you helped with what?

"Hello this is the suicide hotline, please hold..."
http://www.rovokaa.tk/ -
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Oct 2003 15:44
i dont know... i just put that at the end of all my messages... silly really...

Hope I Helped... (understand, that is)

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 4th Oct 2003 20:47
ok...fine. I had some code that pointed the camera at one of the flies so that I could see what they were doing. However, since the camera moved every time the fly did, it LOOKED like the other objects were moving. When I told the camera to point at a specific cooridinate instead of a variable, it worked.

Am I an Idiot...or is everyone else just really smart?
Jimi
21
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 4th Oct 2003 21:27
so is the game finished?

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 5th Oct 2003 06:11
yay...

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 5th Oct 2003 19:56
not yet

Am I an Idiot...or is everyone else just really smart?
koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 6th Oct 2003 06:53
ooo

[@JessTicular}You forgot to say, I Hope I Helped.

"Hello this is the suicide hotline, please hold..."
http://www.rovokaa.tk/ -
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 6th Oct 2003 14:39
sorry...

Hope I Helped

If Quizz's Are Quizzical, Then What Are Test's?
Check my profile for a quick test of knowladge...

Login to post a reply

Server time is: 2025-05-20 17:13:12
Your offset time is: 2025-05-20 17:13:12