A bullet in spring

A bullet in spring

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

A bullet in spring

Post by PicassoCT »

I always suggested that spring needs proper physics on a unit/feature/projectiles level.

This sub-project aims to make that real.

Goal:
1.)To rewrite parts of the bullet library (http://bulletphysics.org/wordpress/) that it can be used in synced context.

2.)Integrate the rewritten library via OPEN-CL in such a fashion, that synced physics are processed on gpu nodes.

3.)Provide a Lua-API to the new physics functions, that in a similar fashion to MoveCtrl allows for dynamic adding and removing of physics(forces, dampeners, collision) to Features, Units, UnitParts and AbstractObjects. In addition this API should have comfort features, like infecting "physics", and ForceFields, that automatically add physics to all objects who enter them.

I shall upload uml diagrams and further data, to allow for constructive criticsm and obsticle detection.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: A bullet in spring

Post by Anarchid »

I know you know CPP and you know you want to do it
-> reformat into bounty?

I think bullet has issues syncing though.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: A bullet in spring

Post by PicassoCT »

I allready had a conversation with jk about that some time ago.
He thinks, if i recall correctly, that - it beeing open source should be possible to rewrite the bulletlibrary parts that will be used.
The main difficulty consists mostly of replacing math library operations with proofen synced once used in spring.
Function such as sin, cosine, atan and others. Such Programms running as a Kernel on a GPU should then be synced, if i remember correctly.

Other things worrysome are the obtaining of collision volumes from spring pieces on a per model basis.
And to not botch the pre-collission detection of the library. Its easy to make this ineffecient.
Misolavera
Posts: 8
Joined: 20 Aug 2014, 22:21

Re: A bullet in spring

Post by Misolavera »

PicassoCT wrote:Other things worrysome are the obtaining of collision volumes from spring pieces on a per model basis.
And to not botch the pre-collission detection of the library. Its easy to make this ineffecient.
The "pre-collission detection of the library" is a broad phase of AABB collision detection. It is the fastest way in a dynamic cartesian world. You'll have a box containing all the triangles of your unit. Finer collision of the unit triangles (slow) will take place once collision has been detected during the broadphase.
Either way : profiling.

According to what I understand: units can be bumped differently according to where they are hit (maybe when falling or rebounce) ?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: A bullet in spring

Post by PicassoCT »

currently unit use there collissionvolum to handle terrain and unit-unit or unit-projectile-collissions
Misolavera
Posts: 8
Joined: 20 Aug 2014, 22:21

Re: A bullet in spring

Post by Misolavera »

So unit-unit and unit-projectile collisions can use only spheres ? no model, just a point + radius.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: A bullet in spring

Post by PicassoCT »

The plan was to start with the default collissionspheres, boxes and cylinders and allow for more complex shapes (for example a perpiece-collission-model) to be reached per lua.
Post Reply

Return to “Engine”