dartrocket 0.1.4 copy "dartrocket: ^0.1.4" to clipboard
dartrocket: ^0.1.4 copied to clipboard

outdatedDart 1 only

DartRocket is a HTML5 game framework written in Dart and which uses the StageXL rendering engine.

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.

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

DartRocket is a HTML5 game framework written in Dart and which uses the StageXL rendering engine.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

browser, stagexl, unittest

More

Packages that depend on dartrocket