Would it be possible to put unit models in unsynced space?

Would it be possible to put unit models in unsynced space?

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Would it be possible to put unit models in unsynced space?

Post by Forboding Angel » 04 Jun 2017, 12:25

Basically so you could have custom unit models/textures for specific people, etc?
0 x

sprunk
Posts: 84
Joined: 29 Jun 2015, 07:36

Re: Would it be possible to put unit models in unsynced space?

Post by sprunk » 04 Jun 2017, 19:28

For models you'd need to hide the real model and draw another one manualy, can't fully replace a model since they also affect synced things (time to aim, weapon emit points...), which also somewhat limits the extend to which you can visually plausibly replace models.

If you want a different synced-model I guess you could create personalized unitDefs (check out old ZK coms) but that introduces extra problems to deal with.

Textures are already fully unsynced AFAIK.
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7017
Joined: 16 Nov 2004, 13:08

Re: Would it be possible to put unit models in unsynced space?

Post by zwzsg » 04 Jun 2017, 20:53

They sorta already are? At least you can, from unsynced space, hide real units model, access unit models, and draw modified or custom unit model, per player.

The things that matter simulation wise such as the shot emit points have to keep using a synced model, but that model doesn't have to be the one that is seen.
0 x

User avatar
Silentwings
Moderator
Posts: 3597
Joined: 25 Oct 2008, 00:23

Re: Would it be possible to put unit models in unsynced space?

Post by Silentwings » 04 Jun 2017, 22:05

Afaics you can already do this with CUS and widget<->unsynced gadget communication. Models themselves cannot really be unsynced, they affect the gamestate, and separating out synced versus unsynced influences of (untextured) models is unnatural - but you can render them however you like using CUS in unsycned gadget.

The unit team colour shading in BAR is an example of how you can render models differently per team, and essentially the same code could work per player.
0 x

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

Re: Would it be possible to put unit models in unsynced space?

Post by PicassoCT » 04 Jun 2017, 23:24

A model consists of pieces.. which can carry other units or guns.
So the actually things in need of syncing are these attachpoints and the base- model they move with.
Assuming you had a free configurable unit, where guns could be moved freely on a arm piece by a player- guns would be unsynced.
And the hierarchy can be rearranged in sync.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Would it be possible to put unit models in unsynced space?

Post by Forboding Angel » 05 Jun 2017, 04:09

yeah I'm not seeing why the model has to be synced, just the pieces. As long as the script doesn't change and the pieces are the same, I don't see the issue?

Ostensibly, this would be used to have various model replacements. Like players could unlock new cooler models for specific units (like in sc2).
0 x

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

Re: Would it be possible to put unit models in unsynced space?

Post by PicassoCT » 05 Jun 2017, 11:14

A unsynced model would consists of a synced baseframe of empty pieces, that would be set by Messages into a configuration. It has not been attempted before.
0 x

Kloot
Spring Developer
Posts: 1865
Joined: 08 Oct 2006, 16:58

Re: Would it be possible to put unit models in unsynced space?

Post by Kloot » 05 Jun 2017, 12:25

Forboding Angel wrote:not seeing why the model has to be synced, just the pieces
Reminder: the pieces collectively *are* the model, each piece being a chunk of vertices drawn in some relation to its parent with the relation determined by (synced) scripts.

If you want custom visual models, follow the advice of Silentwings and read https://springrts.com/wiki/Lua_UnitRendering / the COS framework code.
1 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7017
Joined: 16 Nov 2004, 13:08

Re: Would it be possible to put unit models in unsynced space?

Post by zwzsg » 05 Jun 2017, 18:43

Forboding Angel wrote:Ostensibly, this would be used to have various model replacements. Like players could unlock new cooler models for specific units (like in sc2).
In this case, you want synced, since what's the point of unlocking new cooler models if you can't brag by showing them to those who don't have them?
1 x

Post Reply

Return to “Feature Requests”