In my first week of game development I have begun to learn the fundamentals of JavaScript in order to create a web game using said language. So far I have seen how to use proper syntax and format operators correctly some of which I have used before in other programming languages, these being all the basic operator types. We used JavaScript to edit this premade html file of an online drawing pad, we made changes to the brush types and colours by reading the pre-existing code and seeing how we can write our own code. The extra features that I added to the drawing pad was a square brush, a random square brush and random circle brush. I would post a screenshot here but I lost my saved file due to not realising that the university computer’s storage refreshes after logging out 🙂
As well as JavaScript, I have learnt how to abstract problems with the use of flowcharts which I have been using to create a guard patrol system where this guard moves between two positions while trying to detect and chase the player. The flowchart starts by spawning the guard at -100 on the x axis, then it sets the guard objective to 100 on the x axis. The guard moves at 5 units per turn towards its target and will temporary change its target to be the player if they are within 10 units. Below is the flowchart:

After making a flowchart for a mock game mechanic I wanted to reverse engineer already existing game mechanics to better understand how to use flowcharts so I decided to create a flowchart for the game Hotline Miami’s weapon system. The game starts by loading in the level with enemies that have random weapons from the weapon pool, the flowchart then checks to see if the player is alive as to know whether to respawn the levels enemies. The flowchart then checks to see if any enemies are remaining, this either moves the game onto the next level or check the player’s weapon slot, this checks the weapon slot to determine what attacks the player should have access to. If the player doesn’t have a weapon then they will only be allowed to shove enemies, if they do have a weapon then the system will give them the ability to throw their weapon, then it check to see if it is a melee weapon or a ranged weapon. Melee weapons will set it so that the attack will now kill enemies at a close range, if the weapon is ranged then it will check for the ammo count in which the weapon will be unusable if there is no ammo, but if the weapon does have ammo then it will fire an enemy killing projectile.

Game of note

This week I went to the board games society to play some board games and gather inspiration for my game dev journey. Despite Sheriff of Nottingham being a board game opposed to a video game, it still provides with ideas of potential game mechanics. In ‘SoN’ the players must earn the most money out of all the players, to do this they must sell goods at the marketplace without being caught by the sheriff, everyone gets to be the sheriff twice and their goal as the sheriff is to catch out players trying to sell high value illegal goods. Without going into too much detail this game utilises social deception skills to create an enjoyable roleplaying experience and is balanced in the way that everyone gets to be the sheriff twice with little rng when it comes to selling your items. This game was very enjoyable and I can see mechanics that would easily translate over to a video game similar to it.
