TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

MAX: visual logic blobby connecting system (VLBCS) enhancement request #3198

Open AmenMoses opened 2 years ago

AmenMoses commented 2 years ago

Currently it is possible to link any entity to any other with the linking system but in a lot of cases that connection may not be logically sensible.

For example in order to enhance Cine|Guru to use the linking system the user should be able to connect a trigger zone to a camera or a camera to a position node etc, but connecting two cameras together is non-sensical, as is connecting two trigger zones etc.

So what I'm proposing is that in the .fpe an entity can be given a connection name and then specify which connections can be made by specifying a list of other connection names plus how many of those connections can be made, then when the user is linking entities in the editor it can use these fields to decide if the connections are valid and not allow invalid connections to be made.

so maybe: (camera .fpe) ;logical connectors connectionname=CG Cinematic Camera connectsto1 =CG Position Node connectsto1num= 1 connectsto2 =CG Camera End Point connectsto2num=1 ... etc ...

(position node .fpe) ;logical connectors connectionname=CG Position Node connectsto1 =CG Position Node connectsto1num= 2 connectsto2 =CG Camera End Point connectsto2num=1 connectsto3 =CG Cinematic Camera connectsto3num=1 ... etc ...

Or something similar.

The main advantage of all this is that it is purely an editor function to avoid users making illogical connectors (so has no run-time impact) and will simplify the behaviour scripts immensely because the scripts would not have to include a lot of complicated sanity checking (which can only execute at runtime anyhow!) logic and mechanisms for dealing with the bad connections.

If the section is not included in the .fpe file then the default behaviour, as now, to allow any number of connections to anything else would still be available.

The reason for using names rather than some sort of Id number is simply to make it as flexible as possible, using names means that, as in the example above, a 3rd party product can indicate special connections of it's own rather than having some sort of central repository of ids that would need to be controlled in some way.

AmenMoses commented 2 years ago

If the above was to be implemented it would also help the scripting side if the GetEntityRelationshipID( e, index ) function could also return the connection name if it exists for the linked entity.

i.e. local entityId, connectionName = GetEntityRelationshipID( e, 1 )

That way if I had a position node connected to 3 entities I would be able to quickly determine that a) They are genuine Cine|Guru entities (if not just ignore them) and b) Which entities they are.

Would vastly simplify for example building the path list for camera movements as only 'CG Position Node' connections are of relevance to the path itself.