Project Theta #4

If you haven’t heard, KFC’s dating simulator is out now, free on Steam. I had a go at it, and I must admit two things:

  • it packed lots of laughs, and
  • it made me crave and eat KFC that night.

To prove my point, here’s a screenshot:

Maybe I should learn from this intentionally cringe-worthy writing style, and put some steamy love story in the game. Inspirations!

Coding

I have to admit, the coding section today is a bit technical. Feel free to skip to the art section if you aren’t into game making with Unity!

Default tile set tiles

The past two weeks have been about extending the 3D tilemap system I’ve built, beyond the existing Unity’s 2D tilemap features which I modeled it on. In particular, I wanted a natural way to define default values for each tile within a tile set. For example, a tile set contains two tiles, a walk-able ground tile and a blocking wall tile. In default Unity 2D tilemap, there is no natural way for its RuleTile to define default custom values for each tile, so that the ground tile can be walked on, while the wall tile will block the player. Heck, there is not even a good way to define custom fields for each tile!

I took some time to think about this, and in the end defined a generic factory class that is a property of every tile set, that is responsible in returning new tiles. There is also a method that is called by the TileSetEditor to draw an editor to edit default tile values for that particular tile variation in that tile set. This way for future projects (or when eventually I decided to tidy the asset for sale, for customers), I just need to extend the factory for a custom tile editor. Kind of like how custom brush work in current 2D tilemap.

The end result looks like this:

Rule tile set neighbor detection

Another feature I made extended how neighbor detection work. Originally, a tile’s variation is based on a specific set of requirements of its surroundings. For instance, if you have a lake tile set that has different textures on its edge (to draw the bank of the lake), then for any tile in the tile set, if it is surrounded by other lake tiles from the same tile set, then display the texture without border. The rules were simple, we require a specific variation to be shown only if, in each possible direction, that direction either contains the same tile set, doesn’t, or it doesn’t matter whether it did or not.

This turned out to be very limited, as you can’t define rules like, display this variation if it is next to a tile from another tile set. This turned out to be a crucial element in making ramps work (the problem I was trying to solve these two weeks), as ramps had to be put on a different tile set than flat tiles, and they were not playing nicely with each other. After some thought, I decided to add name based regex matching for neighbor detection. That is, instead of displaying a variation based on whether the neighbor tiles are the same or not, we are now displaying a variation based on whether the neighbor tiles’ tile sets’ names satisfy some regular expressions. This turns out to be immensely powerful if we careful choose a name scheme for the tile sets!

The end result for the tile set editor looks like this:

Here’s a demo thrown together with ramps and proper collision on cliff tiles:

Art

Y actually started drawing comic shorts on the characters! The first one is done, but since we haven’t really introduced the main characters yet, we are planning to post it after we introduce them in another short.

There will be multiple series following the stories of separate sets of characters in the game. I can’t wait to see them myself!

Apart from comic shorts, Y also drew some tilemap textures. I’ll be adding them to the game and finally showcase an example that doesn’t look like Minecraft, yay!

Narrative

I have been investigating how to create my own language this week in order to truly create an immersive fantasy setting. I came across an excellent article, Generating naming languages by Martin O’Leary. The article goes quite in-depth about picking consonants and vowels with different flavors and how to combine them. Quite an interesting read!

However the article proved to be too complicated than my needs, and there were many, many variables to tune in order to generate the ideal language. I don’t want the names of the characters to be too difficult to remember, so I think I’ll still invent my own names by myself, but have a systemic approach to it. For example, generate a pool of atoms, or partial words, and look to combine them in some order that makes sense.

Hopefully this means I can finally get along with writing the story. I’ve been putting it off because I wanted to get the geography and the names right.

That leaves the geography…I still need to draw up a continental map of some sort…

Project Theta #3

I found it! I found the source of the image which motivated me to build the current 3D tilemap! The above image floated in my search results whenever I typed in “Unity 3D tilemap” and I just couldn’t find its source!

It is from the Isometric Pack 3d asset made by Manufactura K4. I’ve included another asset preview from the asset store. Aren’t they just beautiful.

In fact, I can probably use my 3D tilemap system with this asset to layout a mock level pretty easily! Maybe. After I fix another bazillion bugs.

Coding

I converted the player controller from 2D to 3D! Most of the logic still made sense, and I got to delete a lot of disgusting code I originally wrote to make 2D work like 3D (yep, the code sounded as ridiculous as that statement). This actually didn’t take very long.

…what took very long was all the bugs *ahem* unexpected behaviors *ahem* interesting features in my code. Mostly to do with the quirks of serialization in Unity. Finding why it was doing what it did took a long time. Figuring out what to do with the code took a long time. Moving code around to correct its behavior took a long time. Fixing more interesting features as a result of moving code around took a long time…

The end result: once again I got a character moving in the game, but this time in a 3D tilemap!

For the next two weeks, I’ll be implementing ramps and finer control over tile collisions in a tile set. I see more code moving coming my way…

Art

I think I’ve convinced Y to start drawing some comic shorts on the back stories of the characters of the game. I anticipate incoming awesomeness.

Narrative

I recently watched the Saga of Tanya the Evil Movie, and I couldn’t help myself analyzing the plot. It’s summarizable in a few sentences. Literally only a few things happen in the film, sandwiched between a lot of fancy fight scenes.

Perhaps I don’t really need to make the plot of the game super complicated either?

I wrote up a bunch of significant events in the plot of the game, and that took a whole page. Will the game take 100 hours to play?

Well that’d be exciting.