Wednesday, May 31, 2017

Time flies

Well time really flies and I almost forgot for a second time to write an update on the project, we've been so focused on creating combat for this game that it has taken most of our the time, there has been some hiccups with designing combat but all in all it's been heading in the right direction.

Currently the combat is still being created but is still missing animations and mechanics as well as some AI functionality, you can fight and defeat your opponent but it is still too soon to for it as the combat is too repetitive or easy.

Demonstrating ragdoll physics

Samuli while also creating animations for the characters has been creating armor parts and other clothing, we are also thinking of using external assets for creating facial hair or fur.


I'll update this blog once I have some decent footage of the combat to share.

Wednesday, March 29, 2017

Distorting time for a new direction

So we've decided to change the course of the project temporarily to create something smaller. We are using a lot of things that we've already created, but the combat and things the player will do in the game will be different, we will however continue the base project after we've completed this shorter one.

So what do we have planned? we are creating a survival game with quests and crafting, the combat is action based and there is character progression based on what the player does, very similar to the base project except for the combat. We're using the map generator for this as well.

We've been designing a lot of things and have created a timetable in which we hope to finish a demo of sorts of this game. Currently we are working on combat (fists for now). I've created a character in Unity's mecanim using the animations and character model that Samuli created, currently it has running, jumping, idle and fist combat moves. I have to say that using mecanim has, at times, been a real pain in the ass.

While testing we noticed that we could only have 40 characters at the same time before the fps starts dropping below 60, the reason for this was that there are a lot of seperate parts in the character model and each has a skinned mesh renderer, so I've began created a skinned mesh combiner so we can have different armors for different body parts.



Tuesday, February 28, 2017

Housing part 2

The house system is in a state that it can be used but it took quite a while and the rules with which a house will be built changed quite a bit, instead of creating the walls first the floor will be created first, then the walls and after that the roof, I also removed the levels button and instead players can just created high walls and add a floor to different levels, so why all these changes? well for one I didn't want to restrict players and adding more levels from a button would mean that only a certain wall height could be created and that seemed too much of a restriction and just complicates the programming unnecessarily.

Automated tools have also taken some of my time and some of the tools I will be creating later as it just seems too much work and I really want to focus on gameplay after the greedy meshing.

The construction GUI has also undergone some major changes as we forgot that we need to add other types of buildings and constructions to the world beside houses.

I've also been able to identify rooms automatically by using a flood fill algorithm, it starts filling above every floor cube and while it fills any found floor cubes will be removed from the check as they would just flood the same space unnecessarily, once a space is filled and it's closed inside walls and such it is defined as a room.

I also created RLE compression so I can compress the houses into a smaller size.

Tuesday, January 31, 2017

Housing

The house editor which I mentioned in Designing, optimizing and moving forward is coming along well and I have already added quite a few useful tools to it, there are a few missing features like the rules which the house should be created with.


After I've created the editor version I'm moving on to creating it for the game as well, after that I'll be focusing on greedy meshing.

Samuli also has almost finished the building GUI for the game and it looks awesome.


I've modified the biome editor slightly, we can now select which trees appear on different heights.


Saturday, December 31, 2016

Before the end


I changed the orthographic camera to perspective as you can see in the above video, we decided to do this because the sense of depth was necessary and we might need to move the camera closer to the character in places like caves.

I also created multiple arrays of vertices/tris/normals/etc which will act as buffers for when I'm generating a mesh from chunks, this will reduce the amount of garbage that would have otherwise produced by the temporary mesh arrays, the only downside with these buffers is that they will use up a small amount of memory. Of course this could be avoided if I could just create a single buffer of each vertices/tris/etc and give it to unity's mesh class with a length parameter but I can't.

PS: Happy new year!

Wednesday, December 21, 2016

Designing, optimizing and moving forward

The new cube creator is finished for now, I will be adding more options and features to it later.


I haven't mentioned anything about greedy meshing and there's a good reason for that, you might have noticed that there are several different textures near each other making the greedy meshing very small and not all that useful, the other problem is that I have all of the textures in one atlas so repeating a certain texture would be problematic because you can't overflow the uv coordinates in an atlas so that the texture would repeat, so I had to created a shader which could repeat a texture inside an atlas by adding a certain amount, let's say 512, to the uv coordinates which would tell the shader how many times the texture would repeat, after that it would be just a few calculations to determine the current texture index by just dividing the uv by 512 after which we can get the actual uv coordinates for the certain part in the mesh.

While we can now repeat a certain texture it still does not remove the problem that we have multiple textures near each other, for that I would just need to create a new atlas and combine textures in a 2 * 2 texture in every possible combination so I can create 2 * 2 * 2 size cubes with one texture that has 4 different texture combinations for each side instead of 1 * 1 * 1 with one texture for each side.

There might be better ways to do this but I can't dwell for too long in optimizing the terrain generator or it might become a never ending project.

Me and Samuli have been designing crafting for the game and an interface for it and it looks great.

A mockup of the crafting interface.

I've also been creating a house editor for the game, we are going to make preset assets for NPCs, players can create custom houses in the game but they can also use presets as well. A house will be created in 3 different stages, first a player will place walls for the house after which he can place the floor or the roof or even more layers, after the house is designed players can predetermine what furniture the house will have before building it.

Monday, November 28, 2016

Terrain facelift in progress part 2

I've almost finished the new cube creator, only a few features are missing from the biome editor, but already we have made some very interesting and good looking terrains.


As you can see in the above image, we can edit the size and heights as well as what cubes will be generated to different heights, I also got the sub-biomes working.

Above image is a sub-biome of grasslands.

Desert biome and its sub-biome

Samuli also finished a new version of the 3D character model which is in the game already


We are continuing on adding more biomes and I'm leaning towards working on the gameplay mechanics.