English Stranded III Dev. Blog

83 replies
Goto Page
To the start Previous 1 2 3 4 5 Next To the start
04.11.18 06:52:45 pm
Offline Off
I made a tortoise model!
> Watch Tortoise modelling @ YouTube

There's also a (work in progress) texture already:

Stranded I had a turtle (water), Stranded II a tortoise (land). The plan is to have BOTH in Stranded III! INSANITY!

While searching for animals living in tropical rainforests I came across the Toucan. So I made one for the game.

Actually the list I found contains a lot of nice animals and I'll certainly add some more of those.
I mean.. a poison dart frog?! Imagine catching frogs in order to make poison darts! Awesome!

Even More UI Stuff
I re-created a lot more required missing UI components:

Sliders can be used for settings with small value ranges...

...but also for settings with quite high ranges:

Note that the amount of these little vertical bars adjusts automatically depending on the value range but the maximum is capped at 10 (even amount) / 11 (odd amount). Otherwise I would have to display 101 (0-100) of them in the slider above. That wouldn't be very helpful and it would also look stupid.

Useful when you need to see all possible options at once (yup, the image below is a horrible example!)

Moreover there are now context menus and tooltips!
The combobox mentioned above uses the context menu system internally. In fact it's a simple button which opens a context menu on click and when you press any button in that context menu, the button caption/value is changed to match the clicked entry.
Context menus also support scrolling (in case there are too many entries to fit the screen) and sub menus.
Sub menus are context menu entries with a little arrow which open an additional context menu with new entries when you point at them. Context menus can be nested indefinitely in theory. A sub menu could contain another sub menu and so on. Might be useful for the map editor. Maybe. I don't know yet.

(Reminder in case you read all blog entries carefully: Yes, all that fancy UI stuff existed already. It was completely implemented in Lua with a custom Unity 2D system. Now it's using C# and Unity UI!)
edited 3×, last 04.11.18 07:12:19 pm
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
09.12.18 10:27:13 pm
Offline Off
Health, Hunger, Thirst
I tried many different things to display values like health, hunger and thirst.
Circles, crazy shapes, vertical bars, horizontal bars, numbers...

What did I end up with?
Boring standard bars:

Why so?
There are three reasons:
1. Style: I simply didn't like the look of the other options
2. Consistency: It was like that in Stranded I and II
3. Simplicity: Nearly everybody who ever played a game knows the concept of a health bar. Also probably everybody using a PC knows the concept of a progress bar. So I hope that most people understand quickly how that stuff works.

Boring, right? But hey, it's not thaaaat bad! The bars have a fancy icon and an animated glow effect (fun fact: I use a lot of that glow stuff in my game Carnage Contest - an amazing Worms clone! Check it out!)! So they are still better than the ones in Stranded I and II
The icons are just the first iteration by the way. I may decide to change them later.

Sleeping Issues
Experienced Stranded players may now ask: Health, hunger and thirst. Cool, I know that stuff. But what about fatigue aka tiredness?
Well... I'm really sorry to tell you that but it's gone. Again there are multiple reasons:

1. The concept of sleeping (and not being able to do anything for a long period of time) doesn't work well in multiplayer mode
2. Fatigue did not add much value to the game. It limited you a bit in what you can do per day (as there was no efficient way to get rid of tiredness except for sleeping) but in most cases you just slept every night and you were fine.

Sleeping itself won't be removed completely though.

In singleplayer you can still do it to skip the dark night hours.
Depending on the spot you sleep at (house, fire place...) sleeping can also give you some positive or negative effects (e.g. affect health a bit).
If you decide NOT to sleep for a longer time you will suffer from some negative effects like decreased speed and effectiveness.

In multiplayer you won't have to sleep at all and the person hosting the game will even be able to adjust the day/night cycle with a simple setting so people don't have to play in darkness for long or at all (this really only affects the sun light. It does not make the time go faster or anything).
Maybe I will still allow sleeping though. If I do so you will probably be able to rest for a short time. The game will go on normally during that time and you are vulnerable to attacks and theft but you would also get something in return. That might be some health points or a temporary boost on some values/skills.

More bars
Additionally there can be two bars which will only be displayed when they aren't full: Oxygen and stamina.

Oxygen will be displayed when you're diving. That was also part of Stranded II but the bar popped up in the middle of the screen there. It automatically refills when you can breath again. Another fun fact: It wasn't possible to dive at all in Stranded I! Even the ocean was just shallow water you could wade through. An invisible force pushed you back when you walked too far. Crazy stuff!

Stamina is for running. Yes, you will finally be able to run! Only for a short time and it will be more expensive than going the normal speed (hunger and thirst will be depleted faster) but it might save your life in some situations. Stamina automatically regenerates when you stop running.
I didn't make a final decision about this yet but maybe Stamina will also affect some other actions and/or blocking/fighting. This might be too annoying though. I still have to test and balance this.


Stamina and oxygen could be affected by skills/perks and of course also by consumable items or the equipment your character is wearing. I didn't add items for that yet but it would be cool to have something like that in the game.

Palm Trees
I love palm trees. I think they are beautiful and they remind me of warm temperatures and vacation because you don't see them in nature where I live (in Hamburg, Germany). The problem is that there are sooo many variants! Whenever I see a palm tree assets somewhere (e.g. in other games) I take a closer look and when I like them I decide to make something similar for Stranded III.
This is why I just made another version of the palm tree. Basically new hand-painted palm fronds. the trunk is the same as before.

For comparison: This is one of the other versions I made earlier

What about iterative development?
Some people might remember that beginning of this year I planned to switch to a more iterative development approach (entry 76). I didn't want to only keep adding random models to a totally unfinished game. I even set a deadline for a basic multiplayer alpha. End of this year.

It's December now. Only a few more days are left for this year and you see me still posting random models instead of showing game play. I didn't manage to do what I planned to do. No multiplayer alpha.

No multiplayer alpha yet.
I decided to pretend that there never was that virtual deadline. I'll continue with development because that's what I want to do.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
Offline Off
Random Island Generation Improvements
A long time ago a blogged about random island generation. Here are some of my old blog entries about the topic:
> Random Terrain Generator
> Terrain Generator Continued
> Rivers
> More About Rivers
> Voronoi Powered Rivers, Bezier

I used a complex Voronoi/Delauny library for this and then rasterized the data using a polygon fill algorithm because I need a 2D pixel array for the heightmap.
After doing some more research however I realized that generating a Voronoi diagram directly as a 2D array is quite easy. I even found a site with minimalist Delauny diagram implementations for various programming languages.
No C# implementation there but the approach is so simple that it only took a few minutes to write a working version for Unity in C#. The only problem with the approach presented there (I only looked at the Java version) is that the algorithm is not optmized at all and gets a lot slower with increasing numbers of Voronoi sites.

What it does is extremely simple:
• for each pixel in the array:
     • find the closest Voronoi site by iterating over all sites and saving the shortest one with distance
     • tint the pixel in the color of the site with the shortest distance

There are two problems with the implementation:
• Checking the distance to ALL voronoi sites for each pixel: This makes the algorithm super slow with increasing numbers of sites. The solution for this is to only check the distance of adjacent sites. I'm creating the site points in a grid pattern so I know all the neighbors. This makes it easy to implement this optimization.
• Square root calculation in distance calculation: Calculating a square root is a relatively expensive operation. This operation can simply be removed because we only compare distances and don't need the actual distance. This has no huge impact but still makes a difference.

I solved both of these problems and achieved a fair performance that way.
The best thing however is that this approach is so much easier and requires just like 1% of the amount of code that I had before.

To test my new implementation more easily I made a little separate Unity project which you can try in the browser:
> Try the Web Map Generator
Note that this is just a very basic version which only creates a basic island shape and assigns some random colors. Also it doesn't work perfectly well with non-square map sizes.

Further Optimizations
Another thing I'll change is the resolution I'm using for the random map generation.
I was insane enough to work with a 1x1 m precision for all operations. Now I plan to reduced the base resolution to 4x4 m or maybe even 8x8 m.
Imagine a 256x256 m island. With the current calculation this leads to 256x256 "pixels" which is 65.536 pieces of data (each representing 1x1 m).
With 4x4 m precison the values change a bit: 256 / 4 is 64. 64x64 results in only 4.096 pieces of data. That's only 6.25% of the original data and therefore allows a much faster world generation. With 8x8 m it would be only 1.024 pieces of data.

Of course simply doing just that would make the generated maps blocky and ugly. That's why I will switch back to the 1x1 m precision after generating the basic map layout. I'll then apply simple smoothing algorithms and perlin noise to get more detailed and non-blocky results.

Red Cross
Someone in the comments pointed out that the red cross can be problematic in video games and he's totally right about it.
Therefore I replaced the red cross with a heart - which is a better logo anyway
edited 1×, last 13.01.19 11:36:27 pm
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
14.04.19 09:32:35 pm
Offline Off
Oops! Exactly 90 days without a dev blog post! I'm still alive!

Nested Prefabs
Basically everyone working with Unity for some time already has been waiting way too long for nested prefabs. Some Unity updates ago this feature has finally been released in a "stable" (non beta) version of Unity.
For Stranded III they are especially useful for UI. I can now make one single slider prefab for instance and re-use it everywhere. When I think the slider looks ugly I can just change the prefab and all sliders in all menus will be changed accordingly.
This did not work with earlier versions because the menus themselves already needed to be prefabs and Unity did not allow to put prefabs into prefabs (in other words: It did not allow to nest prefabs).

To benefit from this change I had to replace all non-prefab objects with prefabs. Some manually and others with the help of some scripts I wrote. This procedure wasn't a lot of fun but now it's done.

Banana Plant
I made a banana plant with hand painted leaves!
Bananas can just be picked and eaten when they are ripe. This makes them an easily accessible food source. Useful for survivors which are not well equipped yet.

> View Banana Plant on Sketchfab

Moreover there's a palisade now. I just modified and copy & pasted the log model to make this one.
Even though there is a version with a window the palisade is only meant to be used as a protection for your camp and not as a wall for buildings.

I plan however to add some more log based building blocks. Some ideas*:
• a gate which can be opened and closed (like in Stranded II)
• ... and maybe a way to close the window in the palisade as well?!
• a wall walk which can be built behind palisades and other walls
• various different parts to build a log house, tree house, towers etc.
• a jetty (yes, again like in Stranded II)

*) Just ideas. I don't promise that all of them will make it into the game.

Cool Links
I found a very nice guide in case you're interested in stylized 3D modelling.
It contains a ton of advices and common mistakes that should be avoided.
> Stylized 3D Production Guide

There are also many other interesting and useful game dev articles on 80.lv!
So if you're interested in this topic you should definitely take a look!
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
To the start Previous 1 2 3 4 5 Next To the start