|
-
Mar 21st, 2003, 09:44 AM
#1
Thread Starter
Fanatic Member
Form_Load or SubMain for game loop
I was just looking at a site with DirectX for VB tutorials. The first one explains how to get started, getting a DX window up and running.
The part I am curious about is the main game loop and garbage collection is in the Form_Load event which means the Form_Load procedure doesn't end until the app has ended.
In some tutorials I have seen the game loop in a module in a SubMain procedure.
Which is better Form_Load or SubMain?
-
Mar 21st, 2003, 12:24 PM
#2
Fanatic Member
For a small program, or an example, use Form_load, for a big program, put all your code in modules and you can use sub_main to call the beginning, then form1.show or w/e. I think sub_main is a little faster because it loads the code right away.
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
|