2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: What are you working on?
[Re: Superku]
#414650
01/06/13 09:22
01/06/13 09:22
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
thank you all for the suggestions, I'll try them. morhping into a sprite also costy in 3dgs, considering fast and flexible camera movements, but maybe I can solve it for vegetation and units too. from Fragmotion it is also possible to export animated sprites...
@Superku: I don't fully understand how to apply a 2d sphere-sphere collision, but you are right, it woud be enough, even if units are moving on complex 3d buildings. and yes, my code also needs some performance optimization (I've already done a lot in this area to minimalize pathfinding costs). at the moment I cannot see how to solve to avoid the usage of while loops for each unit, but it seems to be a walkable way too.
|
|
|
Re: What are you working on?
[Re: sivan]
#414655
01/06/13 10:26
01/06/13 10:26
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Create a list of all units (you can use a struct, this is not very complicated) and use one function to iterate through all of them.
In addition to that, only do the calculations for the units where it's needed. So don't calculate collisions for units which are not moving f.e.
POTATO-MAN saves the day! - Random
|
|
|
Re: What are you working on?
[Re: ratchet]
#414668
01/06/13 13:49
01/06/13 13:49
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
Expert
|
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
(this is 3DGS ,not a AAA speciallized RTS 3D engine that can run thousand of units) Also Gamestudio can do this, you only need to optimize all stuff. Also circle colission shapes are much easier than bounding boxes to calculate but it is a lot of work to implement all of this
|
|
|
Re: What are you working on?
[Re: sivan]
#414670
01/06/13 14:08
01/06/13 14:08
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
... Vertex animation is used, it's not as bad as before, if heavy lod applied: 400, 250, 125, and 75 tris. I found it faster to use pssm than decal shadows, over a certain quantity.
maybe I should use physx instead of c_move to get better performance? Bone animation is better imho, try with bones.fx shader, like in the crowd.c from sample folder, but you need the com version or above. crowd.c sample with GPU bones animation: crowd.c sample without GPU bones animation:
|
|
|
Re: What are you working on?
[Re: sivan]
#414684
01/06/13 15:55
01/06/13 15:55
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
gpu bone anim is pro only... Ah, sorry I suggested from crowd.c header, but the manual say A8Pro for the gpu bone animation. //////////////////////////////////////// // Crowd demo // (c) oP group 2010 // Requires shader support for good frame rate // (A8 Commercial Edition and above) ////////////////////////////////////////
|
|
|
Re: What are you working on?
[Re: rojart]
#414689
01/06/13 16:48
01/06/13 16:48
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
no path calculated in each frame, only when units step into a new tile, or when an unexpected and unresolved collision happens. and paths very short for 80% of soldiers, depending on formation, they follow their fellows in the previous line, normally in 2 tile distance. only the first line units, the leaders, make a bit longer path searches, about 20 tile distance. and each search is cycle limited too, in case or errors. so only a minor part of the full high level path is processed by units as tile level searches.
|
|
|
|