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 Professional Discussion / Why does this code lockup DBP

Author
Message
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 31st Jul 2003 06:53
I am trying to play an animation. It plays fine if I don't use the WAIT command. The problem I am having is my animation is so fast you can't see it.

I did try setting the ANIMATION SPEED command but it didn't effect the animation because i am using a loop to play it.

See source for example code...
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 31st Jul 2003 07:06
Why do you need the for next loop? All that it's telling the compiler to do is play the animation fifteen times and wait 5 seconds each time.

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
Mattman
23
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 31st Jul 2003 07:07
do this:



---Mattman
DID YOU KNOW THAT ???
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 31st Jul 2003 07:14
Correct I want it to play each frame of animation and wait. Otherwise it speeds by so fast you can't see it.

I tried the code mattman and it freezes the program. If I remove the wait 500 it works but it's to fast to see it...

I need the loop otherwise I am unable to play the animations backwards later...
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 31st Jul 2003 07:18 Edited at: 31st Jul 2003 07:20
I know why, it's the for next loop. What you should do is use variables, like this:



See if that works.

Edit: Make sure you define those variables away from the If SpaceKey() = 1 code, otherwise the variables will constantly reset.

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 31st Jul 2003 07:31 Edited at: 31st Jul 2003 07:32
HZence- It ticked off one frame of animation and then stopped...
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 31st Jul 2003 07:42 Edited at: 31st Jul 2003 07:42
Got it working... Thanks for the answers guys! I added the working code so you can see it.

You have to dim you're variables outside of the main program loop.

HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 31st Jul 2003 08:36 Edited at: 31st Jul 2003 08:38
Wow I actually helped someone. I better be in the credits now...

...cuz if I aint...

*shakes fist threateningly*

"You have to dim you're variables outside of the main program loop."

Duh

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 2nd Aug 2003 05:41
I am still working out tech demos before I start a project. If you want to be in a project I will be starting one after i figure out collision detection, sound, maps, texturing (mine is lame at best) and last but not lease hammer out a solid game design document.

I also need to put up a website for the design team and build a tech demo... lol

DBP makes it easy to have a lot of work...

O yeah no one gets paid unless people decide to register the shareware version.
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 2nd Aug 2003 05:43
Ugh. You should march on over to the General Discussion forum where we've been discussing shareware lately. If I were you I wouldn't release it as shareware...

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 2nd Aug 2003 06:51
Shareware works if you do it right. My approach to it will be single player for free and lock down multiplayer until the shareware is registered. That is IF i can get multiplayer to work.

So far everything is working pretty good. After some trial and error...

Login to post a reply

Server time is: 2026-07-23 03:44:39
Your offset time is: 2026-07-23 03:44:39