ALIEN ESCAPE
ROLE
Programmer / Puzzle Designer
DESCRIPTION
My first real game project. I considered not putting this on my portfolio since it is not great and definitely not where my skills currently lie. However, I think it is important to put it here to show the drive I had immediately out of the gate to learn and try difficult things. We designed a 2D platformer but in order to make it different we programmed a time-rewinding effect which is used to solve puzzles in the levels. On this project I was on mostly design but I did a bit of programming as near the end of the project it became clear that it was my passion.
YEAR
2022
GENRE
Puzzle Platformer
PLATFORM
Itch.io

KEY/DOOR LOGIC CRITIQUE

Here is a method I created in the Object Manager script. I would like to preface this by saying I had about 2 months of programming experience at this point, so I am definitely proud of it still. However, this method is not great for a variety of reasons. The biggest problem is not evident unless you look at the project as a whole, this script was in every level and not every level had a trap. Meaning in the levels which didn't have a trap we had to add one way off screen just to assign it in the inspector. An easy solution is to just have different logic for each level, the more elegant solution would be to just check if trap != null so that it would not have to be assigned.
Another problem I have with this code is not using if-else statements to prevent the second if-statement from being checked.
While I appreciate the abundance of comments as I think too often junior programmers can get in the habit of not writing any at all, if I were to rewrite this code I would likely add one comment explaining each if-statement and leave it at that.
SCORE CALCULATION CRITIQUE

This is another code snippet from the Object Manager script, it is meant to show the player's ranking in the speed which they completed the level. Instead of using a switch statement with the times defined in the editor I hard-coded everything. This is not good. I had no clue switch statements existed at the time and even failed to use if-else statements so this code will check each if for every level and every possible score.
After working on later projects, especially those on a team at WolverineSoft I learned how to create flexible code which is elegant for not only programmers to read but for designers to use without opening the IDE.
If I were to refactor this code I would use a dictionary and a switch statement. The map would contain a char for the rank and an int for the time. I would use the timeCount as the expression in the switch, then have each case check if the time is less than or equal to the time from the dictionary. If it is then set the score to be the char at that point, otherwise continue. This would also cut out the need for checking what level it is since the code can be used for any time ranges.
