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.

Author
Message
PGAOE6
19
Years of Service
User Offline
Joined: 27th Jul 2005
Location:
Posted: 8th Sep 2005 12:23
Hi, know I've been a pain, promise this will be last question for a while and I'll leave all you good people in peace

trying to initiate some code that loads up an ending screen when the player completes my game. The player completes the game by coming within five metres of an object. I want DB to show a bitmap and play a mp3 file, and after a pause and end the game.



Here's my code so far, anyone got any ideas?

Cheers,

PG
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 8th Sep 2005 15:29 Edited at: 8th Sep 2005 15:30
here's some psuedo code...

Quote: "
If you want to end the game
---play music
---paste bitmap
---wait for however long
---end
endif"


not really sure what the problem is

"We make the worst games in the universe."

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 8th Sep 2005 16:05 Edited at: 8th Sep 2005 16:06
if dist7# < 2.5 and objcol# = 6
load music "endmessage.mp3",1
play music 1
copy bitmap 2,0,0,640,480,0,0,0,screen width(),screen height()
sync
repeat
until music playing(1)=0
end
endif

should do it, I started the sound right after you get within finishing range and removed the 5 second wait, for most people 5 seconds is a long time with nothing happening, long enough for them to think "crash" and ctrl/alt/del out of it imo, best to always leave the program doing something, at least then the user knows they didn`t do anything wrong or crash the program, my rule of thumb is NEVER use wait in programs, the cpu time can be put to better use than that.



the average IQ is 100...but the people that took the test where trying to look smart. most people don`t go over 50.
Area 51?, I`m more intrested in what they have in areas 1 to 50
PGAOE6
19
Years of Service
User Offline
Joined: 27th Jul 2005
Location:
Posted: 8th Sep 2005 17:55
Peter_ and Me!, thank you very much for your sage advice, have now finished my game and should hopefully now become and MSc.

Love it!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 8th Sep 2005 22:22
Wha? You can get an MSc these days for writing a game in DBPro? Where? I want one too!

Login to post a reply

Server time is: 2025-06-05 19:00:23
Your offset time is: 2025-06-05 19:00:23