performance bettering?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
random
Posts: 158
Joined: Wed Aug 11, 2010 6:01 am

performance bettering?

Post by random »

well...

in (as short as possible)...

iam up to make a game (space -> skybox - starcraft fight -> goal multiplayer also pvp)...

current situation

customClass (shipObject)

what does it do?

it dreates a
shipNode (IMesh with octree für collisiondetection)
add´s weapon turrets 24pcs (2 meshes rotating turret and weapon itself for angle per each)
add´s a lightNode a Billboard Node and a BeamNode per each turret

the class rotates each turret, and the weapon in the direction to the target, updates the position checks if the turret would fire the own ship if yes sets the laserbeam and the billboard to invisible...
so i got 48 rotating nodes 24 laserbeams and lightnodes 24 billboards + 1 for an explosion animation which will be updates position 1 shipmesh

it also adds a particle system as propulsion

i think i missed something but thats what i got currently

with 2 ships i get an performance of somehow 60fps with 8 ships where each is firing i got a perforance of somehow 20fps.

... is there any way to see where i can better the performance where my bottleneck is what lines of code costs the most time?
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Re: performance bettering?

Post by Luben »

random wrote: ... is there any way to see where i can better the performance/where my bottleneck is/what lines of code costs the most time?
Sure there is. What you need(want) is a profiler[1]. Depending on what IDE you'r using, you might have one close at hand. The expensive versions of visual studio seem to have nice profilers, and i have memories of having used a profiler with c::b a few years ago.

[1] http://en.wikipedia.org/wiki/Profiler_% ... science%29
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

A new open-source profiler for Windows which I found recently: http://www.codersnotes.com/sleepy
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply