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: 14673
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

Basically so you could have custom unit models/textures for specific people, etc?
sprunk
Posts: 100
Joined: 29 Jun 2015, 07:36

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

Post by sprunk »

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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg »

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.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

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

Post by Silentwings »

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.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

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

Post by PicassoCT »

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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

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).
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

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

Post by PicassoCT »

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.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

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

Post by Kloot »

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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg »

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?
Post Reply

Return to “Feature Requests”