Skip to content

Help a man with a melon on his head jump through platforms to get to the top. Does it make any sense? Of course not! Is it fun? Of course, it is!

License

Notifications You must be signed in to change notification settings

karolsw3/The-Melon-Man

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Melon Man

The-Melon-Man

The goal is to jump through randomly-generated platforms and get as high as possible. Use space to jump, and A, D or arrows to move left / right.

> DEMO <

For contributors

How to add a new platform?

  1. Add a new texture: modify textures.png file, where each texture is 24 pixels high and wide. (You can add new ones wherever you want)
  2. Specify the platform's structure and add it to the generator:
    • Open the generator.js file and add a new structure to array of structures:
      game.structures = [
        ...,
        "newPlatform" : [{tileColumn: 3, tileRow: 2, x: 0, y: 0}, {tileColumn: 4, tileRow: 2, x: 1, y: 0}, ...]
      ]
      // tileColumn and tileRow are coordinates in textures.png file (starting from 0), and x & y are coordinates in game
    • After that you can tell the generator where to place your platform:
      game.generateMap = function () {
        ...
        // Generate 20 plaforms starting from y = -15 to y = -75 with random x ranging from 0 to 8
       for (var i = 5; i < 25; i++) {
        this.map.structures.push({
          name: "newPlatform",
          x: Math.floor(Math.random() * 8),
          y: -i * 3
         })
       }
      }

About

Help a man with a melon on his head jump through platforms to get to the top. Does it make any sense? Of course not! Is it fun? Of course, it is!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published