Giter Site home page Giter Site logo

craftyjs-rpgmaker's Introduction

craftyjs-rpgmaker

Javascript game basis integrating Craftyjs (https://github.com/craftyjs/Crafty) and Rpg Maker assets

Why

After developing several games around of Craftyjs and Rpg Maker assets (and other stuff like angularjs and a server side engine), I ll share some code here to help anyone interested in. This project is a tutorial for everyone eager to start an HTML5/Javascript browser game. It is based on Craftyjs and some assets as Rpg Maker format.

Understand it

Everything boot in index.html. 2 Javascript files :

  • js/sample.js : the code specific to the game
  • js/crafty-ext.js : some extensions to craftyjs

In js/crafty-ext.js is present :

  • Helper functions : createSpritesPosition and createAnimations to load sprites and animations
  • Crafty component : "character" to create a new character.

Characters are created upon "skins" to help managing several renders.

How to use

Create your own assets and game logic, then create a Character with the line :

Crafty.e("character").skin("skin1").stand("f").keyboard(Crafty.keys.LEFT_ARROW,Crafty.keys.RIGHT_ARROW,Crafty.keys.UP_ARROW,Crafty.keys.DOWN_ARROW);

It will be rendered on the game canvas and react according to the keys defined.

Roadmap

Map definition and collision, maybe ;)

craftyjs-rpgmaker's People

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.