Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 245 of 554 1 2 243 244 245 246 247 553 554
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 Offline
Expert
sivan  Offline
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.


Free world editor for 3D Gamestudio: MapBuilder Editor
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 Offline
Expert
Kartoffel  Offline
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: Kartoffel] #414662
01/06/13 13:09
01/06/13 13:09
Joined: Apr 2008
Posts: 2,488
ratchet Offline OP
Expert
ratchet  Offline OP
Expert

Joined: Apr 2008
Posts: 2,488
That's a good point to use one loop to manage all units indeed. For collision, non oriented box to box collision is really enought (this is not precise fighting game collisions !)
That's lot more faster than math sphere calculations.

For 3D models, and sprites you should have pre calculated sprites indeed, and not calculate them, that's better performance indeed, and you'll boost a lot the speed using sprites.
(this is 3DGS ,not a AAA speciallized RTS 3D engine that can run thousand of units)

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 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Originally Posted By: ratchet
(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


Visit my site: www.masterq32.de
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 Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: sivan
... 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:



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: What are you working on? [Re: rojart] #414675
01/06/13 14:45
01/06/13 14:45
Joined: Apr 2008
Posts: 2,488
ratchet Offline OP
Expert
ratchet  Offline OP
Expert

Joined: Apr 2008
Posts: 2,488
yes, i forgot, bones animation are done on 3D graphic card and not CPU.
Reduce bons per character is a good solution. I don't know if 3DGS supports different bones number by LOD ?
If not you'll have to manage LOD yourself (a pool of 20 pre created entities on very low LOD), than display and move them from a non visible position to terrain position only when need to display them).

Re: What are you working on? [Re: ratchet] #414677
01/06/13 14:55
01/06/13 14:55
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
gpu bone anim is pro only...

units are in multi-dim arrays currently, organized in groups, so iterating them is easy, but it would require rewriting completely the unit loop, but definitely it would save some time of similar calculations. maybe limiting further getpath function calls and cycle lengths based on actual performance would be also beneficial, allowing better quality when performance is okay...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: What are you working on? [Re: sivan] #414683
01/06/13 15:41
01/06/13 15:41
Joined: Apr 2008
Posts: 2,488
ratchet Offline OP
Expert
ratchet  Offline OP
Expert

Joined: Apr 2008
Posts: 2,488
Well caus i don't use lot fo characters at same time i never noticed that ... Pro only ...
hummm ... hummm ... a so basic technic that exists from lot of years ... i prefer to shut up ...

Yep for paths , you should calculate them every 5 , 10 frames or more ... like people using navmesh, you don't callfunctions each frame.
It won't be noticeable at all and it's not some racing game or Fast paced FPS game also ...

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 Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: sivan
gpu bone anim is pro only...

Ah, sorry I suggested from crowd.c header, but the manual say A8Pro for the gpu bone animation.

Quote:
////////////////////////////////////////
// Crowd demo
// (c) oP group 2010
// Requires shader support for good frame rate
// (A8 Commercial Edition and above)
////////////////////////////////////////


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
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 Offline
Expert
sivan  Offline
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.


Free world editor for 3D Gamestudio: MapBuilder Editor
Page 245 of 554 1 2 243 244 245 246 247 553 554

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1