Giter Site home page Giter Site logo

m-m_game's Introduction

The Game Project

Project Description

A simple 2D game where the player attemps to reach the end of the level while avoiding enemies and collecting M&Ms.

Developed using JavaScript and the p5.js library.

Access Project

This project can be accessed here.

Special Features Added

Platforms

I added platforms to my game, allowing my game character to jump over bigger canyons and avoid enemies. When making these I learnt how to use the factory pattern; this allowed me to write the code on how to draw the platforms one, and then push that code into an empty array with the arguments I wanted, so I didn’t have to write the code out multiple times. I was then able to draw all of them using a for loop in my draw function, so I didn’t have to draw them all individually.

Enemies

I also created enemies and to do so I learn how to use constructor functions; this allowed me to create every enemy as a new object without having to write out the code for each one. I learnt how to use the this keyword to declare the properties of the new object the function would be creating. I also learnt how to create a method inside the function that would allow me to draw the enemy.

Sound Effects

I added sound effects to my game, using loadSound. Sounds effects where added for when the character jumped, collected a collectable, died or won the game.

m-m_game's People

Contributors

ysmnpksy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.