Coder Social home page Coder Social logo

rover's Introduction

Rover

A Sokoban type puzzle game on HTML Canvas.

Preview

https://carlnewton.github.io/rover/

Development

  • Run npm install gulp upon first downloading the repository.
  • Make changes in the /src directory and run gulp to build /dist/js/script.js or run gulp watch to have it build each time a file is updated in the /src directory.

rover's People

Contributors

carlnewton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

merkaba48

rover's Issues

gulp does not recognise when gulpfile.js has been updated

At the moment, whenever I create a new file, it has to be added to gulpfile.js, as they need to be loaded in order. The problem with this is that when using gulp watch, it doesn't recognise that gulpfile.js has been updated, and so need manually restarting.

I don't know whether it would be better to change how the files are included or to have gulp also watch gulpfile.js.

Pause screen

It would be nice to be able to use Esc to pause the game.

Ice push block

A pushBlock type that does not stop moving until it reaches an obstacle.

Potential issues:

  • #12 would likely need resolving before this could work without collision issues
  • Further thought would need to be given into the pushBlockHomes visual styles given that they are currently the same colour as the default pushBlock. An ice block would almost definitely be a light-blue. Navigating the ice block to an orange marker might be unintuitive and/or visually unappealing. On the other hand, creating a light-blue marker would indicate that ice blocks can only be resolved on blue homes -- which could potentially be the case, but it's a question of whether or not such a complication is wanted.

Different laser directions

There is currently only one direction for a laser (down). It should be currently possible to have a laser work going up, left and right, but that would need drawing correctly on the canvas. The laser emitter block should also indicate that it emitting a laser (rather than being a regular block having a laser emitted toward it) -- a small triangle on the edge emitting the laser should do the trick.

Laser destination exit lock

A tile (and potentially a pushBlock) which will cause the game exits to be disabled unless a laser is being emitted to them.

Items are considered in position before they have been animated to move there

A rethink of Move.js is needed. It exists to queue movements so that if the player (and potentially anything else on the map) was to quickly move up then left, for instance, the animation would not chop away from the first movement to the second. But the solution I have put in place causes a few issues:

  • Pushing a block many moves into the future moves the block before the player has visually been positioned to move it.
  • There is no limit to the amount of items in a queue, which can cause a visual lag type effect

Stat keeping

It would be nice to have stats collected and perhaps even displayed at the end of a level (or the game if the former is too much).

  • Time to complete level
  • Moves to complete level
  • Level restarts
  • Level deaths

Level editor

A level editor would be wonderful! I'm currently writing levels directly to Maps.js.

Add textures

I was originally going to add textures, but I'm quite enjoying the minimalism. Textures may be needed as more block and tile types are added.

The canvas is not responsive

Work needs to be done to centre-align the level.

Thought needs to be given to the tileSize depending on the window size, and the background where no map tiles exist. Perhaps the wall tile could be used around the edge.

Audio

Background music and movement sounds

Maps.js is getting a bit too big

It would be good to separate these into separate files, perhaps existing in a new directory, ie /src/maps/1.js. It may not be necessary to do anything tricky with gulp but ideally these files would essentially just be json files, rather than beginning with maps[1] = { etc.

Further debugging controls

There currently exists an event listener to use the ] key to skip forward a level. It would be nice to have [ skip backward a level.

The amount of tiles in a level is limited to the canvas size

It would be nice to be able to have large levels without having to reduce the size of the tiles to fit it in. A possible solution for this is to essentially shift the level by a tile when the player gets close to an edge. This may be a challenge to write and jarring for the player.

Laser mirror block

A pushBlock type to redirect a laser 90 degrees.

Anticipated further requirements:

  • A way to rotate these blocks

Laser push block

A pushBlock type that emits a laser as the static laser block currently does.

Push blocks without a home can cause the exit to incorrectly be disabled

Currently the game checks all pushBlocks to check that they're sitting on a pushBlockHome to decide whether an exit is enabled or disabled. We might have some pushBlocks that are made for a pushBlockHome, and some with other purposes and do not need a home to complete a level.

This would need changing from:

  • a check to see if all pushBlocks are on a pushBlockHome

to:

  • a check to see if all pushBlockHomes have a pushBlock on them

Level complete transition

When completing a level, the game quickly flashes to the next level. It would be ideal to have a short transition to indicate success (or failure on death or restart) before beginning.

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.