Code Monkey home page Code Monkey logo

jquery-game-loop-and-game-engine's Introduction

jQuery Game Loop and Super Lightweight HTML5 Game Engine

This GameLoop maintains a constant game speed with maximum FPS.

On slow hardware, the display FPS will drop, but the game will maintain the tick frequency and will provide that to your game world. The game runs seamlessly on fast hardware, with the maximum FPS you have set.

Install

To see a live demo, go to: www.wimagguc.com/projects/jquery-game-loop-and-game-engine/

This package contains the Game Loop and a sample Game World that you can use to develop your game.

Your Game World object maintains all the states and entities of your game. In this there will be three main functions to:

  • update the game (with n tick)
  • display the game's actual state
  • handle user input

The Game Loop provides a cycle that will call the world's update and display functions with the FPS set.

For install instructions, see demo.html in this package.

Pacman

I added a playable, one-level version of pacman to the /pacman folder, written in jQuery, using this game engine. It has no monsters yet, all you can do is to collect the dots :)

To try it out live, go to: www.wimagguc.com/projects/jquery-game-loop-and-game-engine/pacman/

This is for demonstration purposes only, to show how the game loop can be used for creating an actual game. If you want to use the code, feel free to do so - but please be aware that you probably need a license to publish such a game.

License

Use it as is, show me if you did something cool. Also, feel free to push back anything you think is useful for the project.

This code uses the jQuery Javascript library. To read more about it, go to jquery.com/

About

Richard Dancsi
www.wimagguc.com

twitter: @wimagguc
linkedin: linkedin.com/in/richarddancsi
gplus: plus.google.com/u/0/115939246085616544919

jquery-game-loop-and-game-engine's People

Contributors

wimagguc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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