Silence test-project Devlog


Silence RPG Test Scene
Postmortem Devlog

So my final solo assignment for Scripting 3: Technical Architecture was a RPG scene including a conflict system, inventory and equippable items, as well as a save/load feature. Here are the minimum requirements (worth 60%) for the prototype. It also comes with a technical design document describing all systems. 

  • Code quality
  • A moving character
  • AT LEAST 1 character
  • Menu system to equip items
  • AT LEAST 1 enemy
  • AT LEAST 1 way of getting new items
  • AT LEAST 2 Equipment items that affect stats
  • AT LEAST 1 kind of conflict system
  • Bonus if enemies have their own inventory and equipment


PROJECT START: Nov. 2

Since all this was completely alien to me, I decided to go with a simple Rock/Paper/Scissors conflict system, where the player would be able to equip items on their Archetypes (Rock, Paper and Scissors archetypes) to boost their effect in combat. While starting this assignment, I was also reaching the end of this excellent GameDevHQ online course and felt more confortable with basic programming stuff.

So I set up the Github repo and cooked up a quick test scene where my whole project would take place. I went for a 2.5D view and played a bit with placing objects around in the background and foreground. The camera is child of a player's child object and follows the player's movements around. I also wrote the TDD's first draft, as required by the assignment.


FIRST STEP (SCRIPTABLEOBJECTS & DIALOGUE SYSTEM): Nov. 13

I finished my online course and went through some tutorials about ScriptableObjects. I went (at first) for 3 types of SO: Memento (equippable objects, which are Mementos from different Houses of the Hand in this world), DialogueData (basically dialogue lines to feed in a Dialogue Window) and Archetypes (overall SO holding all variables for Rock, Paper and Scissors Archetypes, on which the Mementos are to be equipped).

Having no idea how to do any of it, I started with something very familiar to me: narrative design. After many days of work, I had a very simple, crude but smooth system involving Arrays of DialogueData SOs for each character. The triggerID is passed on to the Dialogue Manager, which uses it to find the appropriate Array and feed the next "unread" DialogueData to the UI. The UI then fills its Dialogue Window with the content received from the Dialogue Manager, and various bools in the DialogueData allow to personnalize the effects following each line (start a combat, close the dialogue, read next dialogue line, etc).

Each character also has a DefaultDialogueData, which is loaded if the interaction trigger searches for a reference outside of the corresponding Array. All in all, the code is clunky and couldn't support a whole game, but the system works well and the output is smooth.



NEXT STEP (COMBAT SYSTEM): Nov. 15

 So now I understood ScriptableObjects a bit better, I went on and created the Combat System. It soon  became clear that I would need another layer of SO: Inventory. Each character involved would have an Inventory storing equipped and unequipped Mementos, and their content could be easily accessed with "getter" methods.

I created a Combat Manager, which fired up a StartCombat method each time a DialogueData with "_isCombat" true was loaded. The CombatManager instantiates an enemy from an Array of EnemyPrefabs, using an int value passed by the DialogueData to select the good index position. It then gives random Mementos to the new enemy, asks the player to send its updatedStates, opens a Combat Window and compares the player stats vs. the enemy stats when a choice is made in combat (Rock, Paper or Scissors). Depending on the relation between player's choice and enemy's random choice (ex: Rock vs. Paper), the Combat Manager feeds the results of the combat round to the UI Manager. The UI Manager prints the results in a specific window, then a new round starts.

Surprisingly for me, the result worked well despite its crudeness. Again, I realize the system wouldn't hold in a full game, but it was an excellent training ground and, within the scope of this test-project, the outcome was satisfying. A portion of the code:



NEXT STEP (INVENTORY AND FILLING THE BLANKS): Nov. 17

Now that my basic conflict system worked and could accomodate different Memento bonuses when they would be equipped (I still didn't have any kind of equipment system, but my Archetypes were built in a way that they were ready to transmit their content when needed), I spent a couple days filling all Mementos content, Dialogue lines and game flow. All triggers were set and ID'd correctly, as well as enemy prefabs for combat.

Then I started work on the Inventory Window! Every time it is opened, the player script is asked to update its stats and send them back. The Inventory window text boxes are filled with this info. I created some icons for Mementos and a default Memento SO to fill empty slots in the Inventory. Mementos are gained as "unequippedMementos" after specific dialogue lines.

At first, unequipped Mementos were gathered in an Array inside the Inventory SO, but finally I changed it for a List held by the player script. At this point, my Inventory window was working and showing the correct information, but I had no Equip or Unequip methods of any kind. I also created a SavePoint (with no functions) and placed it in the scene, according to the game flow and overall design.



NEXT STEP (EQUIP/UNEQUIP METHODS): Nov. 19

Almost done! After 2 more days of work, the equip/unequip system was ready! Clicking on an "Unequipped Memento" opens a Rock/Paper/Scissors choice window and allows to equip the item in the corresponding slot. Player stats are then automatically updated and transmitted back to the UI Manager, changing instantly in the Inventory Window.

Likewise, clicking on an equipped item unequips it and sends it back to the Unequipped List, where it replaces the first "defaultMemento" it finds in the List. Again, player stats are automatically updated and sent back to the UI, then updated in the Inventory Window.



FINAL STEP (SAVE/LOAD SYSTEM): Nov. 20

Only one thing left (except the giant technical document I need to write about all this...): a Save/Load system! I tried my hands at a system made out of SaveData ScriptableObjects, which turns out to be ok for an old-school arcade-y feeling. Why? Because it works within the playthrough, but the data is reset when the player leaves and restarts the game. 

Seeing how I'm getting behind in my 3 other classes, I'll probably leave it as it is and try a better system in a future project. I may come back to it if I have some extra time, but don't hold your breath! 


CONCLUSION

So that was one hell of a learning experience! 

I can see these systems would crumble in a real, complete game, but the exercise was fun! To be honest, a month ago I was convinced I couldn't do it. It was clear to me: it was too much for my skills and it wouldn't work, but what the hell, I may as well try. And here we are, about 3 weeks later, and I did it! 

Feel free to download the build and explore this little, basic game world! 
I hope you enjoy it and thank you for reading!

JL A @ Shnapenn Worlds
Nov. 21, 2019

Files

SilenceRPG_Build1.0.zip 16 MB
Nov 21, 2019

Get The Silence

Leave a comment

Log in with itch.io to leave a comment.