Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
137 stars 2 forks source link

Send user to spawnpoint node. #484

Open amplified1 opened 11 months ago

amplified1 commented 11 months ago

Is your feature request related to a problem? Please describe.

The only way to send a user to the world spawn with flux is by deleting their avatar or teleporting them under the kill floor. Neither are ideal, the kill floor is not static and can change based on the world locomotion or injected user locomotions, and deletion is extremely obnoxious, causing a lag spike as the game regenerates heavy avatars, and sometimes leading to data loss when working on avatars.

Describe the solution you'd like

A node that takes a user or character controller input that sends the user to the generic world spawnpoint/spawnarea when pulsed. If possible this should follow any special rules the world has for its spawning, such as having multiple randomized spawn points or a randomized spawn area.

Describe alternatives you've considered

A node that allows you to force the kill floor function built into character controllers.

Additional Context

Items that delete users they are used on are very annoying and dangerous. I would hope an implementation of a proper respawn function would discourage use of deletion, at least when the creator is not actively malicious.

kazu0617 commented 11 months ago

I think it will be solved simply by setting the user's position to spawnpoint global coordinates. Yeah, it can with flux ... but not that, it is a more wonderful function?

Banane9 commented 11 months ago

I think it will be solved simply by setting the user's position to spawnpoint global coordinates.

Except that doesn't work to dynamically target the world's spawn(s) or follow its rules

amplified1 commented 11 months ago

Yeah, I'm talking item and avatar systems where you don't know the spawnpoint. You could search the hierarchy for the spawnpoint but if it has a non-standard name the search will fail and hierarchy searching, especially if it's a complex hierarchy, is never ideal

VirgilCore commented 11 months ago

I would really like this feature. I like making things that are able to "Kill" players, but I dont like having to delete them, because of the lag and data loss issue. Having a dedicated "Respawn" node would be great.

shiftyscales commented 7 months ago

What functional purpose is there to move a user to a SpawnPoint/SpawnArea inside of the world? Disruptive behaviours such as 'respawning' other users could be against the platform's guidelines if it's being done without consent.

That kind of functionality is best reserved for game worlds, and experiences where you have full control over the environment, and can make use of other existing nodes to set a user's position in the world.

For a majority of worlds, you should already be able to effectively already do this by searching for the presence of a SpawnArea or SpawnPoint slot and using that as the target destination.

Banane9 commented 7 months ago

What functional purpose is there to move a user to a SpawnPoint/SpawnArea inside of the world? Disruptive behaviours such as 'respawning' other users could be against the platform's guidelines if it's being done without consent.

That kind of functionality is best reserved for game worlds, and experiences where you have full control over the environment, and can make use of other existing nodes to set a user's position in the world.

Assuming all participating users in the session agree, I don't see why a set of guns or whatever couldn't make use of this mechanic to be able to be played with in any world. Since you can already set a user's location to floating point land, I don't see how having a dedicated "place them at the world's intended spawning place" node would be more abusable. If anything, it has the potential to make "killing" items less disruptive if they don't have to rely on placing someone at the origin or searching the hierarchy, nevermind the ones just deleting the User Root to force a regular respawn.

For a majority of worlds, you should already be able to effectively already do this by searching for the presence of a SpawnArea or SpawnPoint slot and using that as the target destination.

As this method is not guaranteed to work (the slots may have any name), and potentially slow (they may be nested deeply).

EmergencyTemporalShift commented 7 months ago

I’d like to emphasize that having a respawn node could also have an associated respawn event, providing useful data about where they respawned and such. Also perhaps an event that fires before certain variables are reset, but I’m just spitballing. Some variables / items might have the scope of a single run/life (because of components) and might reset on respawn.

Banane9 commented 7 months ago

I’d like to emphasize that having a respawn node could also have an associated respawn event, providing useful data about where they respawned and such. Also perhaps an event that fires before certain variables are reset, but I’m just spitballing.

Ah yes, I could imagine some sort of culling or other user location tracking system getting very confused if a user just gets teleported with no way to know.

Azavit commented 7 months ago

This would just be good for any standard game design. sure you can manually make such a thing in a world but having something more dedicated that you know will follow standard spawning rules is the best and most optimal situation otherwise you are basically re making code that is already running internally which is already bad form in general as it won't get any benifit to any internal changes/new features those internal systems may obtain in the future.

"Death" and "Re-spawning" are insanely common features in games and if Resonite wants to actually be a game engine this is a much needed node to do these things properly and optimally.

Lv100Latios commented 7 months ago

Another example of why this request is useful: I have a dual-use item that can either function as a teleport or an exit strategy for the user depending on what mode they are in. Currently, if the item is set to teleport a user back to spawn, I have to assume that the spawnpoint is at 0,0,0 which isn't always the case. There are use cases for rather benign things, and I'd argue that being able to kill a user through deleting their slot is already more obnoxious than being able to teleport someone to spawn.

We have a respawn command. At the very least, why couldn't we have a command to teleport someone to spawn as an admin command or have the ability for the user to jump to spawn through a node without needing to kill them?

Also, if someone sets up their own spawn or renames the slot, finding one with the name may not work. If there are multiple spawnpoints, you would find one through a simple search.

JackTheFoxOtter commented 7 months ago

I agree, this would be very useful, especially if it triggers the same spawn-point determination that is triggered when you join a world.

EmergencyTemporalShift commented 7 months ago

With a flag to tell if it’s first spawn or a respawn, because some setup might be needed. (What if some variables actually can persist with respawn? Someone’s avatar might be messed up but they need to keep variables.)