Dev Blog

Hi, this is the Stranded III development blog (see also Forum Thread, Comment Thread).

Overview (116 Entries)

Entry 100 - One Hundred - May 24, 2021

ONE HUNDRED
IMG:https://stuff.unrealsoftware.de/pics/s3dev/100_pre.jpg

> Click for bigger version


Dev blog number 100! Wow! The first blog entry was in August 2012. It's April 2021 now. Ooops. That's nearly 9 years.
Thank you for still following this blog! I actually wanted to do something special for blog entry number 100 but I didn't manage to finish anything special so... nothing special today. I still wanted to post something so you know I'm still alive.

Keep It Simple: Definition Inheritance
I mentioned that fancy definition inheritance feature in one of the previous dev blogs.
The thing is: Inheritance is super useful (given that people understand how to use it) but it makes things more complicated to understand and comes with several new problems. E.g. when using inheritance you have to ensure that you also include the (abstract) base classe(s) your definition(s) inerhit from when you share them with others or when you take them to put them in your new mod.
Therefore I decided to entirely scrap that feature. Sorry! It's better that way. A nice side effect is that it makes the definition parsing code simpler and maybe also slightly faster.

Unity 2020
Unity version 2020 is now a stable long term support (LTS) version. So I switched to it - without any major problems.
Fun fact: Do you remember my blog about time and how I questioned Unity's decision to use floats for time values?
They fixed that and introduced double precision values. They even recommend to use them instead of the old float ones!

Moving Sunlight And Shadows
I have the feeling that Unity 2020 performs much worse when I move my light source (the sun) than Unity 2019 did. Might also be just a new/changed setting. Not sure. I didn't find a reason yet.
To handle that problem I now implemented what many games with a day/night cycle do: I don't move the sun every frame or every few frames anymore. Instead I move it once quickly every X minutes (actually every game time hour right now). That way there is no constant performance impact caused by light calculations.

Here's what I mean (time elapses faster in this gif for demonstration purposes):
IMG:https://stuff.unrealsoftware.de/pics/s3dev/movingshadows_pre.gif

> Click for bigger version (3.4 mb)


Other games do it the same way and I'm pretty sure it's for performance reasons too.

Disqus

blog comments powered by Disqus