PDA

View Full Version : Hardware Acceleration, No longer doing anything!



andrew2110
14-10-2006, 11:37 AM
Hello. I've been working on my game for a few months now and have recently started using two different surfaces as an attempt to try and improve frame rates. However frame rates have stayed the same and now the game doesnt seem to use any hardware acceleration whatsoever! It runs at 100FPS on my Dual 3.4ghz processor with x850xt graphics card, but only 20FPS on my friends 2.4ghz opteron processor with two 7800GT graphics cards, which leads me to believe my game is no longer taking advantage of any hardware acceleration, despite the DXDraw options.

Below is a link to the latest version of the games client (it is a MMORPG). To login you can either just click 'Login' or if the test account is in use, making a new account takes about 5 seconds.

Latest Client Download (http://www.blue-omega.com/Client.zip)

Thanks in advance for any help!

tanffn
14-10-2006, 01:10 PM
Neat! :)

well here I got 20-22FPS; AMD 64 3500+, 1GB 400MHz ram, GeForce 6600, XP sp2

andrew2110
14-10-2006, 01:26 PM
thanks for trying it out for me! I've done a little extra reading and found that TDirectDrawSurfaces are not hardware supported (please correct me if I'm wrong!). I'm going to undo the work I've done now on making use of two surfaces as I need it to be hardware supported.

If anyone else wants to try the game out and has any comments about it, I'd be glad to hear what you have to say!

Basically the game is a MMORPG version of pokemon. The idea being that you explore an alien planet capturing alien creatures as you go. Still to be implement are:

Player Vs. NPC Battles
Player Vs. Player Battles
Quest Areas....

Thanks again!

AthenaOfDelphi
14-10-2006, 01:29 PM
Hi Andrew,

I just tried to login to give you some idea of how it performs on a somewhat antiquated Athlon 800, but I couldn't login... account in use and I couldn't create a new account. I got the little window to select eys, hair etc. but I couldn't create an account.

Just an idea, which is probably already on your list of features.... but its annoying if you want to play a female character and there isn't the option to.

If you can tell me how to create a new character, I'll create one, login and tell you how it performs on my old machine.

andrew2110
14-10-2006, 01:37 PM
hi thanks for trying to make an account. I think you may have been having problems logging in because I was playing around with the test account at the time. However you should be able to log on now with the test account. To create an account you need to ensure you have entered a different username, otherwise it will do nothing at the moment (I agree its very annoying it doesnt tell you whats going on when you try to create an account).

You will be able to play as a female character soon, I just am very poor at making the graphics for the game and it takes me such a long time to make new graphics. Sorry about that!

andrew2110
14-10-2006, 03:43 PM
just a quick update, i've found that hardware acceleration does work... kind of. With do3d set, it works ok BUT it looks like this:

http://www.blue-omega.com/Screenshot.jpg

which obviously isnt right. I've looked around the forum for a solution and have tried doing SetPrecisionMode(pmDouble); as someone suggested in this thread:

http://www.pascalgamedevelopment.com/forums/viewtopic.php?t=3422

but it didnt seem to do anything:(

Thanks again in advance for any help!

Speeeder
14-10-2006, 11:59 PM
uuhhh... Well, first thing that's different in software->hardware is the transparency. In software, you set the colour manually. In hardware, it takes the picture's top-left dot. The background... Well, seems like you haven't drewn it out well :) The goo on the bottom - looks like video card atrifacts... Those happen when the videocard is overclocked and cannot take the goodies...

andrew2110
15-10-2006, 09:13 AM
this seems like a very strange problem. I managed to fix a few problems (the players head not being drawn, the background not being drawn properly) simply by renaming them in their respective DXImageLists. The messed up UI bar was fixed by drawing it on the main DXDraw surface instead of its own seperate one.

I believe the problem to be down to the antialiasing that occurs automatically when DO3D is enabled. In most places, this is not a problem, but it's stopping my fonts from being drawn as most characters have a thickness of one pixel....

http://www.blue-omega.com/Fonts.jpg

Is there a way to turn anti-aliasing off?

ijcro
15-10-2006, 01:21 PM
Hello,

you can draw text as bitmap (use tpowerfont etc.) or directly like textout(). But drawing to canvas has to last operation (after all picture rendering, see to prototype code).

Ther transparent key sets up to coresponding the color space in DXDraws surface (the same color depth).

I don't ask you, where is error, I have to see technique of your coding or problematic image.

Regards

andrew2110
15-10-2006, 01:55 PM
Unfortunatley I get the same problem when using TPowerFont and DO3D. For now I'll just use TextOut() but this still doesnt solve the problem of antialiasing occuring in places where I dont want it to happen.

It doesnt seem to happen everywhere though, just on the characters themselves.

The code I use to draw peoples faces is:

Faces.Items[Face].Draw(Surface,X+XFaceInc[Frame],Y+5,Frame);
Eyes.Items[Eye].Draw(Surface,X+XEyeInc[Frame],Y+YEyeInc[Frame],Frame);
Hairs.Items[Hair].Draw(Surface,X+XHairInc[Frame],Y,Frame);

So am really not sure why its being anti-aliased when other parts of the surface such as the map tiles and background layers are left untouched....

ijcro
15-10-2006, 03:08 PM
And how is set transparen of picture in DXImageList?

andrew2110
15-10-2006, 03:13 PM
Each image in each TDXImageList has a red background, The transparency setting of each item in the list is assigned to true and transparent colour is set to CLRed. Is this the wrong way to do things? If so is there a tutorial for the right way?

Thanks for being so responsive :) It's really a great help to me!

ijcro
15-10-2006, 06:52 PM
I think that it is OK.

Paizo
02-01-2007, 02:55 PM
one or more years ago i got the same problem with delphiX.
my old pc with a voodoo2 doesn't use any 3D acceleration using auto detect and also by forcing it.
i never found the solution.

Diaboli
02-01-2007, 03:46 PM
doesent even start here.... the process fires up, but nothing (visible) happens... then it terminates on its own...

uses about 9 mb of ram...

dunno if this makes sense at all, but this is the information i got :P

EDIT:
hm... i had same kind of problem (text not being displayed properly), and now, thanks to you, i found out that if i set Do3D to false, it works! :D:D

Chesso
06-01-2007, 05:42 PM
I am having the same problem too.

I also noticed that setting Do3D to true in my game causes an access violation as soon as it starts..... lol.