Giter VIP home page Giter VIP logo

littlejs's Introduction

LittleJS Logo LittleJS - The Tiny JavaScript Game Engine That Can

All aboard!

LittleJS is a super lightweight JavaScript game engine with a fast hybrid rendering system. It provides a comprehensive set of tools including rendering, physics, particles, sound effects, music, input handling, and debug tools. The code is very clean and well documented with a variety of examples to get you started. Choo-Choo! ๐Ÿš‚

LittleJS Screenshot

Examples

Hello World - Clean project with only a few things to get you started

Puzzle Game - Match 3 puzzle game with HD rendering and high score tracking

Platformer - Platformer/shooter with procedural generation and destruction

Breakout - Breakout game with post processing effect

Stress Test - Max sprite/object test and music system demo

Particle System Designer - Particle system editor and visualizer

Features

  • Very small footprint with no dependencies
  • Can update and render 10,000+ objects at 60fps, often many times more
  • Object oriented system with fast 2D physics and collision handling for axis aligned boxes
  • Positional audio effects with ZzFX and music with ZzFXM, mp3s, or wavs
  • Input processing system with keyboard, mouse, gamepad, and touch support
  • Particle effects system (particle editor/designer in progress)
  • Medal system tracks and displays achievements with Newgrounds and OS13k integration
  • Several easy to understand example projects you can build on
  • Apply Shadertoy compatible shaders for post processinge effects
  • Debug tools and debug rendering system
  • Full documentation automatically generated from the source code block tags with JSDoc
  • Build system automatically combines everything, minifies, and removes unused code
  • For size coding competitions like js13kGames, starter project builds to a 7KB zip file
  • Easily build a Windows executable with Electron for distribution on platforms like Steam
  • Open Source with the MIT license so it can be used for anything you want

Builds

To easily include LittleJS in your game, you can use one of the 3 pre-built js files. These are also built automatically by the build scripts.

The hello world example includes a batch file build.bat that compresses everything into a tiny zip file using Google Closure, UglifyJS, Roadroller, and ECT. You must run buildSetup.bat to install the necessary npm dependencies.

Debugging

Debug builds of LittleJS have a special menu that can be opened by pressing ~, the tilde key.

  • ~: Debug Overlay
  • 1: Debug Physics
  • 2: Debug Particles
  • 3: Debug Gamepads
  • 4: God Mode
  • 5: Save Screenshot

Games Made With LittleJS

LittleJS Logo

littlejs's People

Contributors

bajuba avatar killedbyapixel avatar lopis avatar lukenickerson avatar moreiramirakulo avatar pebutler3 avatar someunusualgames 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.