|
-
Dec 27th, 2002, 01:47 PM
#1
Thread Starter
Member
Game Loop
I'm making a game and the game loop has a lot of loops in it which are slowing the game down. Does anyone know a way to have the game loop continue while the Loop inside to Game Loop is running?
-
Dec 27th, 2002, 03:37 PM
#2
Frenzied Member
paste the other loop code into the first loop instead...
-
Dec 27th, 2002, 06:57 PM
#3
Thread Starter
Member
That's what I'm doing.
What I want to do is let the game loop continue while the loop inside it is running.
-
Dec 27th, 2002, 07:54 PM
#4
Hyperactive Member
... you will need two seperate game loops running simultaneously to accomplish this. but the DoEvents you would need to put in both to have it work would defeat the purpose. do what cyborg says and combine them - or make the inside loops VERY SHORT. sorry I can't be of more help.
If I agree with you today, don't get used to it.
-
Dec 27th, 2002, 08:31 PM
#5
Thread Starter
Member
I think what I need to do is create a new thread, but I don't think I can do that in VB.
-
Dec 27th, 2002, 10:38 PM
#6
Frenzied Member
hey....your code probably look something like this
VB Code:
While blah
'Some Code
While blah2
'Some Other Code
DoEvents
Wend
DoEvents
Wend
'Change This to
While blah
'Some Code
'Some Other Code
DoEvents
Wend
if you dont want the other "loop" to run at the same rate, just create a variable and use it to check if its time to do the code!
-
Dec 28th, 2002, 09:40 AM
#7
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|