Achievements & Skins!
Acheesements
One of the pillars of Moon Cheeser is the achievement system. During to the nature of the game being action based and an infinity runner, which doesn't have objectives other than keep avoiding obstacles and scoring, I thought about adding an acheesement system. Since the very beginning of the Moon Cheeser's design I saw the need of giving objectives to the player and this week after the core gameplay mechanics being implemented, I started to work on the achievements. That's how they work:
- A .json file keeps all the info about the achievements
- A singleton reads the .json file and keep the info inside a dictionary
- The game objects emit signals to that singleton so it can update the data
- After each game over the dictionary is written again in the same .json file, overwriting it
- Every time the Achievements scene is open this file is read again by the singleton so it read the updated content
To match the overall concept of the Achievement scene (which also include the available skins) I divided it into 3 sections
- The top one which will only serve as a back to the title screen option
- The bottom one which is where the achievements and skins are displayed
- A hidden dialog which will popup to indicate the info gathered by the achievements singleton
With Godot's Control nodes it was an easy task to structure everything.
The flow of the Achievement screen goes as follows:
- Every achievement button passes a signal to the achievement handler (the ScreenMargin node)
- This signal tells which achievement should be read in the achievement singleton
- The achievement handler gather the data and sets the dialog node's (an AcceptDialog node) text and title
- The text follows a simple structure:
- It takes the description of the achievement (used in the .json file)
- Concatenates it with a string "and you already accomplished"
- Then take two placeholders one for the current accomplished amount and one for the total
As I said, all the data regarding to the achievements is stored in a simple human readable .json file. To add or remove or modify an achievement I just have to mess with this file and in the case of new achievements I just have to connect a signal to the achievement handler passing the name of the achievement to be retrieved. This is how this data is structured:
Skins
In addition to the acheesements there will be many unlockable skins, which will require some accomplished achievements to be unlocked. It is as simple as the achievements.
There are hidden nodes in the Achievmeents Scene which will only be shown if the needed achievements are completed. For every skin unlocked the respective button will be shown. When clicked this button will change the default skin of the object it modifies, which it stored on a skins singleton which also reads a .json file to know which skins will be shown and which resource should be loaded by them.
The data is structured like this:
Ok, I'm not a data manager or anything like that, so they might be structured in some weird way :c
You can check how does it work in game by watching a demo at my vid.me:
https://vid.me/c0Vev
That's all for now guys, sorry for being late this week I was participating in LD#39, you can check my entry at UNTRUSTY page. That's it, keep developing and until the next time <3
Get Moon Cheeser
Moon Cheeser
Is it possible that somewhere in the space there's a moon made out of cheese?
Status | Released |
Authors | Pigdev, Henrique Campos |
Genre | Action |
Tags | assets, Casual, Cute, flat-shading, godot-engine, infinite-runner, one-button, Singleplayer, Space, Vector |
Languages | English |
Accessibility | High-contrast, Interactive tutorial, Textless, One button |
More posts
- Manual is out!Nov 21, 2020
- Blue Moon update!Nov 02, 2020
- I miss manuals :(Oct 09, 2020
- Small fixes and additionsApr 05, 2019
- Moon Cheeser v2.0.0!!Apr 03, 2019
- SwingPivot: Procedural Swing AnimationMar 22, 2019
- Particles are back and better in v2.0.0Feb 28, 2019
- Making reusable AssetsFeb 27, 2019
- Refactoring on the Core Loop! Better Code Coming Soon!Feb 13, 2019
- Port to Godot 3.1Sep 18, 2018
Leave a comment
Log in with itch.io to leave a comment.