/forest-runner

A 2D side-scrolling game developed using vanilla JavaScript, HTML, and CSS.

Primary LanguageJavaScript

IntoTheForest

Table of Contents

  1. About
  2. Controls
  3. Development
  4. Future Features
  5. Credit
  6. Contact Me
  7. License

About

Controls

tut3

Debug Mode can be trigged with the ';' button on keyboard

Development

I found a short tutorial that showed me how to create a basic version of the "dinosaur" Google Chrome game. The game was an endless runner, with oncoming blocks that I had to jump over. It was a simple game, but it was a proof of concept that games could be built with JavaScript.

ezgif com-video-to-gif (2)

The game can be started by clicking the Start button. Once the game starts, the character can be made to jump by pressing the Space key on your keyboard. The game ends if the character collides with the block.

With this new confidence and knowledge, I began working on a more advanced and visually appealing game. I found a game development course online that helped me create this new game, which was built with vanilla JavaScript, CSS, HTML5, and the Canvas API.

I wanted to make this game feel unique and rather than copy someones code or code along I decided to use assets from itch.io (a platform for game developers to share and sell their artwork and game assets). Using these assets presented me with new challenges, as I had to understand the logic behind the code in order to make necessary amendments and add my own features, such as scores, game over, and restart.

Unfortunately, due to time constraints, I was not able to fully flesh out the game as much as I would have liked. There were multiple features and functionalities missing that would have made it a complete game.

ezgif com-optimize (1)

Jump over the incoming slime enemies by using the arrow keys on your keyboard to control the player. You have 3 lives and you lose a life every time you collide with an enemy. The game ends if the player loses all three lives. To restart the game after the game over, the player can press the Enter key.

I wanted to build on the success of my previous two games and take the lessons I learned from building a local cooperative two-player fighting game to create a more 'complete' game, but was unable to do so due to time constraints.

Into the Forest was built as an improved version that enhances and refines the features and gameplay mechanics from the second game:

  • The player now has many more animations and movements, and there are more attacks, each with their own hitboxes and sound effects.
  • Enemies now have more animations and do not just sit in an idle animation; they will attack the player or attempt to when the player is within a certain range.
  • I have added an in-game guide, mute, pause, and reset buttons, all with UI sounds to provide audio feedback to players.
  • To help with hitboxes and collisions, I created a debug mode that can be triggered with the semicolon ; button.
  • Spawning enemies is no longer random. At certain scores, the probability of enemies spawning is increased.
  • Made changes to existing sprites to adjust animations using image editors

These changes, along with many more tweaks and adjustments, I hope make this game more enjoyable and fun to play than the last.

ezgif com-gif-maker

Future Features

  • Pause game toggle
  • Game Over Screen Music
  • Mute button
  • UI Sounds
  • Background music
  • Better Enemy 'AI'

Credits

Contact me

If you encounter any issues or bugs, or have any suggestions for improving this project, please feel free to contact me on twitter.

You can also submit an issue on this repository to report any bugs or suggest new features. Please provide as much detail as possible, including any error messages and steps to reproduce the issue.

License

This project is licensed under the terms of the MIT license.