Skip to content

etoPaha/dartrocket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DartRocket is a HTML5 Game Engine, which is written in Dart and uses the StageXL rendering engine. The main goal of this framework is to provide an easy to use solution for HTML5 game making with the Dart language.

##How to start? This is how the most basic structure looks like with only one state.

  • Create index.html file, which has
 <!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
  </head>
 
  <body>   
    <script type="application/dart" src="index.dart"></script>
    <script src="packages/browser/dart.js"></script>
  </body>
</html>
  • Create index.dart
library mygame;

import 'package:dartrocket/dartrocket.dart';

part "play.dart";

void main() {
  
  //adding play state to the statemanager
  game.stateManager.addState("play",new Play("play"));
  
  //start the play state
  game.stateManager.initState("play");
}
  • Create play.dart
 part of mygame;

class Play extends State {
  Play(String name, [String nextState]): super(name, nextState);

  load() {
    //loading resources here(image,sound, textureatlas etc..)
  }
  
  create() {
    //create gameobjects and event handlers    
  }
  
  update(){
    //game loop: usually for handling physics
  }
}

You can find additional examples in the documentation and in the examples directory in dartrocket's github repo.

##Documentation You can find the the current documentation on pub page of dartrocket.

##Blog The Framework has a blog, which will provide information about how the development is going.

##Examples These examples build will be updated at least when there is a new version of DartRocket. StateMachine show how the statemanager work. SpaceInvader show a basic space invader game.

About

HTML5 game framework made with Dart and StageXL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%