Omar's Log

My role in this group project was programming. I created the ability for the player to switch between perspectives. This was done using a single script and a UI button. When the button is pressed, it switches to the other characters perspective and the player can play as that character. This is one of the most important mechanics of the game.
<span class="NormalTextRun SCXW185283711 BCX2" <the="" game="" centres="" around="" the="" ability="" to="" switch="" between="" the<="" span="">The game centres around the ability to switch between the two characters. This is required to solve the puzzles the player needs to complete to win. To accomplish this, we needed a script that would turn off one character and turn on the other. This is to make sure that only one character is being controlled at a time, so both characters aren’t being controlled when <span class="NormalTextRun SCXW185283711 BCX2" <the="" player="" is="" viewing="" one="" of="" them<="" span="">the player is viewing one of them,</span> and to make sure that immersion isn’t broken, along with not causing any other issues when solving puzzles. </span>
I had to make sure that turning the character off and on also didn’t break either character or break anything else, so it had to be contained in one script. It also had to be simple so that if errors occur, it can easily be pinpointed and fixed immediately. I also had to do a mock-up of some basic player movement in order to test the mechanic before implementing it into the project. Finally, testing the mechanic in the game is important to make sure no errors suddenly come up and fly under the radar.
How it works is that when the player presses the button, both player character alternate between true & false, depending on what the state of the other character is. The second player character is automatically flagged false so that the player isn’t turning them on & off at the same time.
I created this script for a Game Jam for changing the layout of the level using the method I used here, and when I heard about what the main mechanic was going to be, I took the code I used for that script and simplified it for this project.
When it comes to playtesting, <span class="NormalTextRun SCXW185283711 BCX2" <there="" <="" span="">there wasn’t much issue implementing the script and testing it. In order to properly test the mechanic, I had to code in basic movement to make sure everything would work as intended. I also created a basic environment for testing. <span class="NormalTextRun SCXW185283711 BCX2" <the="" gravity="" was="" a="" bit="" wonky="" when="" i="" tested="" it="" initially="" in="" <="" span="">The gravity was a bit wonky when I tested it initially in a 3D project instead of a 2D </span>one, since it was originally made for obstacles in a 2D environment rather than player characters in a 3D environment. Fortunately, such issues were fixed and implemented with little difficulty, by just reloading the project.</span>
It was difficult working in a 3D environment due to a lot of my experience being in 2D. While a lot of things do carry over, even basic movement was a bit difficult since the ability to switch screwed with the player characters, sometimes launching them so high they never seem to come back down.
Get Shared Secrets
Shared Secrets
Some Secrets are worth Sharing...
More posts
- Assets Used20 days ago
- Ryan's Log20 days ago
- Cormac's Log20 days ago
- Patryk's Log20 days ago
Leave a comment
Log in with itch.io to leave a comment.