Author Topic: Speed issues...  (Read 1733 times)

Anonymous

  • Guest
Speed issues...
« on: August 13, 2006, 07:30:03 PM »
I've been playing the windoze version of GH1 on this PC for a while with no problems, but for whatever reason, GH2 crawls, even on screens such as the character creation screen or the main menu.

I'm running an AMD Athelon 64 2000+ 2.0GHz machine with 448MB of RAM.

Gearhead.exe is currently taking 97-98% of my cpu usage, even though it is currently in the background.

Is there something I'm missing?

Anonymous

  • Guest
Speed issues...
« Reply #1 on: August 13, 2006, 07:31:10 PM »
p.s. By slow, I mean about a 2sec lag between hitting a key or moving/clicking the mouse and having a visible response.

Offline Epsilon

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • http://rgepsilon.deviantart.com
Speed issues...
« Reply #2 on: August 13, 2006, 08:38:05 PM »
Both versions of GearHead (in SDL, mind) suck up pretty much every spare cycle on my Athlon XP 2600+ clocked at 2.1GHz, 512MB RAM, graphics card, blah blah. I think it might be just un-optimized code, as opposed to... I dunno. Joseph should know, since he knows how complex GearHead really is. peter cordes might know, too.

Question: are you using the SDL version, or the plain roguelike interface?

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • http://www.wesnoth.org
Speed issues...
« Reply #3 on: August 13, 2006, 09:20:05 PM »
Do you have a proper ser of OpenGL support installed?
 Some graphics card even nice ones dont have it now..

Anonymous

  • Guest
Speed issues...
« Reply #4 on: August 13, 2006, 09:57:26 PM »
Googled my card, and found out that my video card supports OpenGL version 1.2.

Does GearHead require a newer OpenGL than that?

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • http://www.wesnoth.org
Speed issues...
« Reply #5 on: August 13, 2006, 11:15:09 PM »
Sometimes the default installed drivers just doesnt support OpenGL and you have to update them from the vendor..
 I just got a new computer yesterday (for free so crappy inboard graphics chipset) and was looking at the Intel page...
<-------------------
The Intel? 82945G Express Chipset Family supports hardware acceleration of OpenGL* applications in 16-bit and 32-bit color depths. OpenGL* 1.4 plus ARB_vertex_buffer and EXT_shadow_funcs extensions and TexEnv shader caching is the latest version currently supported by the Intel? Graphics Media Accelerator Drivers. Drivers that come with Windows* or that are downloaded from Windows* Update typically do not support OpenGL*. For optimal performance of OpenGL applications, install the latest graphics drivers from Intel. Also, exit any running background applications, such as virus scanners, NetMeeting* or any programs that run in the task bar.
------------------>

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
Speed issues...
« Reply #6 on: August 14, 2006, 12:36:13 AM »
Two questions: What OS are you using, and are you using the OpenGL or the ASCII versions?

It seems that certain computers have problems with both versions of GearHead. I expect that problems with the OpenGL version are due to graphics card incompatabilities or driver issues, but I'm at a loss to explain why the ASCII version runs slow on certain machines.

Anonymous

  • Guest
Speed issues...
« Reply #7 on: August 14, 2006, 02:56:36 AM »
The ASCII version is working fine... It's the OpenGL that's not.  I'm on XP.

As far as why it's running slowly, it's likely the OpenGL drivers.  I've heard there's a way to opt to do software rendering for OpenGL, but I don't know if that has to be on the developer's end, or if it's something I can change in my video settings.

Most likely, though, the problem is caused by a difference in syntax.  OpenGL 1.2 is what my video card is capable of, and if the game is written in a newer version, there are likely compatablility issues because of it.  Depending on what extensions you're using, it may just be a question of compiling the game AS an OpenGL 1.2 project.  I'll leave that up to the developer to investigate (or not) as he sees fit.

Offline peter

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Speed issues...
« Reply #8 on: August 14, 2006, 06:54:46 PM »
Edit: sorry, I just noticed the original poster said the ASCII version works fine.  Oh well.

Quoting: Epsilon
I think it might be just un-optimized code, as opposed to... I dunno. Joseph should know, since he knows how complex GearHead really is. peter cordes might know, too.


 Well, gearhead does a lot of slow things, like crunching through the list of all gears on the gameboard many times as each AI decides what its going to do.  The ASCII version doesn't take any CPU time while sitting there waiting for a keypress.  That would be bad.

 A quick test:  the ASCII version running on Linux (Athlon64 3200+ (1.0GHz), 1.5GB RAM), walking around in Mauna, pressing right arrow about five to ten times a second, with 6 lancemates/pets, and a lot of crap in the field HQ, gearhead takes 30% CPU time.  Holding down the arrow key makes my CPU frequency jump up to the max (2.2GHz).  Bumping against an obstacle holding down the arrow key, my CPU mostly stays at 1.0GHz, and gearhead+xterm+X server take ~60% of the CPU time.  This is in a 120x50 xterm.  My vid card has good 2D acceleration, so that helps.  I've seen gnome-terminal on some video cards be really slow when paging back and forth in a man page, but I don't have that problem on this machine (and I use xterm, which never has that problem, not gnome-terminal, anyway.)  My version of gearhead is compiled with   <tt>fpc -XD -O2 arena</tt>.

 So gearhead should be playable on systems much slower than mine, esp. in ASCII mode.

 I still haven't tried SDL gearhead on a different machine, and it doesn't work on this one.  Oh well.

 As for openGL:  It's not so much the video card that "speaks" openGL.  It's the drivers.  If a program does something that the hardware doesn't support, the drivers have to do it in software, which will be dog slow.  Like I said, I have no experience with SDL gearhead.  If it eats CPU time while waiting for user input, that's a serious bug.  (unless it's just from animating sprites that move while the game is idle.)

Anonymous

  • Guest
Speed issues...
« Reply #9 on: August 15, 2006, 03:00:28 AM »
Quoting: peter
As for openGL: It's not so much the video card that "speaks" openGL. It's the drivers. If a program does something that the hardware doesn't support, the drivers have to do it in software, which will be dog slow. Like I said, I have no experience with SDL gearhead. If it eats CPU time while waiting for user input, that's a serious bug. (unless it's just from animating sprites that move while the game is idle.)


That's what I initially thought.  If I'm on the character creation screen, there's no animation happening.  It's simply static images.  That should not be taking 100% of my CPU cycles.  That and the fact that I've run commercial OpenGL games successfully on this machine makes me think something else might be going on...

Offline Reaver

  • Newbie
  • *
  • Posts: 40
    • View Profile
Speed issues...
« Reply #10 on: August 19, 2006, 02:08:56 AM »
I've run both the ASCII and the OpenGL versions on my Celeron PoS...

2.4GHZ 128kb L2 Cache
256mb PC2100 DDRRAM
64mb GeForce 2 MX440 4x AGP

They run fine. Even with Dialup Compression, Firefox, MUCK, WLM, and JetAudio VX running at the same time. However I notice some lag in ASCII at the beginnings and in automatic messages. A little bit.

Considering I have trouble running HALO above 25fps, I think that's there is no major problems.

Offline Anticheese

  • Hero Member
  • *****
  • Posts: 651
    • View Profile
Speed issues...
« Reply #11 on: August 19, 2006, 06:06:02 AM »
The ASCII version can run a little slugish on the computer I am currently using (my main one got eaten by a virus), When my Mecha was walking back from a particulary rewarding battle with salvage the game started to freeze, Now because my mech was only traveling at 20 units per turn I can attribute the slowdown to the clock.

Why? Each update cycle can only complete AFTER the clock has stopped spinning, and when it takes 2 minutes to move one tile things start to get laggy.

Is there any way to remove the dependance on the clock?

Offline Reaver

  • Newbie
  • *
  • Posts: 40
    • View Profile
Speed issues...
« Reply #12 on: August 19, 2006, 11:21:58 AM »
I'd have to say that it's possible to remove in GH2, but in GH1 it'd be much more difficult because it would involve rewriting alot of things? Unless you were to simply advance the clock... But that would mean most NPC's would begin to move faster, no?

Offline Anticheese

  • Hero Member
  • *****
  • Posts: 651
    • View Profile
Speed issues...
« Reply #13 on: August 19, 2006, 08:11:28 PM »
What if the effect that makes the clock scroll upwards (I.E 2:0,2:1,2:2,2:3 instead of just 2:0 and 2:3)? or just speed it up by skipping a few numbers?

Offline Reaver

  • Newbie
  • *
  • Posts: 40
    • View Profile
Speed issues...
« Reply #14 on: August 20, 2006, 03:16:53 AM »
You could increase the seconds increment, I guess.