Monday, July 25, 2016

Progress report: weeks 5 and 6

Hello again! There were 2 hard weeks for us and we are happy to share what we've done so far.

Character creation
Players are now able to create new characters.
(We will add character customization in the future).

Rivers generation




NPC improvements
There was a lot of work on NPCs. In short, they've got new AI, multiplayer support, despawning mobs that are too far from the character, etc. So now our beloved fat camel Amarbun can safely roam around the desert, running away from potential danger (AKA you). 
In addition, if you are into this, you can kill them now! :P


Swimming
We have implemented swimming, both above and under water, with cool underwater effects.


Swimming animations are coming soon :)

New trees
We have designed new trees for the forest biome. These trees look simpler and also are more optimized (will result in better game performance).

We will add random variations for trees in the future.

Inventory menu

Implementing it to the game is in the process.

Bonus: this awesome skeleton!


Thats all for now. Stay tuned, because there will be more updates soon! By the way, do you already follow us on Twitter? :)

Saturday, July 9, 2016

Progress report: first 4 weeks of development

Hi folks! We've been developing "The Traveler" for 4 weeks (actually, 3 weeks and 5 days). Lets see what our small team of 2 programmers and 2 designers has done by now.

Randomly-generated terrain

Infinite seed-based world generation, chunk system, biome/location system, random location name generator (still in development), vegetation placement system, water, smooth edges between locations.


Character with animations

 We also have some more characters and models, but we won't show them now :D

NPC System

We started developing basic NPC system with AI, pathfinding, etc. Mobs are acting pretty weirdly right now :D
P.S. Meet our first animal: Amarbun!

Other stuff

We are currently working on NPC system, multiplayer, item system and interface.

Bonus

That's all for you guys! Want to stay tuned? Follow us on twitter and, if you have any questions, do ask in the comment section below!

Wednesday, July 6, 2016

Meet "The Traveler"

Hey everyone, we started our blog a few days ago but still didn't tell you much about our game. Lets fix that horrible mistake :)


Overview


To start with, the game is about a lonely traveler who runs around the world, meeting different strangers and enemies, exploring cities and villages, finding various obstacles and treasures on his way. Well, actually that traveler is not so lonely, because you will be able to play with your friends in multiplayer mode ;).

One of the key features of the game is endless, procedurally generated world. This means that a broad range of things, including biomes, clouds, cities and creatures, will be generated randomly. Terrain on a screenshot above is randomly generated too. Moreover, a player will be able to switch between multiple worlds! We will write more about world generation and how it is implemented.

In addition to travelling, we plan to add other RPG elements, such as combat, quests and crafting.



Game world

As I mentioned before, a player will be able to switch between different worlds whenever he wants.
Each world is separated into locations. Each location has a different biome type, name, quests and inhabitants. At the moment, we plan to have such ingame biomes: plains, forest, ocean, desert, ice lands, tundra, swamp.

Combat

We are developing non-target combat system with a variety of spells and skills available for player. There will be no classes to choose from. Instead, there will be a talent tree, and the player will be able to develop his character like he wants.

Conclusion

In this post, we touched only some of the basic concepts of the game to give our readers a brief picture of what we're heading for. In the future, we are not going to write much about our plans and we will focus on showing what is already done. So, stay tuned! If you have any questions, please ask in the comments, and don't forget to visit our twitter ;)


Sunday, July 3, 2016

Infinite chunk generation in Unity (4 million blocks - 40 fps)





Voxel-based games become more and more popular these days. It's not surprising, because voxel-based games allow such things as completely dynamic world and procedural world generation. Also, games made of cubes (e.g. Minecraft) look simple yet pretty.
The most important part of a voxel-based game is world. For our project, "The Traveler", terrain generation is critical because the idea of the game is based on travelling and exploration. 
Here are some things we learned from our experience of designing fast, smooth and efficient chunk-based terrain generator.

#1 : Create a mesh for each chunk

Basically, this is the most valuable thing you need to know. Why? At first, our chunk generation used separate colored cubes for the terrain. Results weren’t that good : about 40 fps with only ~5000 blocks(your results may vary). When our team applied a separate mesh generation for each chunk performance skyrocketed to the amount you see in the title.
How is that done? There is a wonderful tutorial on this matter from this guy. To sum up, what you need is:
  1. World controller script, which will control the generation, enabling and disabling the chunks.
  2. Chunk script itself, which will create and hold information about blocks, terrain height(using Perlin noise, supplied with unity or your algorithm of choice), chunks’ mesh and other stuff you will need along the dev process.
  3. Block script, where you will generate vertices(points of mesh), colors, triangles and apply block’s part of the mesh to chunk’s mesh.
A photo of terrain generated using perlin noise in our game called “TheTraveler”(name can change).

#2: Make as many things multithreaded as possible

Yes, you may argue that Unity itself is not entirely multithreaded and its’ API is not thread safe, some of the parts of mesh creation can be made in a seprate thread, provided it does not call any Unity API functions.
Why is it important? As I’ve said, Unity does not fully use all of cores of your CPU, so having CPU working on 50% of its power rather than 20%(depends on the number of cores) will considerably boost your performance. Also, you should bear in mind that thread creation itself has some performance overhead, so the benefits of having multiple threads are more clear when using big chunk sizes.

Partly generated terrain which consists of around 3 million blocks.

#3: Dont use mesh for physics

While I was debugging our game, I found that the application of the same mesh created using mesh generation on mesh collider is using too many CPU cycles. The solution our team found is this - you may use box colliders for physics.
Overview of a chunk. Blue stripes is mesh itself. Green stripes is physics blocks, named "new game object", each with their own collider. Blocks are stretched to reduce performance overhead while creating blocks.

That's all for you folks! If you liked this article and would like to hear more about terraing generation, please subscribe to this blog or our tumblr or twitter accounts. Also, we are planning on writing posts about biome generation, height and color interpolation and much more!
If you have questions regarding chunks, leave a comment. 

Hello world!

Hello everybody, we're "The Traveler" game development team. In this blog, we will share our progress and post various interesting technical (but not only technical) things from our development experience. See you!