Progress Update #38

  Preparing for Launch / Open Beta Post-Mortem


    This is the last full sprint I'll have before the game officially launches in v1.0. I did a small amount of promotion for the open beta that got some people playing the game. I also made fixes and optimizations as well as a tutorial in preparation for the game's launch.

Open Beta

    I posted the game in 3 game-dev related subreddits and the project sharing channels of two Discord servers. The game page was viewed 72 times and downloaded 22 times for a download rate of 30.5% which I am happy with. According to the analytics page though, all of those people came from reddit so I will keep that in mind for future promotion.
    I only got one bug report from the beta though. I assume because if you give the game to the public then most people won't be actively trying to break the game so I guess that's excusable. I did get a few questions though on how to play the game which finally pushed me to make a tutorial.


The Tutorial

    There really isn't that much to talk about here so I don't know why it has its own section. The tutorial I implemented is simply 6 slides that outline controls and a few basic mechanics. I tried to include pictures where relevant as well. To better show key-binds I added the Pro Icon Pack which I believe was free on the Epic marketplace for some time. I really only used the WB_Icon_Base that comes with the pack to keep formatting consistent and some mouse images.
    The only logic I implemented was for switching slides and that took a few minutes:

Cleaning Up Multithreading

    The last major thing I did was make the multithreading a little nicer. When I first wrote it, the terrain face multithreading system was not meant to be permanent. It used the AsyncTask() function which was not ideal for a few reasons; 1) you didn't have a reference to the thread so you couldn't 2) get its progress in completing its task or 3) force it to stop, (this was the cause of in-editor instability) and 4) reconvening the threads was a mess. Because of these reasons I knew it had to be replaced at some point but since it was functional it stuck with me from pre-alpha until now.
    When I was first learning about multithreading I came across Unreal's FRunnable class so when I got to rewriting I started there. Eventually I found a legacy unreal wiki page about it and it was this page that I used for the majority of my reference. I did make one major adaptation from the code supplied by that page; that is that their example uses a singleton type of implementation whereas I needed multiple instances (one thread per terrain face per terrestrial planet) of these FRunnables so I just stripped all static variables and functions to rake care of that. 

    The only thing that I want to call special attention to is line 194 where we create a copy of the mesh data before calculating normals for the mesh. This, as the comment explains, is to prevent a crash if we interrupt this thread while its running as would happen if we want to regenerate a planet before its done. The reason it crashes is due to Data being used by reference. CalculateTangentsForMesh() uses the vertices of the mesh (Data.verticies (I know it's spelled wrong, it has since been fixed)), but if a new thread were to be opened using the same data then Init() of that new thread would empty the vertices array (line 141). This would instantly crash the game with an out of bounds exception as it tries to read element 1,531 or something out of an array of size 0.
    I did try to fix this another way by copying the definition of CalculateTangentsForMesh() directly onto line 194 and adding checks before array accesses to see if the thread had been requested to stop but all those branches made it run much slower so that was immediately scrapped.
    With these changes made I was able to have much finer control over how threads are run and could stop worrying about the instability of the engine version making its way to release.


Release

    As it stands right now the game is set to release in v1.0 on Monday September 6 at 12:00PM, 69 hours from me writing this, and I will have absolutely no problem making that deadline. There are no known issues with the game and so I might do some last-minute testing and fixes but that's about it. 

Comments

Popular posts from this blog

Mini Solar System Postmortem

A New Chapter

Polishing the Foundation