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 / game help.

Author
Message
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 21st Dec 2005 23:51
hi people i'm writing the worst game in the world i need some help. everytime i shoot the bullet flashes near the gun as it moves. please help. i've tried giving it crazy Z axises to get it off the screen, but to do avail. please help!
i hat giving source away but the problem could be anywhere so heres my source
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 22nd Dec 2005 00:27
You have a lot of hide object 4 commands and commands that contradict each other. I think the main loop should look like this:


All I did was fix the shooting, as for the player movements, I didn't mess with them

new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 22nd Dec 2005 01:46
wow thanx.
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 22nd Dec 2005 03:27
uhh,

i tried that and the bullet shot like 25 times then stopped working. this is the same with the looking left and right(it didn't work in my version either), you can look left once and right once, and back and forth between the two. you can try my code out and see what i mean.

i'll upgrade to 1.13, i'm using 1.8(can i upgrade? i got the free 1)
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 22nd Dec 2005 08:56
A tip for future projects:

If...Then... has 2 structures.
Instead of
if spacekey() = 1 then ...
if spacekey() = 1 then ...
if spacekey() = 1 then ...

you can also do
if spacekey() = 1
...
...
...
endif

Which saves alot of headaches and allows the pc to only calculate this condition once, instead of 3 times.
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 22nd Dec 2005 09:00
Well, what are your conditions for your gun to reload? Post em

Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 22nd Dec 2005 10:59
Some half-pseudocode might help:



delay handles the time between each shot, and bulletLife() handles the maximum time the bullet can 'fly' in the air (without hitting anything)
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 22nd Dec 2005 17:42
nevermind, i think i fixed it. it was looking for the object in Z 12.0, wich it wasn't. it was just stepped 12.0 .
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 22nd Dec 2005 18:21
umm, how do u do less then? the '<' symbol doesn't seem 2 work...
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 22nd Dec 2005 23:06
Less then is <, post some code to see if there's a poblem with how you're calculating.

new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 23rd Dec 2005 01:21
well, i fixed it now, by not using an if, but just doing the conditions.

what it was was:

oh nevermind i 4g0t

Login to post a reply

Server time is: 2025-05-22 21:55:39
Your offset time is: 2025-05-22 21:55:39