Devblog - Editor 3

More nerdy editor work, culminating in the ability to upload to workshop.

20 July 2018 by Garry Newman (2 Comments)

I've put a few demo maps on the editor repo.

Demo Buttons

Aims to show how to make buttons interact with stuff. Shows toggle, hold, timed and ground buttons.

Demo Crush

Shows how to make objects that crush the player (spoiler: you add the Crusher component).

Demo Hurt

How to cause the player damage using triggers. Also how to make the ragdoll stick to stuff when it kills them (spikes etc).

Demo Pushers

Trampolines and conveyor belts. I coded a new way to make conveyor belts while I was setting this map up, because the old way was dumb.

Demo Race Mode

This should show you how to make a map with a start, middle (checkpoints) and an end.

More

I've got a list of other demo maps to make (moving platforms, vehicles, carryables etc). I'll be working on these next week.

I filled out the editor repository with a getting started guide. I saw some guys getting confused because they were downloading the zip from github and expecting it to work.. but it didn't because of LFS.

Whenever you ask someone how to do something in Git they'll say "just type this in the command line". I hate using the command line. We've evolved beyond that. If something is making you use the command line it's no good. They'll tell you it's faster and more powerful once you know how to use it - but that's bullshit. Github.Desktop doesn't make you use the command line. Enjoy.

I had a weird bug in the character controller. Moving colliders would go through the player instead of pushing. Sometimes the player would teleport 50 meters into the water. There were two thing that caused this.

Probuilder

When the player certain colliders this error popped up

transform.positionWithLocalOffset assign attempt for 'PlayerController(Clone)' is not valid. Input positionWithLocalOffset is { NaN, NaN, NaN }.

After an hour of fucking about I realised these were all Probuilder colliders, and it didn't happen if I replaced them with simple Box colliders. After another hour of fucking about I realised it was only happening on the colliders that I'd marked as convex. So the solution is to not make Probuilder colliders convex.

Sleeping Character Controller

I'd added an optimization in my character controller. It didn't try to move it unless it had a decent amount of velocity. It turns out that this causes the charactercontroller to go to sleep. So I added a hack to call Move every frame no matter what. After I did this the previous behaviour was restored and the controller gets pushed by colliders (as long as they don't have rigidbodies).

Part of moving stuff over to the editor has been cleaning it up and throwing stuff away. I get a lot of enjoyment from this. Being able to delete files is a great feeling.

Some of this is renaming, some is deleting. A lot of is finding cases where code was written a relatively long time ago and some or all of it has been coded somewhere else, better. So I can strip that code out and derive it from BaseEntity to make it more simple.

The EventMap stuff has caused a lot of this. Where previously Behaviours would store a link to a GameObject that was spawned as an effect when something happened, now I can use the EventMap stuff to make things nicer. The collectables are an example of that. They used to have a GameObject that was spawned when they were picked up.

That can be replaced now.

I added a menu option to upload to workshop.

I wanted to avoid having Steam invade the Unity editor, because it's a pain in the ass. If you load steamworks you can't unload it, so it makes it look like you're in the game on Steam. Which means Steam won't download updates to the game or let you launch it - because it'll act like it's already running.

So instead of made WorkshopPublisher.exe, which gets called from Unity automatically. That means it thinks you're using Tub for the 5 seconds it's running. All we have to do is point it at a folder and if it can find a meta.json it'll do the rest.

This is still a bit of an experiment right now, so you can't actually see or load the maps that are uploaded to workshop yet. I'll be working on that later today and probably over the weekend.

Ghosts

I wanted to look at some ghost ideas. Replacing the ghost we have now with a ghost version of the citizen. Howie concepted that for us.

We decided that the bottom right one is our favourite, so Taylor is gonna have a bash at it.

Outfits

The idea of the citizen is that it's basically the same genderless person but with different clothes on. Different people are created by having different clothes. Howie concepted some of that up.

I feel like most of these might be slightly too thematic, but they do show that it works.

We'vbe also been thinking about how the citizen can represent both genders. We purposely made the citizen androgynous because of this. Here's some of howie's concepts of what that might look like.

  • Workshop integration mostly done
  • Maps shippable with the game again
  • Removed all the old maps
  • Lasers
  • Explosions
  • Throwing/Carry fixes

Mailing List

If you want to follow this project you can sign up to the mailing list.

We'll only update you about this project, we won't spam you about other stuff or sell your email address.

* By subscribing you agree to the Terms Of Service and Privacy Policy