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.

Project Theta #2

I had just a week to work on the game before TI9 began and consumed all my spare time. To make up for this, I decided to write a section on the lore of the game in every update!

Coding

Spent most of my time bug-fixing.

I managed to push seven commits and closed out a bunch of issues. The 3D tilemap is now functionally a superset to Unity’s own 2D tilemap, with extra features such as saving tiles to disk and loading them seamlessly, so not everything is saved to the scene. Reaching this milestone makes me quite happy, so I’ll show it off in a few more GIFs below.

Not really focused on the tiles in the tile set, so they look a bit like water-downed version of Minecraft. Y is working on some textures for the prototype tiles, though!

The next step is to get a working character controller ready so we can move around in the tilemap. This also means implementing a tile-based collision and ramp system. Fun!

Narrative

Since I’m also writing the story, I guess I’ll put out bits and pieces of lore of the game.

Humans have populated the Continent for well over twelve hundred years now. Hamlets became villages, villages formed towns. Countries rose and fell, buried in the sands of time. The Antima Empire, with a mere two centuries of history, is a new player on the stage of continental politics. Its founding father, Lepton Antima the Wayward, sacrificed his own life to establish a powerful barrier to deter all forms of magic in the Empire. This double-edged sword repelled countless invasions from the neighboring states, at the cost of the country’s own magical advances.

It is in this country that our protagonists, Edge and Abigail Seed, begin their journey as a duo with one who aspires to become the Demon King, and one who wants to stop him.

Excerpt from The Chronicles of Edge and Abigail Seed – Volume I

Project Theta #1

Excited to finally write about the game!

After nearly two months of work on a 3D tilemap system for Unity, it is finally at a presentable stage. I gave a short tutorial for my artist Y over Duo and she created the above scene with the placeholder tile set I created. Slightly disappointed that we are using this to mimic 2D tilemap (with correct height information), but I suppose it might come in handy later on.

This will be the first piece of code that will make into the final game, I hope. It was both traumatic and liberating when I deleted four-month worth of code I wrote specifically to extend Unity’s 2D tilemap system for our game, only to find it too lacking on a fundamental level. I hope I’ve done things right this time around.

The tilemap system is still bug-ridden and feature-lacking. Once the core system is complete, I need to figure out a way to encode ramps and ladders into it, as well as writing a character controller on top of it. Fun things lie ahead!

On the other side Y has been drawing out character portraits. Here’s a finalized portrait.

Project Theta #0

It has been a little over a year since I started brainstorming Project Theta with my artist friend. It is finally in semi-production – a state where progress is no longer abstract.

I figured documenting the making of the game would be pretty cool. After all, it has been a year and we are still pretty much as motivated as we were when we started. It would be interesting to see how the game came to be.

We have bi-weekly status updates, and I’ll try to write about the progress after every meeting.