Prototype 1
Prototype 1: Basic Mechanic Foundations
Summary:
- Going into my first prototype I first broke down what I wanted to accomplish. As I stated in my plan, my first priority was to create the core mechanics which were essential for the vertical slice, these features being some sort of player interaction, resource generation, and game progression. The aim for this first prototype is to create the basic foundations and demonstrate a functional loop. Before I could start developing I needed to take some inspiration and first research how to implement these mechanics.
Research & Inspirations:
- When approaching this prototype I first thought of what games utilise any of these mechanics to try and get some sort of inspiration. For the click and drop mechanic I was immediately reminded of how King of Dragon Pass implements the drag and drop mechanic through their character management, especially during the option to choose which character should be in the clan ring, so going into designing this I was looking at this for the desired outcome. Here is a snippet of a playthrough of Dragon Pass which demonstrates this point skip to 20:55 to see the drag and drop in action:
- https://www.youtube.com/watch?v=Wz7xsfm3isk&list=PL1Be_cMfHOEf6UBDcIMCQl96uKeNBXuAa&ab_channel=aulddragon
- Within this clip you can see how smoothly the characters are able to be placed into the respective placeholders. Using this as my inspiration and after reading Unitys official event system tutorials which gave me the idea of utilising their built in UI elements and the IBeginDragHandler, IDragHandler, and IEndDragHandler. By approaching it this way I was able to create an interaction between the character game object and the camps gameobject.
What I ended up developing:
Let’s break down everything that was accomplished in this prototype. As you can see there is a lot more to this prototype than just the click and drop mechanics. The reason for this was simple, to be able to implement the click and drop mechanic I needed a somewhat functional game to test it. Luckily during our first week as a team we came together and started brainstorming what we need in the vertical slice to replicate what the GDD was describing. Here are my notes of these discussions:
After grey boxing a general plan similar to that from page 1 of my notes I got started with tackling the core features of a functioning game. Most notably in my notes I mentioned a day and week progression, this mechanic is necessary for the game loop of the vertical slice.
Day and Week Mechanic:
What does this mechanic do?
- This script manages the time control of the game through the flow of days and weeks which provides a clear visual progression to the game. It achieves this by day progression system tracking the current day, whilst the week progression system resets the days counts and progresses to the next week
How i implemented this mechanic:
- Day Tracking
- To track the days I set a dayCount Variable that keeps track of the current day. Every time the player then presses the End Day button, the game increases the dayCount by 1 using dayCount++.
- Week Tracking
- After the player reaches Day 7 the Progress Button becomes available which if pressed resets the dayCount and increases the weekCount.
- Snippet of the code:
Resource Management system:
What does this system do?
- This tracks the amount of each resource: Tech, Food, Bio, Scraps, Security. Each resource count is affected by the player’s choice. By assigning the character to a certain camp they will produce a different resource.
- The UI is updated at the end of every day using the UpdateUI() method:
Camp Management and Character Control:
What does this include?
- Within this script it handles the click and drop and then the dropzone for the characters. Each character can be clicked and dropped into any of the camps and spending on the camp a specific resource will be generated at the end of the day.
How did I design this?
- For the character drag and drop i utilised a lot of units built in systems such as:
- OnBeginDrag(): This function pretty much just prepares the character to be moved by changing the canvasGroup to semi transparent (in my case by 0.6f) in addition it disables any interaction with other UI elements allowing it to be moved freely
- OnDrag(): Attaches the character gameobject to move with the mouse
- OnEndDrag(): One released this function will do one of two choices: reset the character position if not being dropped over a valid dropzone (camp) or will lock its position in place if it is.
- The DropZone scripts ties in with this as it tracks the placement of the characters into camps:
- OnDrop(): Linking with the OnEndDrag() function, this handles the drop of a character and attempts to resize the character gameobject to fit in the camp.
- An experimental function I tried to add was the ArrangeCharacters(): which was intended to place the characters into a grid like pattern once dropped in the camp, however, this never worked
Snippet of the code:
End Day Button & Resource Calculations:
What does this do?
- To progress in the game I needed an End Day button, and to create a sense of purpose for the Camp Management and Character Control I needed to allocate resources. As such, the End Day button triggers an immediate calculation of the resources gained based on what characters have been assigned to the camps. By doing this it created a game loop and allowed for the characters positions to be reset, visualise what resources they’ve just gained and strategically place their characters for the next day.
How i designed it:
- Simply the EndDay() method once called by the press of the End Day button would calculate the resources based on both the number of characters and the camp these characters were placed in. This then using the previous UpdateUI() method would update the resources totals and reset the character positions back to their original positions.
How this looks in my script:
Final Notes:
Within prototype 1 these were the core mechanics that I was able to implement. This is a solid foundation to developing this vertical slice by making sure to focus on the resource management, day/week cycles, and character assignment. Each mechanic was designed to ensure players would have clear decision pathways and be provided feedback based on these decisions through the UI. The click and drop feature paired with the end day mechanic created an engaging and structured game feel which creates a simple game loop.