Game Development Community

MacOSX lags

by James Tadeo · in Torque Game Engine · 10/10/2005 (7:42 pm) · 15 replies

Well, I am tinkering and trying to learn the ins and outs of the Torque Game engine and making copious notes so my pea brain doesn't forget what I was doing. Anyway, I got a chance to compile an OSX version of the Starter FPS had a few friends both Mac and PC try it out. At its basic all works fine and we have a grand old time at some amateur gaming.

Here's the problem: ---> The Mac clients lag like crazy. It is soooo slow compared to the PCs.

Needless to say, when we had a *fun* Mac users vs. PC users game, the PC user handed the Mac guys their...er...lunch..

So, does GG plan to update a more Mac optimized version or are there any *easy* optimization techniques except to tell my Mac brethren to get a a PC for gaming (lol)? I've seen some of the optimization techniques, but to be honest, while I have some comfort in programming, I am a total newbie when getting my hands dirty with the suggestions on recompiling and mucking around with code. That's why I bought the GG products. Now if I were given a set of good tutorials with no assumptions, I could probably do it.

Any suggestions or help would be great.

Thanks for your time everyone. This is one of my fav destinations these days. The community is so helpful.

You only know what you know, you know?

#1
10/10/2005 (9:05 pm)
@James, have you tried any of the commercial Torque-based games for Mac OS X, such as Orbz or Marble Madness? Orbz plays AWESOME on my G4/300Mhz w/ older ATI Rage video card. It's very smooth and playable, even on that low-end hardware so I am wondering if there is something else causing your lag issues?
#2
10/10/2005 (9:07 pm)
That said I don't use Mac OS X day to day I am mainly developing on WinXP, for other reasons.
#3
10/10/2005 (10:11 pm)
Hey Alex,

Nope. I picked up Torque around Mid September and just getting into it. Lots of fun. The gams you mentioned, are they multiplayer games?

:)
#4
10/10/2005 (10:17 pm)
Orbz is multiplayer, but I can't remember if marble blast is. One difference may be that these games are pretty lightweight- the terrains aren't that big and most of the textures are small and models are quite low-poly.

I think the FPS Shooter mod is meant to look better on higher end hardware. These Mac users- what kind of hardware specs were they running?
#5
10/10/2005 (10:27 pm)
Alex,

My Mac friends are all on G5 and some have dual. I have a G4 (lowest common denominator) and it works very slow as well. That's a good point you brought out about the polygon count and it being lightweight. I am using the standard issued Starter FPS Kit that came with the download and using that to learn from.

I am trying to learn the scripting side for Torque, but to be honest, the mountainous amount of info here is stagerringly overwhelming, seems every click and link leads me off to a more complex version of an answer to my question. At the end of it, I am further away from my original question as there is assureadly something that catches my attention.

Maybe, I'll try to get a lighter version going. I'm gonna see if there is any more info about this...Seems a shame that the OSX doesn't have the same comparable speed as PC.

At some point, it will most likely be both a hardware and software issue and the optimization that would be required. (...ya think?)

(...ok, that didn't make sense, but...it's gotta be one of the other right?...oh fergit it...I need to get some sleep...lol)
#6
10/10/2005 (10:33 pm)
Wow- a G5 dual proc; anything should FLY on there especially the Starter FPS. That's surprising. Anyways if you install Orbz and look at the .dts files and the texture images (no scripts they are compiled) you can see it's extremely lightweight and built for speed.
#7
10/10/2005 (10:34 pm)
And James I am in the same boat you are- although I still intend to write a 3D game using TGE, my very first game is going to be a 2D puzzle game with T2D :-)

[edit: I am in the same boat, but have about +1 year on you :-) ]
#8
10/11/2005 (6:27 am)
What version of Torque where you using? I think the 1.4 (in CVS right now) has optimizations for the Mac platform. On my iMac G5 (Rev A 20") 1.4 ran the demo much smoother than 1.3.
#9
10/11/2005 (6:57 am)
Hi Craig,

I purchased the Torque for OSX about 2 weeks ago. I would guess that it would be the latest version-yes? I checked using get info and it really didn't tell me much, at least I didn't see the version number. I still have much to learn. When I run the Starter FPS Kit locally, it is fairly smooth and one can have a decent game hunting down that tireless orc.

It's actually when you join the server and play against others that the lag really happens. At least that's what I've personally seen on my G4 and what I've heard from at least half a dozen Mac guys. They are such a passionate group :) This obviously escalates in a "Mac sucks" taunts from my nerdier PC friends. And me, well, your poor wanna be Torque developer i stuck in the middle again. lol...

If you would like to try a game by getting your iMac to join my server let me know. It may become more apparent when you play a game via the server. Mind you, if it does play really well on your iMac, I would like to know. Maybe I got this all fudged up.

[I woke up this morning and this was the first site I went to...what does it all mean? Is that bad? :)]
#10
10/11/2005 (7:47 am)
If you are just using the download from purchasing the SDK you are using 1.3. 1.4 is still underdevelopment and only available through the CVS server. I have not tested network compatibility from 1.3 to 1.4 so I may not be able to connect to your game. I have also not tried extensive network play as I to have only recently purchased the SDK. I just wanted to make sure you knew some optimization happened in 1.4 which may benefit your scenario or then again may not.
#11
10/11/2005 (7:52 am)
Hi Craig,

That is great news about 1.4. I definitely will keep an eye out for it and see if might alleviate the lag times...

At this time, being very new, I have yet to discover the whole CVS server and its implementation. If you have a link handy, I wouldn't mind checking it out.

Thanks for that tip.
#12
10/11/2005 (7:54 am)
Here is a link to the CVS faq. You can also google for many CVS manuals and references only for general CVS usage.
#13
10/12/2005 (12:55 pm)
Have you all seen this resource?

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6393

The demo had some serious lag on my dual G5, but once I compiled with these optimizations it ran like the wind.
#14
10/12/2005 (3:31 pm)
Wow! this place is amazing. This is truly an active community. I am so use to waiting days to get a reply...seems there is always someone milling about here...

Rubes, thanks. I will check that out a bit more. I have seen that resource, but to be honest, I would like to know exactly where in terms of line numbers and file names those optimizations are suppose to go. Is there a config file in the Mac version? is it the game engine code? what files am I suppose to open and add these optimization *flags* ?

Unfortunately, for the seasoned newbie that I am, it is over my head at this time. For example:

"Altivec Flags

In order to make use of altivec you must use the following flag (which defines __VEC__ which you can check for in order to enable or diable altivec optimizations in your code).

-faltivec"

The term "-faltivec", for example, where does that get implemented. What file and line number do you put that in? What is the context and etc.

Thanks all for the replies and suggestions. I really appreciate it.

Cheers!
#15
10/12/2005 (5:37 pm)
@James: Those flags are flags that must be sent to the compiler. You're probably using Xcode. The compiler flags are set in the Targets. There's a group in Xcode called 'Targets', it looks like a bulls-eye. Open it, then double-click your active target. You'll get a new window with a list down the left hand side. In that list you'll see GCC Compiler Settings. Click it. On the left, you'll now see a new pane, called GCC Compiler Settings. At the bottom of that pane is an edit box called Other C Compiler Flags. That's where you put the flags, such as -faltivec. Use spaces to seperate the various flags.

Here's a very nice article about how to use gcc, and how it works: developer.apple.com/tools/gcc_overview.html
To see a complete list of the possible compiler and liker flags, read this fine manual: developer.apple.com/documentation/Darwin/Reference/ManPages/man1/gcc.1.html