I have decided that the player will teleport in and out of the level via teleport pads. Firstly, it’s fairly easy to do animation-wise and creates fewer sprite issues. And it also kind of fits the sci-fi-ish story I think I am going for.

First of all, I need the play to be able to have an “action state”, that is, something they are doing other than normal user control. So “idle” state would be the default:

The I can add the teleport states — teleporting in or out — and specify their durations:

The teleport in can then trigger when the player spawns:

And the teleport out gets triggered instead of winning instantly:

Now I can update my sprites to match a teleporter pad better:

I also need both the arrival and departure teleports, so those will be separate sprites:

And this works in-game, at least prop-wise:

I also need specific interactions for both, starting with the exit teleport, part of which I already have:

So I can approach it and it activates (similar to upgrade terminal):

And if I trigger it, it goes into full “teleporting” state and then triggers the player removal and level victory:

So that’s the basic functionality. I also need to add some feedback to actually using the teleport. I can use my effect bundles and add a constant effect while the teleport is active:

Another tweak is to “force” the player onto the pad, which is adding some “suction” force towards the center of the pad:

Now, I also want to spawn an entry (arrival) teleport in the level, so I need to add that to my level definition alongside the exit one:

And with some additional state logic and extra effect, I have the entry teleportation too:

Another feature I need is gradual player descent before they can move:

I may be spending a lot of time on this, but it is literally the first thing in the gameplay that the player sees. I want to leave a good first impression here. There are like a hundred things I can do to further improve the visuals and feedback, but at some point I just have to call it (and likely leave it for later).

MicroRogue DevDiary #42 – Player teleports
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *