PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Speed Topic

Hello,
I have been coding a turn based strategy game for one of my computer science classes, and I just realized that it runs painfully slow on my P4 2.53 with a Geforce4 4200. It runs just great on my laptop that has a cheapo Intel graphics card.

I was wondering if this is just inherent in GapiDraw, or if there is something I can do to fix it?


Just in case, here are my config settings:
Code:

config.hInstance = hInst;
config.pAppTitle = TEXT("CS309");
config.dwWindowIcon = IDI_CS309GAME;
config.dwDisplayMode = GDDISPMODE_NORMAL;
config.dwTargetFPS = 30;
config.dwDisplayFlags = GDDISPLAY_FULLSCREEN | GDDISPLAY_BACKBUFFERVIDMEM;
config.dwDisplayWidth = 800;
config.dwDisplayHeight = 600;
config.dwDisplayHz = 75;

Try force-creating the backbuffer and all surfaces in system memory. Check this document for more info:

http://www.gapidraw.com/doc/205/doc-videohw.htm
Thanks Johan, I was thinking backwards when creating my surfaces. Everything runs great now!
The above post was me, thanks again Johan. I do have one more question though.

I am trying to make myself a new font, but after I created it,the font just doesn't want to display.

The odd thing is,when I use a font from an old game it works just fine. I dont see any difference, the color keys are the same, and the kerning lines are there. I am using the same parameters in the program also.

Is there anything you can think of that I might be doing wrong? I swear I had this problem before and got it to work, but right now the answer is escaping me.
Read caveat #1 in the documentation for CGapiBitmapFont::CreateFont( ) as I've been bitten by it before. Also be sure that you have as many characters in your font as you have defined for the font definition string.

If you want to post your font here (or email it to me) I'll be happy to take a look at it for you.
I was trying to use a new advanced font, I got one that works now.

I think that there were some missing letters in the first font I was using.

Thanks for the advice ppcStudios!