Game Development Community

Is it Poly Slowdown?

by Jeff Trier · in Artist Corner · 03/13/2003 (7:30 am) · 21 replies

Hi all. I read that the Realm Wars Orcs are 2k polys each. And RW runs fast on my machine with a lot of players and effects on screen.

My problem is that I created a Vehicle model weighing under 500 polys. And if I spawn 4 on the screen, my computer comes to a crawl.

Is there anything that you guys can think of that is making this happen? I am thinking it *might* be code related. I created my vehicles and vehicle spawning code with the help of [url= http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3925]Mike Stoddart's Vehicle Tutorial[/url] (great resource btw!).

Also, is there a way to see info on your working code (like amount of loops running and other helpful items)?

Edit[Grammer]

Thanks all!
-Jeff

About the author

Originally a Classical/Metal musician, I've always been attracted to anything involving computers, including: Networking, PC Building and Repair, software design and coding. I've been involved with game design and development for over 10 years.

Page «Previous 1 2
#1
03/13/2003 (7:43 am)
Depending on what version of the engine your are using this could be contirbuted to a couple of things.If your using any head before Tim Gifts vehicles change then whats happening is your collision is impacting the terrain or a Static object and the collision cycles are bogging the engine down checking for collision.
Does your vehicle roll and run right? If it has hangup trying to get going you might need to adjust the shape of the collision or adjust the script to give you a little more lift. On your main spring.
datablock WheeledVehicleSpring(DefaultCarSpring)
{
   // Wheel suspension properties
   length = 0.02;             // Suspension travel
   force = 1200;              // Spring force  1000
   damping = 170;            // Spring damping
   antiSwayForce = 5;         // Lateral anti-sway force
};
Your going to want to make adjustments in that block of code.

Now if you are running the latest HEAD then it very well could be the same problem.
The collision is usually what gives me those same symptoms. I usually have to make adjustments between the script and the model to get my vehicle to handle correctly.
let me know if that helps
Matt
#2
03/13/2003 (7:56 am)
Thanks Matt.


I am using the latest stable build 1_1_2.

It could be the collision cycles. The vehicles run great actually, but they are 2 wheelers and are leaning on the ground. Perhaps that is the problem?

I will investigate more from the angle you suggest.

Thanks again,
-Jeff
#3
03/13/2003 (8:01 am)
The vehicle code has been significantly improved since 1.1.2. Download the CVS HEAD and try it out; you should notice a marked improvement.
#4
03/13/2003 (8:08 am)
Ahh, ok.

You know I wondered how updating works in Torque (never done it). Is there anything I need to know when updating, to keep my custom scripts from being erased?

I suppose I can just pop my scripts into a temp folder to keep them from being erased, or are these core code changes only?


Thanks,
-Jeff
#5
03/13/2003 (8:27 am)
I would recommend backing up your scripts. Getting a clean update from the CVS for the HEAD version and then using a tool like WinMerge or some other file merging utility to see and merge the differences you made to the scripts back into the latest versions of those scripts.
#6
03/13/2003 (8:27 am)
I never updated either. You could always back up your scripts.
#7
03/13/2003 (10:37 am)
Hey Robert, thanks for the heads up on winmerge. I was looking for something like that.


-Jeff
#8
03/13/2003 (12:25 pm)
Also, if you haven't looked at TortoiseCVS, you should :)

www.tortoisecvs.org
#9
03/25/2003 (5:40 am)
Hey all,

Well after I read this post a week or so ago, I put in the new head and integrated my scripts back into it. (It only took 4 hours! lol).

My vehicles are now 604 polys (inc. 4 tires), but I still get a significant drop in fps when I add each one.

No vehicles: 48 fps
1 vehicle: 43 fps
2 vehicles: 30 fps
3 vehicles: 24 fps
4 vehicles: 19 fps

I am using the same car code, I just replaced the model and added an extra mount point for the passenger.

I just did a test (make sure it wasn't my hardware) by logging onto a crowded Tribes 2 and getting as much as possible on my screen, and I get no lag there with 6+ players, 2+ vehicles, and explosions.

Also, this doesn't just happen with my vehicles. If I spawn in bots, I get roughly the same results.

As far as script changes go, I haven't added any loops, and all the functions I created are called only by a key press. So I *think* I should be ok on that end (maybe not?).

Has anyone else experienced this problem and/or has another avenue I can check to fix this?

Thanks,
-Jeff
#10
03/25/2003 (5:46 am)
I had a bizarre problem like that. I was spawning the air scout model, and it worked ok with two in there. But when they got shot, for some reason they spawned a new instance into themselves and the frame rate got lower and lower. I only had the air scout as a placeholder anyway, so it solved itself when I switched to the real model I was planning to use.
#11
03/25/2003 (5:52 am)
That's strange... Are you sure having a different model changed the scripts behavior? Did you have to change any of the code (other than the file name) when you put in your current model?

Thanks for the response,
-Jeff
#12
03/25/2003 (7:49 am)
Ok here is some added info...

I logged into the latest stable build of Realm Wars and my fps was about 27 with 3 players on the screen, and other players were getting 47. For some reason, Torque is slower on my card than Tribes 2.

Can anyone think of a reason for this? Was something added or removed from Torque in the graphics dept.?

Thanks again,
-Jeff
#13
03/25/2003 (7:50 am)
No, no script changes other than renaming the datablock and instance names in the script from air_scout to the basic LHMA.
#14
03/25/2003 (7:51 am)
Thats very strange. :/
#15
03/25/2003 (11:04 am)
Can anyone do a test by dropping in some bots or vehicles and give me the quantity dropped and their FPS (and video card would be nice)?


Thanks,
-Jeff
#16
03/25/2003 (11:40 am)
Jeff, try exporting your object without any collision info and adding it as a static shape.

That should help you figure out if you are GPU bound or CPU bound.
#17
03/25/2003 (12:11 pm)
I had a big problem with spawning a bunch at the same time. I just tried using "schedule" to spawn a bot a second at a time and I noticed an incredible improvement. I don't know if this pertains to your problem, but I hope it helps.
#18
03/25/2003 (12:47 pm)
I did some testing a few weeks ago with 80 bots on the screen at once. At about 450 polys each I was getting 70 fps on my Athlon XP 1600+ and GeForce 4 Ti 4400. Another test I did was to compare the frame rate of a mission with no bots, to a mission with 80 bots but none visable on screen (looking the other way). The frame difference was only 1-2 fps. Vehicles may be different, but in my testing I noticed very little overhead with bots other than actually drawing them.
#19
03/25/2003 (12:59 pm)
@Mark: Thats a good idea, I will give that a try. Though what would confuse me if I was CPU bound, is that Tribes 2 screams on my system and uses the same engine.

@Will: I spawned my bots at about .5 second intervals. And about the same for the vehicles. Hmmm... Maybe I show spawn them little slower?

@Kurtis: hehe, wow... I am running an Athlon 900mhz and a Viper 770Ultra Video card. It's not a GeForce, but it does it's job in most cases (unless something needs Hardware T&L).

Well, from what I read here, I still have a few more tests to try at home.

Thanks guys!
-Jeff
#20
03/25/2003 (2:02 pm)
@Will: I noticed that problem with simultaneous spawns as well. I think it may have to do with the collision detection having problems when the models are inside each other.
Page «Previous 1 2