Author |
Message |
hello
|
Posted: Thu Apr 24, 2003 4:05 pm Post subject: How can you have real time? |
|
|
how do u have multiple procs working at the same time
we are making a space shooter
we need real time ship movement
while we are shooting and moving
we created a movement pattern and shooting
but unable to do at same time |
|
|
|
|
|
Sponsor Sponsor
|
|
|
JayLo
|
Posted: Thu Apr 24, 2003 4:30 pm Post subject: (No subject) |
|
|
processes |
|
|
|
|
|
Blade
|
Posted: Thu Apr 24, 2003 5:39 pm Post subject: (No subject) |
|
|
or do it in one big loop, and use View.Update at the end |
|
|
|
|
|
Tony
|
Posted: Thu Apr 24, 2003 6:10 pm Post subject: (No subject) |
|
|
no processes. Thats bad... use processes only for background music.
Just put all your procedures into the same loop and use hasch to bypass getch if no key is pressed. Better yet Keybaord.KeyDown (i think) in v4.x compiler.
and just use View.Update will speed graphics up so it doesnt look like something is out of place |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Blade
|
Posted: Thu Apr 24, 2003 6:25 pm Post subject: (No subject) |
|
|
pretty much what i explained... but i assumed he was already using hasch or Input.Keydown |
|
|
|
|
|
hello
|
Posted: Sat Apr 26, 2003 2:13 pm Post subject: (No subject) |
|
|
yeah i'm using input.keydown for movement
the main problem is that my ship can't move when it fires
basically one has to wait until the projectile clears the screen before it can move again
i've thought and thought of how to re-arrange the structure but it's stumped me
if i can solve this then firing multiple projectiles shouldn't be a problem ....... hopefully |
|
|
|
|
|
Tony
|
Posted: Sat Apr 26, 2003 2:34 pm Post subject: (No subject) |
|
|
well your program's structure has to be like this:
loop
move ship
if missiles on screen
for i:1..maxmissile
move missile(i)
end for
end if
move enemies
calculate w/e else you need
%at this point everything have moved 1 step according at its individual speed
View.Update
end loop |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|