aliens

Author Topic: OpenXCom very slow even on good pc?  (Read 12663 times)

Offline Istrebitel

  • Sergeant
  • **
  • Posts: 46
    • View Profile
OpenXCom very slow even on good pc?
« on: August 08, 2011, 05:48:13 pm »
Greetings.

Had not much time to dig the code, but one general thing that i noticed right now is that the game is extremly slow for that kind of graphics and the PC i have. It goes just terribly slow on my work pc, and still goes slow on my home PC. My work PC isnt very great all right (still its a normal modern office pc), but my home PC is one kinda powerful RIG (can manage stuff like Crysis, Age of Conan, Bulletstorm etc on pretty high settings with no FPS problems, 4gig ram, intel quad core, dont remember eactly which, one of the best graphics on gtx280 chipset, generally, it is fast!).

OpenXCom, however, behaves suggishly, like its having some graphical or processor issues. Rotating globe, walking soldiers, everything does not feel "smooth" like, for example, dosboxed X-Com or windows X-Com with seb76 ufoloader feels.

Can this be caused by some problem at my end?
Or is it a known feature that's getting a fix eventually?
What can be the problem, really?

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #1 on: August 08, 2011, 10:04:38 pm »
Is this a binary you build yourself, or an exe from the auto-build, if yes, which one?
I know if you build a debug version in visual studio it's also slow on my quad core.
There was an issue with text rendering a few builds ago, where I also noticed hickups, due to inefficient use of surface locking to manipulate pixels... sigh :)
But that should be better in the latest builds.
PS. graphics card will not make any change as it is not using any (it uses software rendering)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #2 on: August 09, 2011, 04:54:14 am »
OpenXcom is not the most efficient optimized piece of software on the planet. This is probably due to various factors. I can't speak for Daiky, but I am not the most efficient optimized coder on the planet. I do not know how to get the most efficient optimized power out of SDL (if anyone has any handy pointers feel free to tell me, because every SDL tutorial is painfully basic). I do not know how to implement certain things in the most efficient optimized way, since the X-Com code is a mystery. But it mostly works fine and I can't imagine a lot of people wanna dig down and fix the ugly inefficient messes that may lurk within. :P

Relying on SDL software rendering probably doesn't help but I know there's some people who like running it on low-end devices which don't have much of a GPU for OpenGL. Also some stuff may be intentionally sluggy, I think all the Battlescape movement and animation speeds are fixed to make it easier for Daiky to debug.

The globe... we do not speak of the globe...

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: OpenXCom very slow even on good pc?
« Reply #3 on: August 09, 2011, 12:36:17 pm »
I just downloaded the GIT BUILD version 0509_2011_08_08 version and ran it in windows Virtual machine, the speed even on the globe is at least as As good as the dosbox version i always use.  I don't have time to give it a FULL run tonight but i will this weekend.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #4 on: August 09, 2011, 12:45:45 pm »
I think I might have an idea of something that could be done more efficiently - I'll have a look at it this evening.

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #5 on: August 09, 2011, 01:26:47 pm »
I just downloaded the GIT BUILD version 0509_2011_08_08 version and ran it in windows Virtual machine, the speed even on the globe is at least as As good as the dosbox version i always use.  I don't have time to give it a FULL run tonight but i will this weekend.

You know there is fps counter? Press F12 in game.

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: OpenXCom very slow even on good pc?
« Reply #6 on: August 09, 2011, 01:52:49 pm »
I hit F12 several times in game both on the geoscope screen and in battle , No FPS counter that i could see. I also found a Error when craft returning to base after reaching way point. If there on the left of the base they travel all the way around the globe to return to there base.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #7 on: August 09, 2011, 02:52:59 pm »
actually F5 is the FPS counter, F12 creates screenshots  :)

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #8 on: August 09, 2011, 09:28:00 pm »
So, bug in readme? ;)

Quote
F5 - Saves screenshot to USER folder.
F12 - Turns on/off FPS counter.
ALT-ENTER - Turns on/off fullscreen mode.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #9 on: August 10, 2011, 12:31:27 am »
Istrebitel, I did a small optimisation in the text drawing, it might help. Could you test the latest autobuild and see?

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: OpenXCom very slow even on good pc?
« Reply #10 on: August 10, 2011, 01:47:26 pm »
My FPS range from 250 to 320 in bATTLE AND 260 - 280 on the geoscope

Offline Istrebitel

  • Sergeant
  • **
  • Posts: 46
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #11 on: August 29, 2011, 11:32:13 am »
Please excuse my disappearing like that. Alot of RL matters interfered...

Yes i am indeed using a debug build so that might cause the problem, if debug is proven to be slow. When i find time again i'll try to build a release build and see if that helps

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: OpenXCom very slow even on good pc?
« Reply #12 on: August 29, 2011, 03:14:01 pm »
Yes i am indeed using a debug build so that might cause the problem, if debug is proven to be slow.

Oh noes !! I have been optimising the hell out of it, all for nothing :p
Hehe, just kidding.

Debug build is slower than release build. So I'm actually glad to hear that it was indeed a debug build.