Devlog #003

Posted by Kenneth Ellersdorfer

Hello capitalists!

I've been quite busy since the last devlog. Let's get right to it!

Scenarios

For the tutorial, I did need a system that can be used to provide a scripted game experience. So it felt quite natural to me to implement the tutorial as a scenario, and so I've built the scenario system to be quite versatile and give a lot of control over the game experience. This has been implemented by allowing scenarios to be defined in XML files, where they are represented as a tree of nodes which can define behavior in different stages of the scenario.

It is probably easier to explain this by showing some XML code than trying to describe it ๐Ÿ˜€

<ScenarioPrototype Id="Scenario_ProfitableBusiness_Easy">
            <displayName>Profitable Business: Easy</displayName>
            <description MultiLineStripIndents="True">Prove yourself! Build a profitable business from nothing but a starting capital raised from investors.
                Start with 4 million dollars.
                You have 10 years time to accummulate 10 millions in cash.</description>
            <selectableMainMenu>true</selectableMainMenu>
            <worldGenerator>WorldGen_Default</worldGenerator>
            <fixedWorldSize>512,512</fixedWorldSize>
            <playerStartingMoney>4000000</playerStartingMoney>
            <rootPart Type="ScenarioPart_Node">
                <id>Root</id>
                <parts>
                    <li Type="ScenarioPart_Goal">
                        <id>Goal_TimePassed</id>
                        <successSignal>EndFail</successSignal>
                        <uiDescription>10 Years passed (fail)</uiDescription>
                        <condition Type="ScenarioPart_Condition_YearsPassed">
                            <id>YearsPassed</id>
                            <years>10</years>
                        </condition>
                    </li>
                    <li Type="ScenarioPart_Goal">
                        <id>Goal_HasCash</id>
                        <successSignal>EndSuccess</successSignal>
                        <uiDescription>Hold 10 million in cash (success)</uiDescription>
                        <condition Type="ScenarioPart_Condition_HasCash">
                            <id>HasCash</id>
                            <amount>10000000</amount>
                        </condition>
                    </li>
                    <li Type="ScenarioPart_SignalNode">
                        <id>EndFail</id>
                        <enableSignal>EndFail</enableSignal>
                        <part Type="ScenarioPart_EndScenario">
                            <id>EndScenario</id>
                            <outcomeTitle>Scenario failed</outcomeTitle>
                            <outcomeMessage MultiLineStripIndents="True">Good try, but you did not reach the scenario goal.</outcomeMessage>
                        </part>
                    </li>
                    <li Type="ScenarioPart_SignalNode">
                        <id>EndSuccess</id>
                        <enableSignal>EndSuccess</enableSignal>
                        <part Type="ScenarioPart_EndScenario">
                            <id>EndScenario</id>
                            <outcomeTitle>Scenario successfully finished!</outcomeTitle>
                            <outcomeMessage MultiLineStripIndents="True">Well done, you reached the scenario goal!
                                That's it, there is no special reward or anything. But I assure you that you've done well :)</outcomeMessage>
                        </part>
                    </li>
                </parts>
            </rootPart>
        </ScenarioPrototype>

This structure makes it super easy to create new scenarios, to reuse code, and to open up this system for modding. Overall, I consider this implementation a great success, and I'm sure it will be used in creative and amazing ways in the future.

Tutorial

Now onto the big part of this devlog. The tutorial. A lot of time has been put into creating the tutorial. I've started over a few times and restructured the scenario system in the process. Ultimately, I'm not fully satisfied with how it turned out, but it should be good enough to be used while the game undergoes internal testing.

Before I talk about what is wrong with the tutorial and what to do better, I've recorded myself doing the first about 30% of the tutorial.
See the video here and afterward read further to see what's bad and how to improve on it.

Does look fine to you? Well, it did to me initially as well. But there's an inherent issue with tutorials built like this.
It is so damn exhausting to follow them! While testing this revealed quickly to me, playing through the tutorial for about 10 times in a development session of a few hours very soon felt like really annoying "work".

The reason for the tutorial feeling like annoying work after some time is that there is no sense of progress, no real sense of accomplishment. You almost blindly follow instructions after a time and just hope for it to end soon. While this may work for some people, I am certain it will not work for anybody, and it will put off a lot of players after buying the game.

So, what to do?
That's a good question and I do have an answer to that, I'd like to refer to this excellent video a friend sent me:

As for now, I won't be changing the tutorial since it works well enough for internal testing. It does convey and explain the inner workings of the game, and so it will work for people who are committed to test the game while it is being developed. For the first public release, however, I intend to entirely rework the tutorial. I'm not sure yet how it will look like, but it won't stay like this for sure ๐Ÿ˜€

Lexicon

Let's get to the next part of the tutorial, which I've implemented. And with this part I am really happy how it turned out. Due to the complexity of games like capitalist empire, it's very often required to constantly look up things on the internet about the game. I am hoping to eradicate this need by providing a sufficient wiki, called the lexicon, in game.

This lexicon does contain information about recipes, buildings, items, vehicle types and also some written tutorials about individual game mechanics in case you need to look up how something works. It is intended to be always available for the player and allow him to learn progressively by just playing the game and looking up things. It is, however, not intended to fully replace the tutorial.

I've taken some screenshots, so have a peek at the current implementation here:

Technically the lexicon is nothing too special, lexicon categories and pages can be defined in XML, but there is also code to programmatically generate these for game data like items, recipes, buildings, ... And this concludes this devlog. I've got nothing else to share for now. I hope you enjoyed reading this article.

Thanks for reading,
Have a nice day!