Sunday, August 20, 2017

Building SOT part 2

Mirror effect

After experimenting with a few mirror effects using a second camera projected on a plane I've arrived at this:

This was achieved by using two camera's, one mirroring the movements of the other in relation to the mirrored world. Then I've used the camera depth and culling mask to overlay the main camera's image over the mirror camera's image.

Performance on my phone seems fine, and hits over 60 fps when only rendering the terrain. Adding the trees as seen in the .gif makes it drop to ~40 fps. Seeing as how we're making a point & click I'll be happy as long as we hit 30+ fps, so we're good.

Now to re-implement the world switch mechanics.

Thursday, August 17, 2017

Building SOT part 2

World creation: Part 2

Using Unity terrain

Unity terrain can't be rotated, and as such can't be made to be upside-down; Something which I need for SOT. As such I want to render a mirror world using a second camera.

Attempt  #1: Using RenderTexture


This method uses a plane and a texture created by an orthographic camera above the world. The performance is fine on mobile, but the downside is that the reflection looks incredibly flat. Maybe I should experiment with a non-orthographic camera?







Attempt #2 Using a mirrored camera & viewport editing.

As you can see in the gif above, this looks pretty cool, but I'd have to fix the scaling issue that happens due to the width and height relation.

The solution will probably involve a combination of the two, having the mirror camera from #2 and rendering it on a plane like #1.

Wednesday, August 16, 2017

Exploring options on how to build the world of "Two's".

World creation: Part 1 

Trying to figure out a way to build the world of for "A Story of Two's", on a technical level, is a challenge mostly due to the dual-world gameplay. As the player must be able to switch between characters at will in an open-world loading and unloading would be a challenge, but also the fact that world worlds must be visible by looking up or down respectively.

Chunk-based loading


The first that I came up with was a system of 13x13 chunks, 50x50  units each, in which only the chunks that the characters occupied would be loaded, together with the neighbouring chunks.

This would mean that, out of the 169 possible chunks, a max of 18 would be loaded in (one occupied and 8 neighbouring for each playable character), which would save on performance but dramatically reduce draw distance.

Another advantage is that you could swap out specific chunks to change the content of the map based on a timeline or certain triggers in the world, which would make a dynamic and seamlessly transition between world-states. Puzzle chunks would be loaded in, and when they would be reloaded they might get replaced by a different puzzle.

Problems like the draw distance are issues, but that might be resolved using very low-poly representations for far-away chunks. What will be the biggest problem would be creating each world chunk.

Custom Unity editor window



To save having to manually drag and load each chunk form a list I've made custom editor window with a 13 x 13 grid of buttons, each linked to a scene. Each scene then contains a chunk, and the buttons show when a chunk is loaded in or not. This greatly increases the in-unity workflow.


Chunk editing and level design in Blender


In order to make and export chunks in blender they each need to be separate object, but also need to seamlessly mech in each other. Enter MultiEdit by antoni4040. What this allows is for each object mesh to be edited simultaneously, and so I can make chunks of flat planes and create mountains and rivers spanning multiple chunks.

However, and I'll be honest, managing each separate chunk afterwards is a pain. Keeping track of each one takes up most of the time. I want to minimise the amount of work in this step, so better to completely design the world first and only start building it later.

Thursday, June 1, 2017

Using Slack in a very small team.

In preparation for the master we, Sarah and I, have been using slack as our main communications platform. This, as it turns out, has been incredibly helpful, due to the app integration.

Also I didn't want to use facebook chat. Not for "official" business.

Basically, I've set it up so that Trello, BitBucket and Google Calendar are all linked to Slack, and send activity logs to different channels. This makes sure that both of us know exactly what is going on at all times, and that makes communication a lot easier. No need to ask someone to do something, or when a deadline is due, just go to the appropriate channel and see if it's there. Whenever something happens I get a notification.

For example: Sarah pushes an update to BitBucket and moves a task from "To Do" to "In Progress" on Trello. I get immediate notifications from slack that these things are happening, and, without exchanging a word, I know Sarah has finished something and started work on another.

However, it's not just about real-time updates, but also keeping a log of things. This is so that we, in a years time, can look back and show exactly what we did at which point in time, what we discussed during meetings, which builds were shared,... pretty much everting. This can be used during presentations or to show people who would be interested in our creative process.

Using twine for text based games.

Complete passage structure.


The cool thing about twine, that I've noticed, is that it's got plenty of coding potential. This was mostly to explore these possibilities. Below you can see some of the structure involved.

A randomly generated passage.

Adapted from the story written for the storytelling cource, which you can find here:

Go to the full story.

Thursday, May 4, 2017

Personal Project: Remaking Motherboard -> Bridges


I'm remaking my Motherboard game because of a few reasons:

- One majoy coding error that disables a piece from being moved outright.
- The complaint that it's only 4 player and only with XBox controllers.
-  The pathfinding algorithm being way too simple and illogical.

That's why I'm going from this:

Original Motherboard Game
 To This:

New Motherboard Game

Here's what I got so far:

I've written a script that can dynamically rewrite the strings that it uses to access the Unity Input Manager. There you can also generate anything from '1' to 'as-many-input-device-as-you've-set-up'.

For mouse controls, currently it's only one. So any of the 4 players can be setup with the one mouse (or all players with the one mouse, if you want), but seeing as how it's possible for games like "JamesTown" to do it merits more research.

The keyboards are a lot easier. I've picked out combinations of keys that make sense accros the keyboard and made sure none of them overlapped. The you can plug in 4 keyboards into the computer and, as long as each player only touches his own buttons, play with up to 4 players.

Like so

Controllers are handled by unity's Input Manager.