Project Information
Game Mechanics
Project Information
Sprint 1
Sprint 2
Sprint 3
Sprint 4
Game mechanics
In the game we wanted the player to switch from the couch position to the stage position, this is a small script i wrote to handle this You might see TeleportPosition Class, This is just a class that shows gizmos and nothing more. this can be swapped out for Transforms instead This script also interacts with the screenfade system, you can see more about it in the next section
This was one of the smaller features that were not really necessary, I wanted to have a fade in/out effect when doing something but if i want to do that fade in/out in another script i didn't want everything to be hardcoded and cumbersome to work with So i found a way of doing it a somewhat better way using reflection, i also used method overloading to create the ability to call function with or without parameters. maybe this is too overengineered but it was done in 1-1.5 days so it was a big struggle
This is the feature i worked on the most which could have probably replaced by a different approach on the problem we had. The lyrics board script had 3 version, The first was having the text scroll at a constant speed. The second version was just a bit different, also scrolling but being able to assign timestamp and change the speed on those timestamps The third and final version had 2 seperate text parts, and the ability to seperate parts of a song into different text parts each with their own speed and startingtimes using the timestamps
This script also uses a basic form of re-use by re-using 2 text parts. A better way would be to use object-pooling instead as currently you cannot have 3 text parts simultaneously on screen. This script also interacts with the musicsystem and SongInfo script
We have a MusicSystem script for playing music (duh). but it doesnt have alot of interaction with the lyricsboard script. the lyricsboard does use the TimestampValid function that checks if a textpart should play by comparing its own timestamp count with the audiosource time. Altough a weird bug would come up. Sometimes when there are long load times when switching scenes. the internal AudioSource.time value goes from 0 to 0.2 then instantly to 2 or 3. and because the lyricsboard system works in a recursive manner if the first comparison fails then the entire thing breaks. to fix this a quick fix was implemented by checking whether the source time is past the timestamp in addition to a normal equality comparison
This script is a scriptable object and is used by the lyricsboard system to get a song and its info. It has a audioclip it needs to play and contains multiple text parts that each has text, a timestamp and a speed it should scroll at At the time of reading this i noticed i could also change each variable from private set to just const. The properties are all read-only but not immutable