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…

Leave a Reply

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