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 / Help with silly problem...

Author
Message
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 12th Sep 2003 22:24
I have a space invaders style game (go easy, still learning dbp) Anyhoots, the game runs nicely and all is well except for one little part--when the player gets shot, I am trying to find a way to let the particles show for a bit before re-initializing the player's next "man" or ending game. What it's doing is showing the particles for a split second but then hits a WAIT statement in next step which freezes up the particles. I want the particles to move as normal, then hide, then get next man or end but I am dopey and don't see how to do it - I know it's staring me in the face but I am going in circles The code below can be pasted into an empty dbp project and will run as I have used all primitive graphics for now to mock it up. You will need to rem out any references to sound, music, image for it to run. Particles initializers will take zero for image number and still work.

Any help and advice would be greatly appreciated




Thanks

-RUST-
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 12th Sep 2003 22:35 Edited at: 12th Sep 2003 22:41
I just looked at the code and it looks to massive for me to tackle at this end of the day, hopefully someone with more energy will stop by and solve it, I had posted the wrong answer , now I can`t be bothered to try again tonight, sorry.

Mentor.
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 12th Sep 2003 22:46
thanks anyway
the problem lies in the main loop under Baddie Shoots at Player comment in case anyone else wants a go

thanks all

-RUST-
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 13th Sep 2003 01:20
what!? No takers?


-RUST-
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 13th Sep 2003 01:46
Maybe this way..?


if intbaddiesrem=0
if timer() > intBadParticleDelay
hide particles 2
gosub _InitBaddies
gosub _GetReadyMsg
endif
endif
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 13th Sep 2003 02:05 Edited at: 13th Sep 2003 02:06
@Scorpyo
The prob is in the part:



right logic, wrong part, but I will try what you said in the right part!

Thanks


-RUST-
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 13th Sep 2003 02:08
I'll have a look tomorrow...


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Sep 2003 00:11
Still stuck but I guess TCA and Mentor won't be helping because I managed to piss them both off in other threads.

Oh well

-RUST-
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th Sep 2003 00:30 Edited at: 14th Sep 2003 00:31
Dont worry - you never, just been busy.

If what you want is what I think you want, then it would have been easy for you to know what was needed to be added, something along the lines of :



To animate the particles for a short while, hide them and then carry on if need be.

The example needs to be changed so it processor independant. You may need to adjust the particle setup slightly so they move slower.

You will also need to hide the particles when its game over time.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Sep 2003 04:47
AAAAACK! TCA - I am soooooooooooo stupid!
Thanks! That will do the trick.

<mutters to self various curses and clicks -POST>



-RUST-
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Sep 2003 05:27
TCA - Thank You I was soooo concerned with using timer+x vs. timer that I forgot to see the simplicity in just using a for-next loop where stoppage of the main DO-Loop didn't matter. I knew it was going to be something silly like this (like I said in original post) It always helps to have extra eyes look at stuff when you can't see.

Thanks again

Now I can get to making the visual media, and having the baddies "walk" like in original space invaders. I am sure I will be bugging you when I do Asteroids mock-up next.

-RUST-
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Sep 2003 12:26
Asteroids? you got soooo many choices there , Vector, Sprite or 3D for a start, real,faked or no physics for another, objects break up, objects replaced by smaller objects for another, smart, dumb or homeing saucers, hyperspace true random or smart, smart bombs or not ummm lets see, thats 3x3x2x3x2x2=216, hey! you could make 216 possible gametypes (not counting you could omit some options), how about you have a option screen to allow you to set all of the above , or you could just write 216 different games <he said innocently> , just a thought.

Mentor.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th Sep 2003 13:33
Dont forget the wait command so be replaced with something better and computer speed independant.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester

Login to post a reply

Server time is: 2026-07-23 12:44:13
Your offset time is: 2026-07-23 12:44:13