Home

Awesome

Ranger-Sack - v0.9.5 Beta

Logo

##Contents:

###About Ranger-Sack (Sack for short) is a sibling project relative to Ranger-Dart

##Ranger-Dart (Ranger for short).

HighLevel

Sack simply serves as a goto place for examples that range from full apps, templates and unit tests. It also includes miscellaneous extensions/add-ons or enhancements.

###Templates, Applications and Unit tests Sack comes with a suite of Templates, Applications and Unit tests. Each serves as a howto for starting a project or referencing during project development. When starting a new project you will copy one of the Templates and begin coding from there. The Applications and Unit tests are for later, after you have a project underway and want to know how to do something.

Templates

There are currently 7 Templates located under the web folder.

web/
    applications/
        templates/

Each Template progressively adds on a feature showing how to perform a basic task. For example, level0 is the most basic: a Splace Scene and Splash Layer, and a GameScene and GameLayer.

Applications

There are currently 2 applications.

web/
    applications/
        ranger_particles/
        rocket/
        2048/

Ranger_particles is a hand built HTML/CSS application that uses Sack to display the particles. The application itself is not complete meaning you can only save to local-storage. There is code to save to the GDrive but it hasn't been completely wired up. I know the GDrive code works because it is used in the SpritePatch application to save and load sprite sheets.

RangerRocket is a demonstration of complex Node usage. In there you will find examples on how to map between "world-space" and "node-space" in order to handle particle placing and collision detection. It also shows the proper way of handling key presses.

2048 is a 2048 clone. This application demonstrates a complete game from start to finish. It contains: Loading resources (images and local-storage), Animations and game logic. However, it isn't a good representation of how to code a gui. Sack currently lacks a UI-Kit so everything is hand rolled. It has several new--more modern--widgets: ButtonWidget, PopupWidget and SlidePanel. They are crude and don't represent a typical UI-kit by even a longshot. Depending on your needs you may want to use HTML/CSS.

Unit tests

There are many unit tests. Some are non-visual but many are visual. The original unit tests have all of the non-visual tests, for example, pooling and affine transformations; and they are a bit outdated so use with caution.

A side note: When first looking to port Cocos2D-js the first thing I noticed was that the transform stack was a mess of incomprehension. I couldn't make complete sense of it and I didn't want to use something that I couldn't follow or understand. So the very first thing I did was scrap Cocos2D-js code and learn to make a transform stack myself. Forturnately I had worked with Piccolo2D and understood how its stack worked.

The old test (some may not work as they were created almost a year ago) are located under the old_tests folder. The newest tests are under the scenes/tests folder.

web/
    unittests/
        old_tests/
        scenes/
            tests/
                colors/
                fonts/
                inputs/
                particlesystems/
                spaces/
                sprites/
                transforms/
                transitions/

The new tests cover pretty much all aspects of Ranger. They serve as both unit tests and as a resource to learn from.

###Nodes Nodes are in no specific order.

###Documentation

These docs could help your game development. They are all a work in progress.

###Google Blog Ranger has a Blog where I periodically post statues.

###Author Hello, I am Will DeVore the current developer of Ranger and Sack. I find it a pleasure working with the Dart language. Its integration with HTML/CSS/Canvas/WebGL is solid and functional.

###License See MIT license

###Development When developing anything within Sack you have two choices as to which Ranger source you use: