|
-
Feb 24th, 2001, 01:19 PM
#1
I got an assignment in school to create a game. I'm using DX7 and VB to create it. I have a couple of problems with it:
- The background of the game is constant, and blitting it on the buffer every cycle in my loop eats up a lot of time. Since it's a constant background, can it be 'fixed' to the buffer so it will always be it's background?
- The second problem is that the game is supposed to run on the computers in my school. I'm creating the game at home on a 733Mhz proccessor, and the speed looks fine to me, but on the computers in my school it will probably be slower. How can I keep the speed constant no matter where I run the game?
Thanks!
-
Feb 24th, 2001, 02:25 PM
#2
Fanatic Member
Q1. You will have to blt it to the surface each time around in the loop, but as long as you are keeping it on a seperate surface to where the only thing you have to do is blt it then I wouldn't worry about the speed.
Q2. I run a P1 200 mhz 32mb ram system with no real graphics card to speak of and everything I've done in DX7 ran really smooth so I wouldn't worry about it.
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Feb 28th, 2001, 12:12 PM
#3
Retired VBF Adm1nistrator
1 ;
If you're using a control to blit to, then just set its background picture/colour to some value, and then blit on top of that.
In my game im blitting onto a form, and I just set the background color = vbBlack to make it look like space.
Then i used shapes to make starts, and then I blitted the bitmaps on top of that for other ships etc.
2 ;
If you want the game to run the same speed regardless of the spec (within reason), then throw in some GetTickCount() into a Do...Loop
Take a look at the thread I posted a few days ago.
Look in the main form, at the RunGameLoop.
Thats how I do it in all of my games.
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
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
|