GithubHelp home page GithubHelp logo

oliveiracwb / lunar-lander Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ehmorris/lunar-lander

0.0 0.0 0.0 2.13 MB

A web-based lunar lander game written in plain JavaScript, HTML, and CSS with no dependencies

Home Page: https://ehmorris.com/lander/

JavaScript 82.00% CSS 8.48% HTML 9.52%

lunar-lander's Introduction

About

A plain JavaScript, HTML, and CSS game with no dependencies.

Code and design: Edwin Morris

Music and sound: Max Kotelchuck

Thanks to this guide for help with the basics.

Running

Deployed to ehmorris.com via a git submodule.

See launch.json for running.


Game Ideas

  • Bigger "small" font size on large screens
  • Update instruction wording for keyboard
  • Fix HUD at a lower velocity, show smaller cursor for x position when offscreen
  • Use number formatting https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
  • Show rotation velocity / direction in HUD. Help users to stabilize.
  • Move mobile booster controls to one side so they're easier to tap?
  • Add rings / bonus point areas to hit before landing
  • Make terrain land-able
  • Generate a shareable image. Show stats in-canvas.

Extras

  • "Mad dog" mode: start with very high rotation rate
  • Confetti when grazing the bottom, or exceeding certain speeds
  • Konami code on desktop?
  • Use broadcast channel to make a second screen a big dashboard of controls and graphs

Refactor

  • Move end-game logic into index
  • Move landed and crashed data objects into state
  • Sort out underscores - are they needed? Bit of clutter

Bugs

  • Make play speed consistent regardless of frame rate
    • On some screens the refresh rate is 120, on others 60. This changes the speed of play. The game is twice as fast on a new MacBook as on an iPhone. The animations are procedural, so to accomplish this, forces like thrust and gravity will have to be modified based on time elpased between frames. Unsure how to do this.
    • The gameplay target is the experience on a MacBook with a 120hz refresh rate. Phones could possibly be slower, or shorter screens in general - but this should be controlled and not incidental
  • iOS safari "from" banner cuts off bottom of canvas

lunar-lander's People

Contributors

ehmorris 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.