MichaelAquilina / Some-2D-RPG

Tinkering with Game Development
MIT License
28 stars 5 forks source link

performance extreamly low #1

Closed kernelENREK closed 11 years ago

kernelENREK commented 11 years ago

i just clone the repo and build the code (Visual Studio 2010 + XNA4) On my machine runs only at 2 FPS :( I have several XNA's source codes that runs pretty fine to 60 FPS Atlhon 64 X2 5600+ @2.90 GHz ATI HD 4870 GDDR5 1 MB RAM

My PC should move your code propertly but runs only to 2 FPS

Any sugestion?

Thx btw

MichaelAquilina commented 11 years ago

Hi kernelENREK, thanks for giving my project a look. I cant seem to reproduce your issue on several machines.

Could you just confirm for me if your graphics card is 1MB or 1GB? (I just want to confirm you didnt make a mistake because 1MB is very very very low).

If that fails, could you press F7 when running the game and take a screenshot when the performance statistics show up?

Thanks once again.

kernelENREK commented 11 years ago

Hi KillaW0lf04. You are right. I made a mistake. The ATI HD 4870 has 1 GB DDR5 RAM not 1 MB :)

I take this ss with F7 info displaying: http://i.imgur.com/HY13DqN.png As you can see the FPS show 2,0 FPS. The engine runs soo low that the Hero texture not displayed.

behindcurtain3 commented 11 years ago

For what its worth, I cloned the repo also and it runs fine on my core i3 laptop.

MichaelAquilina commented 11 years ago

Hi behnindcurtain3, thanks for posting. I tried running the project on two other relatively underpowered machines and it seems to run fine for me too. Thanks for confirming this is the case for you too though :)

kernelENREK, from seeing your screenshot, you either cloned a bad changeset OR you have a conditional breakpoint somewhere that is causing a huge overheard for you.

Could you try: 1 - pull the latest changesets using git pull 2 - Run the program in 'Release' mode to see if it makes any difference for you. In release mode, breakpoints are ignored so it would rule slow performance from those out.

From your screenshot i suspect the issue is because of some bad changeset i might have pushed by mistake since there are numerous strange artifacts on the screen which would normally not show for me (For example, your coins have a huge y-offset from their shadow which is normally not the case. Also as you pointed out - there is no Hero texture showing).

Let me know if that helped in any way! Mike

kernelENREK commented 11 years ago

Hi KillaW0lf04

I followed this steps:

1) Downloaded ZIP repo from Github project page using the ZIP option 2) Using Git tool in order to clone the repo

In both cases building the solution (even in Release or Debug) i get only 2.0 FPS

I just try to change from HiDef to Reach XNA profile. But in Reach profile there is a runtime exception in TeeEngine.cs at Line 488 ---> spriteBatch.End();

Exception Message: Reach profile XNA Framework requires TextureAddressMode be Clamp when using texture sizes other than powers of two.

I tested my XNA sources and runs fine. For test some "non-my-sources" i cloned this: https://github.com/Pepsi1x1/XNA-4-Racing-Game-Kit

And here a SS: http://i.imgur.com/C0cnMDV.jpg

I get the same FPS (over 50-60 FPS) in window mode or fullscreen mode (1680 x 1050) with all effects / shaders ON.

I can't understand why your code runs sooooo extreamly low in my machine :(

MichaelAquilina commented 11 years ago

From seeing the exception thats being thrown, could you try out the following:

In Some2DRPG.cs there is a variable by the name 'SamplerIndex'. Change this value to 1 so that the index points to the SamplerState mode 'PointClamp'.

Its a shot in the dark, but the exception you mentioned in your post makes me think it might be worth a shot to try. Make sure that when the game begins, the debug information on the top left panel shows 'SamplerState: PointClamp'.

Thanks once again :)

MichaelAquilina commented 11 years ago

KernelENREK, i have just pushed an update that should provide an improvement to the overalls game performance. Maybe you'd like to pull the latest changes and see if its made any difference for you?

MichaelAquilina commented 11 years ago

I am going to close this bug off. No feedback has been given - during which time a large number of changes have been made. If another report is made specifying that performance is still low, i will re-open this bug.