Welcome to the source code repository for the Gorillas JavaScript Game Tutorial. There are multiple versions of this tutorial.
-
The simplified version you can find on freeCodeCamp. This is a comprehensive guide, yet it lacks several main features of the final game and the graphics is more stripped down.
-
The full tutorial you can find on YouTube. This includes many more chapters, like how to make the buildings destructible, how to animate the hand of the gorilla to follow the drag movement while aiming, and we add AI logic, so you can play against the computer.
-
You can also play the final, extended version of the game on CodePen. This includes even more features, like light and dark mode and in this version the flying bomb is also affected by the wind.
While the main tutorials are very packed, there are still a few topics we could not cover in them. Below you can also find a few follow-up tutorials
-
How to make the game fullscreen?
-
How to handle dark mode?
You can find the simplified version of this tutorial on freeCodeCamp. You can find the end result of this article as a playable game on Vercel. If you follow along you should end up with the following source code:
You can find the full version of the tutorial on YouTube. You can play the final, single player version of the game on Vercel. Here are the source codes for each major step.
You can find a play the final, single player version of the game on Vercel.
How to run a game you created for the web in fullscreen? In this quick tutorial, we check how to display a game or any other HTML element in fullscreen, how to exit fullscreen, and how to make a nice fullscreen toggle button in SVG.
How can we detect dark mode in CSS and JavaScript? How can we manually override it with a toggle button? And how do we save our setting in localStorage? In this quick tutorial, we look into detecting dark mode in CSS and JavaScript and then create a toggle button with SVG to override the default behavior.
You can find a play the final, extended version on CodePen and on Vercel.
Made by Hunor Márton Borbély in 2024
Follow me on X