Sunday, December 20, 2015

The beginning

It's been 2 years since I started this project and I've been developing it on Unity when I have had time, the project itself has been scrapped once, because I changed the world from 2D to 3D just because it was easier to handle everything.

Anyway, for the moment this game is an open world rpg from an isometric angle with a terrain made of cubes like Minecraft.

The project started with a single chunk which had 16x16x8 cubes, why that number? because unity has a limit for verticies on a gameobject, which is 65534 and 16x16x8x20 (20 is the amount of verticies a cube can have) is 40960. With that I created the first chunk


After that I created a cube creator from which I could create new types of cubes and modify settings of the world like biomes.


From there I created a larger landscape with multiple chunks and started using Mathf.PerlinNoise function to create better landscape, however as the perlin noise in unity is 2D noise I needed a 3D noise to actually make decent looking terrain, for that I got help from a friend of mine Kalmomestari and with his help I was able to create a 3D noise function (which is not that fancy).


While at the same time as I continued on the landscape I created a character that could move on the landscape, I wanted to be able to move in real time when outside a battle so I had to create a simple collision detection (which took quite some time as I had some miscalculations in getting a cube with an index). I also added A* pathfinding so you just could click to move (This also took some time because there are no colliders for the chunks or cubes itself so I had to create a custom raycast).


I also began working on the turn-based combat, I created a basic structure for it and some basic commands but postponed it as I wanted to continue on the map creation. At this point I wanted a larger map so I had to do some very basic occlusion culling (not rendering faces of a cube if they are not visible from any direction). I also got help from Samuli Lautjärvi who created some concept art and UI graphics.


I still wanted to have bigger maps but ran to a problem which was memory and not being able to render the whole map anyway as the GPU could not handle it, so I just generated and rendered the map as the player moved while clearing the old meshes.

Note to self, need to add the youtube video here.

Now even if I could view larger maps but in tiny portions I needed to actually see a much bigger landscape, so I started creating a renderer which rendered the map to an image chunk per chunk, this really took some time as there were some problems specially when I wanted to render trees. The cubes were 3x2 pixels (3 width and 2 height) but later changed it to 2x2 pixels as it looked better and more like the cubes in the game. I also removed the perlin noise at this point completely.


Even though I could render the map to an image it din't look that good, but once I added some shading, shadows and colors it looked pretty good.


This is when I changed from 3x2 to 2x2 pixels per cube.


Now that I could render to an image I programmed some more settings to the cube creator as well as biomes which are created from humidity and temperature maps, I also created a tree map from the biome map.

Biome, tree, humidity, temperature maps (in that order)

Biomes applied to the renderer.


I also began to test how large of a map I could render before running into problems (the limit was 2048x2048x258 cubes). Note, I had to downsize these to 30% from the original size as it otherwise started slow down the website.


Adding trees followed after which were a huge pain in the ass...


Biomes and trees working now.


And lastly this is the last image I took of the map.


I also made a recording of the process as it renders the map to a picture (this recording is not of the current version and I've sped up the process quite a bit).


After all that I discontinued working on the world creation and began to focus on gameplay and this is when I created this blog.

You can also view all the pictures and more at http://imgur.com/a/osKMZ

Friday, December 18, 2015

By the pressure of others

Hello there, welcome to a place with horribly written text of a seemingly impossible project by a finnish programmer, who just wants to create something cool and games that are fun.

I might at some point tell you, readers, about past projects that I've been involved in, but for now I'll write things about this project and rants. What rants you might be wondering? Well mostly about C#, Unity, games and life (short of).

I've been wanting to play a game in which you can create stuff, has role-playing elements and has less gimmicks than most games these days. I want to have epic magic spells, NPC's with an AI that actually does something instead what it was scripted for and to be able to build houses, villages, cities and to govern them. There is no such game at the moment that has all of these included or if there is the focus on either part is so shallow it gets boring fast. So for this project I am going to focus on turn-based combat, magic, AI and the simulation of a living world.

Games like Minecraft, Crusader Kings II, Stronghold Crusaders, Dwarf Fortress and some other games that escape me for the moment, these games have inspired me to start this project and to keep making games.

And lastly as I mentioned, I'm a programmer, I'm from Finland and I adore games, I work on games for a living as well as when I have free time. As a programmer, I am mostly interested in algorithms, AI and graphics programming.