Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411491 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 04:16:49 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsCaveland - isometric co-op sandbox-building game
Pages: [1]
Print
Author Topic: Caveland - isometric co-op sandbox-building game  (Read 2565 times)
Cbeed
Level 0
**

Test


View Profile WWW
« on: March 16, 2015, 06:59:00 AM »

So I just launched the early access sale and made the game public. That's the point where I want to finally start a devblog. I did not want to share progress on a devblog until I have big parts of the game design and technical prototypes tested.
Also in the normal case I'm always lurking so I hope this helps me get more into writing. Can somebody also tell my how to add a profile picture? The profile settings don't save my picture Sad

About the game




Official Site

The game is a sandbox-building-game in which a base must be constructed and the environment and dangerous caves explored for resources, which can be mined by automatic mining systems. The block world is a home for vicious robots, who sometimes make construction hard.

You can play in co-op or alone. The game features a level editor which I hope people will use to build and then share some maps.

The game is inspired by the German game Clonk and the Swedish game Minecraft (obviously).

About the devlog
I guess the develop entries will be mostly about technical stuff.
Caveland uses Wurfel Engine, wich I developed all by myself, in its latest version. Wurfel Engine v1.5 is Open Source Software under BSD-3 license but I decided to do the ongoing development on the engine as closed source for mainly privacy and commercial reasons. In v1.6 I added some cool features where the most interesting I want to explain.

You can find the game on several sites:
Official Site - Facebook - IndieDB - my twitter - official subreddit
« Last Edit: October 25, 2015, 08:43:51 AM by Cbeed » Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #1 on: April 11, 2015, 07:46:31 AM »

First devlog entry
Technical changes
Data handling
To support the split screen on an open world I had to rewrite most of the block data handling. Previously everything was stored in one three dimensional array and chunks were removed from this array and added if you moved around the map. If you have a second camera they both must share the data which does not work if one camera goes to the left and one to the right. So now I'm using custom containers and iterators. Iterating is bit slower but some things are faster like loading new chunks. A new chunk can now just be added to a list. With a 3d array I moved chunks of data inside the array.

CVar System
I had some messaging system from which I could enter „cheats“. I extended this into a more proper in-game console. You can modify and read some variables which is very handy for development but also can be useful tool for the user. For example you can modify the the game speed or change the color of the fog during runtime.
I will extend this to have game, world and save specific cvars. 
Small video of auto suggestion feature

Normal map rendering
Because all the assets are pre-rendered in 3D we could generate normal maps. At the moment the light engine only supports two global light sources: the moon and the sun. It looks very beautiful because we can put as many details as we want. However the art style of the game is still some low-poly. Maybe you have seen a youtube video of some game engine doing this. However he has dropped the work of it because texture sizes were too big. Wurfel Engine solves the problem by using tiles. 
Also the world is only shaded by diffuse light which is faster because no specular map is needed and diffuse light can be calculated with only one dot product. This is some nice coincidence of the art style and the algorithms working so well together.
In future I want to upload some local light sources via uniform to the shaders. But I guess there will some performance issues if there are too many of them. I’m still new to this topic so I have to take an extended look at this at a later time. Before that I will implement local light sources via the vertex color like I did in WE v1.3. I think this feature is a must have because during night you want to have some light somewhere.


Sound engine
I added some sound engine which at the moment handles only the volume of the sounds based on the position. It needs some tweaking though. Using libGDX I am a bit limited by the interfaces. I have to do some research on how to access OpenAL directly for adding some special effects and filters later in beta.



I would be very happy to hear your feedback, share knowledge and answer your questions.

No feedback yet  Droop

Second progress update

Adding Save Slots and Improving the Data Format
How to Implement an Open World with Real Time Actors

Recently I found a fundamental flaw in the connection of my game design and the possible technical implementation. What if you want to have mine carts and robots working autonomously all over the map which is theoretically limitless in size? At this time I was only storing nine chunks around the player character in memory where stuff could actually happen.

I found three ways do solve this:
  • Have the complete map in memory -> limit map size
  • Have everything in memory where something is happening.
  • Change the game design

First I started implementing the first solution but I dropped my work on this because it’s more limiting then the second solution.

The second solution sounds like it needs a lot of performance and memory. However I found a way to change the way Wurfel Engine handles the data.
It needed a new data format. Now I’m storing every block with only three bytes. Consisting of the id, a sub-id, which I call ‘value’ and the health of each block.
The old way was to have one object for rendering and game logic. So even if blocks were not visible they contained many information not relevant for the game logic. Also each block managed itself in the normal OOP way. Now a table is used for a lookup which id and value par has which properties. Also I dropped the update call for each block in memory.

Currently the default chunk size is 10*40*10 blocks which means there are 4000 blocks in each chunk. At 3 bytes for each block + 8 bytes object overhead (source) (=11 byte/block) 44,000 bytes are stored for each chunk which means each chunk is using 43 KibiByte.
With 200 MB I can now store ca. 4,500 chunks which is like 45 km in each direction which equals like 2025 km^2 which is almost two times the size of Hong Kong.

So if data is needed it is loaded and being kept until a memory limit is exceeded.
Nice side effect is that there are less allocations of memory which are often a bottleneck and once a chunk is loaded I can keep it in memory. Also the amount of file reading is limited to once per chunk which helps keeping the frame rate stable.
To keep having things like animations the visible chunks are stored as a kind of duplicate as in the old way as dynamic objects with all the data they need.
Working on the clipping again also fixed some bug, black spots appearing if you played in split screen, which made it even into the alpha launch trailer :D

Adding Save Slots

The new save format copies chunks from the root folder in a sub folder. The sub folder then works as previously. I changed the user interface of the main menu and added the option to select a save slot. It is not very nice looking but will be improved some day.

I also updated the CVar system (console variables) allowing strings to be used. They will replace the map meta data file soon.





Next Update
Next update will likely have little gameplay changes or additions however this update lays the foundation for much and proper working content.
There are still some bugs related to the fundamental changes and once the game runs with at least the same features as before I will release the next update.
« Last Edit: September 30, 2015, 06:49:15 AM by Cbeed » Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #2 on: April 25, 2015, 02:53:17 PM »

Stumbled across this: http://gamedev.stackexchange.com/questions/98912/making-a-night-scene-without-being-dark-on-the-monitor

Result:
Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #3 on: May 24, 2015, 07:57:37 AM »

I just added some simple camera leap:

Feels so good.

Also recently added the sword loading animation
Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #4 on: June 26, 2015, 04:10:37 AM »

So Alpha 4 is now live. Gentleman

The update can be obtained in the download section at Humble once you purchased the game.

Changelog
  • Changed map format to skip the entities if they are broken.
  • Added Portals.
  • Improved design and functionality of the developer console.
  • Added ambient occlusion.
  • Content of backpack now will be dropped upon leaving the game.
  • Made dialogue for chats or selections uniform.
  • Added sound for cutting the trees.
  • Jumping behavior changed to regular non-realistic Jump’n’Run behavior.
  • Less glitches with the Ejira attacking.
  • Added camera delay.
  • Added sword attack loading overlay
  • Always uses game controllers if they are connected.
  • Second player has slightly different color.
  • <stuff I don’t remember implementing>

Portals

The portals can be set via the level editor and the target configured by selecting it and then entering the coordinates in the console.

setportaltarget <x> <y> <z>

The console can be opened with F1 key.

The portals will be used to enter and leave the caves.


Ambient Occlusion

You can set the strength of ambient occlusion (ao) to a value between 0-1 via the console “ambientocclusion <float value>”. 0 disables it.

In normal cases ambient occlusion is implemented via SSAO. SSAO is a perfomance killer. Due to the perspective and the sprite based rendering Wurfel Engine can implement it via sprites which don’t cost much performance. The ambient occlusion needs some tweaking tough. There are cases which are not covered by the ao analysis. Also the ao sprites are not matching perfectly.


I wish to make the shadows dependent on the position of the light but further graphics tweaking has a low priority at the moment. Especially at night it looks super nice.


Guide

I also uploaded a new guide. I forgot to include it in the build.

Roadmap

  • Implement fully working economy with crafting and building
  • Combat in the caves.
Logged

My game: Caveland
RaconteurNick
Level 1
*


Business Dude @ Raconteur Games


View Profile
« Reply #5 on: June 26, 2015, 04:30:39 AM »

This looks really freaking cool! Keep on keepin' on, can't wait to play it when I can afford it Smiley
Logged

Suedeash
Level 0
***


That guy.


View Profile
« Reply #6 on: June 26, 2015, 07:31:54 AM »

Dude, this looks FANTASTIC! I've just bought the game right now. Do you mind if I make a gameplay video soon? I can post a link to it here, if you want. Smiley
Logged
Suedeash
Level 0
***


That guy.


View Profile
« Reply #7 on: June 26, 2015, 07:40:48 AM »

Dude, this looks FANTASTIC! I've just bought the game right now. Do you mind if I make a gameplay video soon? I can post a link to it here, if you want. Smiley
Well, I just went and downloaded it, and I keep getting an error whenever I try to run the .jar. I'll admit that I'm not the most Java-savvy person out there, so I'm not really sure what to do.
(The error itself says that ''A Java Exception Has Occured.'')
Any ideas?
Logged
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #8 on: June 26, 2015, 10:13:24 AM »

Dude, this looks FANTASTIC! I've just bought the game right now. Do you mind if I make a gameplay video soon? I can post a link to it here, if you want. Smiley
Well, I just went and downloaded it, and I keep getting an error whenever I try to run the .jar. I'll admit that I'm not the most Java-savvy person out there, so I'm not really sure what to do.
(The error itself says that ''A Java Exception Has Occured.'')
Any ideas?

I just responded to your comment on youtube but maybe another person has the same issue.
Can you please run the game via "java -jar pathtothejar" and send me the error message? Startup crash is worst case thing what can happen Shocked I'm sorry that you ran into this issue but this can happen of course.  Embarrassed
Normal case are some missing library folders or some internal path error.
Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #9 on: August 09, 2015, 05:49:29 AM »

Lighting: Radiosity shooting vs gathering
I have worked a bit on the light engine. It needed an extension that I can have colored light and light beyond the scale from 0 to 1 to make blocks stand out if the scene is dark. Previously brightness level 1 at night was still dark.
For the lighting I use an approach which can be compared with radiosity.

With the “update-approach”, which I tried before, each block had to collect the light it gets. This is similar to “gathering” when using radiosity procedures. A light source would be updated and set the light to a different level ignoring other light sources. So each changed block has to perform an analysis of the surrounding blocks. This is too expensive so I dropped that.

Today I tried a different approach. The engine iterates over each chunk at each frame to reset the lighting. Then the light can be accumulated for each surface by sending the light from each light source. This is similar to the radiosity-“shooting”-approach. The performance seems to be okay and the result is also working as expected.

To prevent iterations I store as many data as I can in each block in memory. But because the amount of blocks in memory can get huge I have to improve the memory consumption. Therefore I store 4 integer values for all the lighting information of each block. Each side has one integer at each 32 bit. Then I store a color with 10 bit for each channel in RGB format (many bit wise operations).

A whole block has another colorless base light level which is used for the shading based on the height. You can see it in this screenshot:



Here is screenshots of the result and a gif. The flickering is achieved by randomizing the light.



Gameplay changes
I added the caves which are procedurally generated. At the moment the caves all look like the same and are just simple rectangles. The caves also have some robots in them, which you can fight, and each cave has a portal to a next cave.
The generator uses a function which gets three coordinates as an input and the output is a block ( f(x,y,z)=i ). The nice thing about this that you can debug it via console by two nested for loops.





I also improved the crafting and the building. Both should be working properly and as intended soon.

Update
The features covered here are part of Alpha 5 which is not available yet. Current version is alpha 4. The update should be available in the the next two weeks.

Gamescom and JOIN
I was at JOIN, the local multiplayer games summit in Berlin. I talked with some other devs and I think I have to rethink the aesthetics of the game. It looks too much like minecraft however with the core gameplay I want to go into a different direction. Minecraft is more about exploring and creative building. Caveland is about tactical building and action based combat.
I hope to be at Gamescom in 2016 with a small booth. It should be possible.
« Last Edit: August 09, 2015, 05:56:21 AM by Cbeed » Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #10 on: September 02, 2015, 06:37:36 AM »


I know it's ugly, but at least it's working. You can enable or disable the editor via the in-game menu. If you enable it there appears a pause button in the top right corner where you can enter the editor. The editor is part of the game to allow easy editing of custom maps. It’s the same I use for debugging and developing and creating maps.

There will be a complete UI redesign later this year.
Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #11 on: September 30, 2015, 06:46:55 AM »

Debugging:

Result:

I’m currently improving the dynamic local lighting. My old raytracing algorithm had a flaw and was incredibly slow. I am using a fast voxel traversal algorithm but it does not work with a staggered map layout which Wurfel Engine is using. I still have to find a solution for that for better results when blocks are casting shadows.
The current design stores the result of the radiosity light algorithm in a small cache in form of a cube. The concept is working however it needs some tweaks later in the beta. For now it’s important that the new point light sources can be used for various things in the game and used for the gameplay.

I will later crosspost another big status update here in this thread after I updated it. You can read it here on my blog: http://cavelandgame.tumblr.com/post/129338334658/on-the-road-to-beta
Logged

My game: Caveland
Cbeed
Level 0
**

Test


View Profile WWW
« Reply #12 on: October 25, 2015, 08:30:57 AM »

Alpha 6 just went live. It has been hard work.
I also just  updated my trailer:

.

Here is a list showing all major changes in this alpha version. You can get the latest version in the download section at humble bundle after you bought the game.

Beauty changes & new content


added point light source


added more cases for ambient occlusion


added power cable


added in-game menu

added one HUD button to switch between editor and gameplay


added barrier blocks


added logic blocks (blocks that that work like entities but are blocks)

Further Gameplay

  • added tutorial level
  • added preview for rails when constructing
  • added support for indestructible blocks

Editor

  • added alt-click in editor
  • added keyboard access via number keys for the editor tools
  • added button to create a new empty map
  • added function to load a map from the start game screen

Performance & Stability

  • improved loading speed of chunks
  • improved stability
  • improved handling of resolution changes
  • improved responsiveness when switching between the editor and the game
Logged

My game: Caveland
marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #13 on: October 25, 2015, 09:04:43 AM »

I'm using pre-rendered images in my game too and considered using that uv-mapping-lighting technique. interesting stuff. I ditched the idea, because I could not think of a sensible way to handle self-shadowing and it would add a lot more work/textures.

sorry to say this, but I'm strongly disliking the shadows. the worst one is for some reason on top of the characters feet. what a weird choice, but it should be easy to fix! generally you have a lot of shadow on top of areas, that should absolutely not be dark. the ambient occlusion on the blocks looks terrible, I understand why you added it though. is it possible to only add it in the dark corners?? my definition of dark corners would be the inner corners that get no direct light. additionally, make those shadows a lot less dark!

I don't understand the low-poly approach with the technique you are using. imho you should use real 3d with low-poly or make use of the technical investment and go high-poly. as it is, you are gathering all possible drawbacks into one system. low-poly without real lighting, extra effort to render all positions/animations. you likely have much more data than you would have if it was all polygons.

I'm quite impressed with what you are doing and I'm pretty sure you can make a great game out of this, but you will need to change a few small things to make it look good.
Logged

Cbeed
Level 0
**

Test


View Profile WWW
« Reply #14 on: October 25, 2015, 10:32:49 AM »

sorry to say this, but I'm strongly disliking the shadows. the worst one is for some reason on top of the characters feet. what a weird choice, but it should be easy to fix! generally you have a lot of shadow on top of areas, that should absolutely not be dark. the ambient occlusion on the blocks looks terrible, I understand why you added it though. is it possible to only add it in the dark corners?? my definition of dark corners would be the inner corners that get no direct light. additionally, make those shadows a lot less dark!

I don't understand the low-poly approach with the technique you are using. imho you should use real 3d with low-poly or make use of the technical investment and go high-poly. as it is, you are gathering all possible drawbacks into one system. low-poly without real lighting, extra effort to render all positions/animations. you likely have much more data than you would have if it was all polygons.
Thanks for the helpful feedback. Smiley The ambient occlusion cases don't match really good and this will be fixed soon. I'm a bit surprised that you find they look terrible. In comparison  with and without it looks wonderful. The brightness can be tweaked though. Maybe it is a bit too much.  Decreasing the AO on the top sides is also another good idea which I have to try. I think the best would be to do a simple study ("What do you like the most: A, B or C?") on this subject once I have the final sprites and optimized the algorithm.

I'm making a little shift in a high poly direction like with the new bush block for the reasons you stated. I don't want to have a total art change though and I don't aim for photorealism so I hope this is the middle way. I could render very high poly but without specular and glossy maps, bloom etc. I guess it would look cheap.

EDIT: also the shadow thing at the feet. I know that it looks weird but it some "developer does not see it any more because it was always there" :D I should get my QA guy back so I don't miss that...
« Last Edit: October 25, 2015, 10:39:01 AM by Cbeed » Logged

My game: Caveland
marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #15 on: October 25, 2015, 12:48:31 PM »

glad you took the criticism well, I can be a bit harsh sometimes. I'm also very shadow sensitive Shrug
the main character looks great by the way, I forgot to mention that before Wink
the bushes are one of the things that kind of annoyed me. it would be pretty easy to add a leaf shaped texture onto the triangles without much detail and i'm sure it would look a lot better. the trees could also be made more in the style of the character and it would not look cheap. you could be using a lot of spheres, as that is something that is not so easily done with polygons. there are so many simple forms that are not low-poly and should be just as easy to create. e.g. use a lathe-object to create the pine-trees. this would likely give you a more unique look and make the choice of tech a lot more sensible.

https://www.google.ch/search?q=lathe+pine+tree&es_sm=93&biw=1734&bih=854&source=lnms&tbm=isch&sa=X&ved=0CAYQ_AUoAWoVChMI8Zf7nr_eyAIVBbwUCh2aNASM

maybe it would be possible to add the ambient occlusion only to the vertical faces? its the weird shadow on the ground that really disturbs me most Smiley
« Last Edit: October 25, 2015, 12:53:34 PM by marcgfx » Logged

Cbeed
Level 0
**

Test


View Profile WWW
« Reply #16 on: November 20, 2015, 04:20:22 AM »

I made a quick video where I show my stuff and workplace for my game development. I hope this is interesting for some people.
Behind the scenes of Caveland
Logged

My game: Caveland
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic