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 / Multi -task help please

Author
Message
Maverick
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 14th Oct 2002 02:11
I thank all those who replyed to my last post, but I guess I wasn't clear about my question. What I can't really figure out is how to lets say, make a bomb count down as a player is running away from it, things along that line. I seem to be stuck getting my mind around how to turn something from a Turn based type program into a Real time type of program. Are there any open source programs that I could see and try to learn from?

Thanks
Maverick
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 14th Oct 2002 04:50
Also is there anyway to create a directory in a ftp address?

Rodro
21
Years of Service
User Offline
Joined: 17th Sep 2002
Location:
Posted: 14th Oct 2002 06:40
Create variables to keep track of each position of each object. INC each one, then when the screen updates (the SYNC command) For example:

INC(bomby)
INC(runnerx)
(Display objects - sprites or whatever)
SYNC

The actual movement happens off screen then the SYNC command shows the off screen screen and the illusion of two objects moving at once takes place.

Hey!! You talking to me?
waffle
21
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 14th Oct 2002 06:44
looking in the book, FTP make dir... Nope.
but i really would not wan't someone modifying my
computer in that manner. Normally i just have one dir that can be shared, and thats all you get

as to your count down timer, thats easy stuff there.
first make 2 globals to monitor bomb status....
global BombStatus as integer
global BombTimer as integer
lets say someone drops a bomb
BombStatus=1
BombTimer=Timer()+10000
note, 10000 is a 10 second delay as the system timer
is in milisecs....
then, to see if the bomb explodes....
if BombStatus>0 and BombTimer<Timer()
KABOOM
endif
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 14th Oct 2002 10:18
When you use manual screen updating, everything that happens between one SYNC command and the next can be seen as happening practically at once, so just have one thing counting down as a section of your main loop.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM

Login to post a reply

Server time is: 2024-03-28 14:10:32
Your offset time is: 2024-03-28 14:10:32