Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

1. February 2016

 

PBR, Physically-Based Rendering, is the new hotness in the CG world, especially with the increasing popular of Substance Painter.  The end result of that process is a number of textures specifically for channels such as Roughness, Metallic, etc.  Taking the results from Substance to Blender however hasn’t always been the easiest.  Now there exists a plugin for easily consuming PBR textures in Blender using the Cycles renderer.

From the product page:

Easy PBR right inside Cycles!

With the rise of PBR in the AAA game industry and Allegorithmic’s wildly popular Substance toolset, it’s about time someone created a simple solution for implementing PBR textures inside of Blender. Finally, no more fiddling for hours with material nodes trying to vaguely make something that looks good. Now there’s one solution that gets it right every time and in every lighting condition! Liberate yourself as an artist to focus on your art!

Plug and Done!

Based on a PBR Metal/Rough workflow, all you have to do is import your textures, plug them in, and you’re ready to go! This node group supports maps for:

  • Base Colour (Albedo, Diffuse…)
  • Ambient Occlusion
  • Roughness
  • Metallic
  • Normal
  • Emission


It adds a new shader node to Blender that makes it easy to wire up the appropriate maps:

Substance_PBR.blend

While not free, it does cost less than 5$.

Art, GameDev News

31. January 2016

 

Kha is a cross platform, open source, cross platform game engine for Haxe developers.  Also, as was just recently covered, they also launched Kode Studio, an IDE for Kha and eventually Haxe development.  With all of these recent launches, they also just relaunched their website at kha.tech.  The new design is much cleaner and better organized:

image

 

I intend to do some more Haxe coverage in the future and was considering using Kha or Snowkit.  Which framework would interest you most?

GameDev News

30. January 2016

 

Tiled, the open source map editor, just release a minor update in the form of 0.15.1.   This release added/fixed/changed the following features:

 

You can download Tiled here.

 

If you are interested in learning more about Tiled, we have a comprehensive tutorial series available here.

GameDev News

30. January 2016

 

NeoAxis, a C# based game engine with a rich tool suite including a full map editor, just released version 3.4.  A somewhat minimal release in anticipation of version 4.

Features from the release:

  • Updated tools skin.
  • Latest PhysX 3.3.4. Works faster and is more stable. Good character physics, improved car physics, fixed terrain problems.
  • OS X support has been improved. New Mono Runtime 4.2.1 with new Generational GC (SGen) support. OS X 10.8 now is the minimal supported system.
  • Sound backend has been improved. OpenAL Soft updated up to 1.17.2. Internal SSE optimizations.
  • All example maps have been updated.
  • Better object selection algorithms in Map Editor. It's now easier to select zones, portals and other volumes.
  • Post processing: Color correction lookup table support.
  • Exporters: support of the latest Autodesk 3ds Max 2016 and Maya 2016. Ability to install exporter for yet unpublished versions of 3ds Max and Maya (2017+) added.
  • Exporters: Ability to install exporters to a specified folder.
  • File system: The ability to load archives during simulation. As example to use it for downloadable content.
  • Map Editor: Ability to open the type of selected object in Resource Editor. Use context menu.
  • MapCamera: Ability to set orthographic camera.
  • Web Browser Control: You can now configure a local HTML start file. Zooming and mip maps generation for in-game 3D GUI.
  • Bug fix: Native memory manager: Crash Memory_AllocAligned on 64-bit applications.
  • Bug fix: Exporters: Unable to override material in some cases.

GameDev News ,

29. January 2016

 

Continuing in their weekly release schedule, a new preview release is available for Unreal 4.11.  As always, these preview releases are very much in development and should be used only by the brave of heart of weak of mind! ;)

In this release we get:

Fixed! UE-25870 Crash opening level blueprint
Fixed! UE-25927 Crash upon selecting the character in the First Person templates
Fixed! UE-24480 Hiding root actor does not hide ChildActor
Fixed! UE-25604 Pressing compile on the Vehicle Blueprint in vehicle advanced and Vehicle Templates Cause the Editor to crash
Fixed! UE-25593 UnrealHeaderTool does not detect program plugins enabled by default
Fixed! UE-25266 HTML5 packaging code project fails could not verify LLVM version
Fixed! UE-25069 [CrashReport] Editor crashes if pointlight is added to level on El Capitan
Fixed! UE-25553 Cinematic camera broken in Infiltrator
Fixed! UE-24815 Crash upon undoing actor selection on a static mesh when paint mode is enabled
Fixed! UE-25713 Crash when adjust sound spatialization through blueprint
Fixed! UE-25123 Mac Editor Freezes after connecting and disconnecting a mobile device
Fixed! UE-24730 Crash loading QA-Promotion FDeferredShadingSceneRenderer
Fixed! UE-25233 Unable to add Chrome as a platform in the HTML5 SDK option. This prevents launching a project in Chrome.
Fixed! UE-24757 Editor crashes when exiting and having a widget blueprint open.
Fixed! UE-25272 IHeadMountedDisplay Crash
Fixed! UE-25774 Editor Crashes When Attempting to Constrain a Component to Itself
Fixed! UE-25011 Crash when selecting a revision with the Blueprint Diff Tool
Fixed! UE-24650 Materials using separate translucency stop rendering if r.SeparateTranslucency is 0
Fixed! UE-24411 Unable to push to SteamVR while Oculus service is running
Fixed! UE-24712 Cannot select a Point Light or Sky Light by clicking on the sprite in the viewport on Mac
Fixed! UE-24300 Crash changing a setting in the Details panel with multiple components selected
Fixed! UE-25753 Slate Renderer Crashing on Shutdown
Fixed! UE-25752 Widget Component crashes on destruction
Fixed! UE-25625 Failing to compile will cause blueprint variables to reset to their default values
Fixed! UE-25605 ContentExamples' Math Hall map opens with Blueprint compiler warnings
Fixed! UE-25573 ContenExamples' LevelScripting map opens with Blueprint warnings
Fixed! UE-25323 Opening a project that contains an actor in viewport with a child actor component of type TextRenderActor crashes the editor
Fixed! UE-25146 Crash occurs texture painting on Mac with Metal
Fixed! UE-25129 Crash occurred painting on landscape sublevels with Retopologize tool
Fixed! UE-25118 Retopologize tool does not line up with cursor
Fixed! UE-25065 [CrashReport] UE4Editor_Persona!FPersonaMeshDetails::IsSectionSelected() [personameshdetails.cpp:1179]
Fixed! UE-24967 Integrate D3D12 update from MS
Fixed! UE-25788 Plugin Warden Fixes
Fixed! UE-25665 FastDecimalFormat doesn't handle overflow when rounding correctly
Fixed! UE-25633 ContentExamples' NetworkFeatures map opens with Blueprint warnings
Fixed! UE-25520 The new BP gather method is ignoring non-root level BPs
Fixed! UE-25507 Vehicle Advanced Template's dashboard view camera on ground in VR
Fixed! UE-25377 Spinning logo in Blueprint_Communication map is the incorrect size
Fixed! UE-25093 Landscape tool switches to Manage New Landscape when hiding a level with landscape mode open.
Fixed! UE-22632 Building the Engine using Visual Studio 2015 can fail if Windows Driver Kit is installed.
Fixed! UE-25680 Right stick is shown but not used in Flying template
Fixed! UE-25675 Player can leave the map in Rolling Template
Fixed! UE-25676 Player can get stuck under bridge in Rolling Template
Fixed! UE-24737 Console Command autocomplete displaying in wrong area
Fixed! UE-25805 Map load errors for RoomNight in RealisticRendering
Fixed! UE-25477 BlueprintOffice has missing NodeGUID warnings on open
Fixed! UE-25529 ContenExamples' BlueprintSplines map opens with blueprint warnings
Fixed! UE-25866 A bug in UBTService_BlueprintBase makes it impossible to create "deactivation-only" BP implemented BT services
Fixed! UE-25739 Crash closing Binary editor with Oculus Audio Plugin enabled
Fixed! UE-24237 Audio not playing at Start Time set by Play node on PC
Fixed! UE-25851 Typo in SkinRendering 1.1 content example
Fixed! UE-24528 Listener Focus Priority Scale doesn't work with Sound Concurrency
Fixed! UE-25682 Broken animation is created if the user records from gameplay but exits PIE before stopping
Fixed! UE-25891 Slate standalone renderer font cache is 1 frame behind
Fixed! UE-25889 Shaped text doesn't handle some characters correctly
Fixed! UE-25013 Editing right-to-left text is very unstable
Fixed! UE-25693 Some maps in ContentExamples have inconsistant Player Start node positions
Fixed! UE-25611 Disable writing NoOBBInstall batch file
Fixed! UE-25886 Content Examples Blueprint_Communication example 3.1 flickers upon looping
Fixed! UE-24006 Game does not launch from UFE using cook on the fly
Fixed! UE-22731 Crash undoing the redo of deleting a bp instance with edits after modifying class
Fixed! UE-25582 Crash moving message log window while messages being pumped to it
Fixed! UE-24872 Camera translates up when clicking in the viewport after working in subeditors
Fixed! UE-25876 Content Examples player has wide slider selection area
Fixed! UE-25947 Portal IPC doesn't filter message scope to just the active users OS account
Fixed! UE-25759 Decals do not render on some Android devices
Fixed! UE-25791 TVOS templates failing to build on EC
Fixed! UE-25521 Editor font doesn't render Arabic glyphs
Fixed! UE-25644 First Person BP and Code gun has odd rotation
Fixed! UE-22270 Interface functions inherited after a duplicated actor blueprint is reparented to the blueprint it was duplicated from cannot be deleted.
Fixed! UE-25961 Untested GameplayDebuggerPlugin enabled in QAGame
Fixed! UE-25575 Long Google Play App ID can cause an invalid error
Fixed! UE-25710 ContentExamples' BlueprintsOverview map opens with Blueprint warnings
Fixed! UE-25704 BlueprintMouseInteraction interactive box moves upon PIE or Launch On
Fixed! UE-22471 Crash when attempting to PIE after undoing deletion of a component
Fixed! UE-25718 Top Down pointer decal is partially missing when on walls
Fixed! UE-25853 Vehicle Advanced BP template has inconsistent lighting
Fixed! UE-25841 Top Down decal and shadow do not affect the template text
Fixed! UE-25786 MatineeFightScene has warnings and errors effecting performance
Fixed! UE-25763 Matinee ContentExamples map has misaligned sequences
Fixed! UE-25679 ExampleProjectWelcome map has inconsistent icon use
Fixed! UE-25699 BlueprintInputExamples map giving PIE errors when playing pixel ship
Fixed! UE-25835 "Auditorium" reverb effect no longer plays in Audio map example 1.9 in Content Examples
Fixed! UE-25878 Content Examples buttons are green when display is not active
Fixed! UE-22705 Inconsistent values from input Y-axis on motion controllers
Fixed! UE-24187 Editor hangs after selecting submit to source control from drop-down
Fixed! UE-25479 Unable to package a BP project for Linux missing UE4Game binary
Fixed! UE-25815 Error loading the editor with Oculus Audio Plugin enabled
Fixed! UE-25351 Setting the Falloff Distance of a Sound Wave/Cue to 0.0 will no longer Play Sound

 

As always the new preview release of Unreal can be downloaded using the Epic Game Launcher.

GameDev News ,

Month List

Popular Comments

Choosing a Haxe NME game engine
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


Home > >

12. May 2013

Now that I have decided to go with Haxe and NME, there is the question of which game engine to use.  You may be thinking to yourself "isn't NME a game engine"?  No, not really, although it performs some game engine-y functions.  NME is more like a cross platform Haxe implementation of a Flash like development environment.  A game engine is built on top of this layer as ideally makes me life easier.  So, what are the options then?

 

Build my own

Well first of all there is the option to use nothing.  NME is fairly high level as it is, so the "cost" of building a game engine on top of it is much lower than with many other language/library combinations.  This has the advantage of removing a layer of code I am not intimately familiar with.  On the other hand, I'm lazy and in the business of creating a game, not an engine.  If someone else wants to do the work for me, and freely at that, who am I to say no?

 

HaxeFlixel

http://www.haxeflixel.com/

Flixel is one of the most common Flash 2D game frameworks, and HaxeFlixel is a Haxe port.  The reference documentation is pretty solid.  I have read that HaxeFlixel is a bit further along than our next entry.  The engine itself is state driven, with a state being the fundamental organization model of your game, while your game loop basically flips between states.  Examples of states would be say… Playing, MainMenu, HighScore, etc…  Flixel targets the most of the major targets including iOS, Android, Mac and Windows as well as Flash.  I don't believe HTML5 is supported.

 Status: Under active development

 

Sample HaxeFlixel code from here. ( a Menu state ) :

package;
 
import org.flixel.plugin.photonstorm.FlxDisplay;
import nme.Assets;
import nme.geom.Rectangle;
import nme.net.SharedObject;
import org.flixel.FlxButton;
import org.flixel.FlxG;
import org.flixel.FlxPath;
import org.flixel.FlxSave;
import org.flixel.FlxSprite;
import org.flixel.FlxState;
import org.flixel.FlxText;
import org.flixel.FlxU;
 
class MenuState extends FlxState
{
    override public function create():Void
    {
        #if !neko
        FlxG.bgColor = 0xff131c1b;
        #else
        FlxG.bgColor = {rgb: 0x131c1b, a: 0xff};
        #end 
        FlxG.mouse.show();
         
        //create a button with the label Start and set an on click function
        var startButton = new FlxButton(0, 0, "Start", onStartClick);
        //add the button to the state draw list
        add(startButton);
        //center align the button on the stage
        FlxDisplay.screenCenter(startButton,true,true);
    }
 
    //The on click handler for the start button
    private function onStartClick( ):Void
    {
        //Tell Flixel to change the active game state to the actual game
        FlxG.switchState( new PlayState( ) );
    }
     
    override public function destroy():Void
    {
        super.destroy();
    }
 
    override public function update():Void
    {
        super.update();
    }
}

 

 

HaxePunk

http://haxepunk.com/

HaxePunk is another popular Flash game framework that was ported to Haxe.  Instead of being organized around States like Flixel, HaxePunk is built around entities and scenes, a rather more traditional design.  Haxepunk seems to support the same targets as HaxeFlixel, which means most of the CPP targets ( iOS, Android, Windows, Mac, etc… ) but no HTML5.  Reference docs are pretty complete.

Status: Under active development.

 

Sample code taken from here.

 

 

package scenes;
 
import com.haxepunk.Scene;
import com.haxepunk.HXP;
 
class GameScene extends Scene
{
    public function new()
    {
        super();
    }
 
    public override function begin()
    {
        add(new entities.Ship(16, HXP.halfHeight));
        spawn(); // create our first enemy
    }
 
    public override function update()
    {
        spawnTimer -= HXP.elapsed;
        if (spawnTimer < 0)
        {
            spawn();
        }
        super.update();
    }
 
    private function spawn()
    {
        var y = Math.random() * HXP.height;
        add(new entities.Enemy(HXP.width, y));
        spawnTimer = 1; // every second
    }
 
    private var spawnTimer:Float;
}

 

 

Firmament Game Engine

http://martamius.github.io/Firmament.hx/

Another Haxe 2D game engine, this one supports almost every platform, and unlike Flixel and FlashPunk, that includes HTML5.  Like the others, it is completely open source.  Reference docs are OK, but a little light on description.

Status: Last github commit was 2 months ago as of writing.

No sample code located.

 

Stencyl

http://www.stencyl.com/

Stencyl is an interesting option.  It's a bit higher level than the other frameworks we mentioned earlier, as you can see directly below, Stencyl has an IDE.

Stencyl
In some ways, its much more similar to higher level tools like Construct 2 or Gamemaker in that you visually author your game.  Stencyl however is powered by Haxe and you can drop down to the Haxe code level if you want.  That said, it is a commercial product, so if you want to publish to iOS or ( I believe… the site doesn't make it obvious either way ) Android, you need to pay.  Documentation is pretty solid.
 
Status: Commercial product under active development.
 
No sample in this case due to the unique nature of the product.
 
Stencyl is certainly worth checking out, but probably not a good fit for the project I am working on, as I want the blog posts to be code focused and Stencyl abstracts most of that away. 

 

Citrux Engine

https://github.com/alamboley/CitruxEngine

CitruxEngine is a port of the Flash based game engine.  Sadly it seems to have been abandoned 

Status: Last update was 8 months ago.  May simply be complete but on first glance appears to be a dead end.

Sample code from here.

 

 

package fr.aymericlamboley.test;

import aze.display.SparrowTilesheet;
import aze.display.TileLayer;

import box2D.dynamics.contacts.B2Contact;

import com.citruxengine.core.CitruxEngine;
import com.citruxengine.core.State;
import com.citruxengine.math.MathVector;
import com.citruxengine.objects.CitruxSprite;
import com.citruxengine.objects.Box2DPhysicsObject;
import com.citruxengine.objects.platformer.box2d.Baddy;
import com.citruxengine.objects.platformer.box2d.Coin;
import com.citruxengine.objects.platformer.box2d.Crate;
import com.citruxengine.objects.platformer.box2d.Hero;
import com.citruxengine.objects.platformer.box2d.MovingPlatform;
import com.citruxengine.objects.platformer.box2d.Platform;
import com.citruxengine.objects.platformer.box2d.Sensor;
import com.citruxengine.physics.Box2D;
import com.citruxengine.utils.ObjectMaker;
import com.citruxengine.view.spriteview.SparrowAnimationSequence;
import com.citruxengine.view.spriteview.SpriteLoqAnimationSequence;
import com.citruxengine.view.spriteview.SpriteView;

import com.eclecticdesignstudio.spritesheet.SpriteSheet;
import com.eclecticdesignstudio.spritesheet.importers.SpriteLoq;

import format.SWF;

import nme.Assets;
import nme.geom.Rectangle;

class GameState extends State<GameData> {

    public function new() {

        super();
    }

    override public function initialize():Void {

        super.initialize();

        _ce.gameData.dataChanged.add(_gameDataChanged);

        var box2d:Box2D = new Box2D("Box2D");
        //box2d.visible = true;
        add(box2d);

        //ObjectMaker.FromMovieClip(new SWF(Assets.getBytes("Assets/LevelA1.swf")).createMovieClip());

        var background:CitruxSprite = new CitruxSprite("background", {x:0, y:0, view:"Assets/background.jpg"});
        add(background);

        var physicsObject:Crate = new Crate("physicsObject", 
{x:250, y:200, width:70, height:75, view:"Assets/crate.png"});
        //var physicsObject:PhysicsObject = new PhysicsObject("physicsObject", {x:100, y:20});
        //var physicsObject:PhysicsObject = new PhysicsObject("physicsObject", {x:100, y:20, radius:20});
        add(physicsObject);

        add(new Platform("platform1", {x:498, y:403, width:948, height:20}));
        add(new Platform("platform2", {x:0, y:202, width:20, height:404}));
        add(new Platform("platform3", {x:1278, y:363, width:624, height:20}));
        add(new Platform("platform4", {x:1566, y:165, width:20, height:404}));

        var spriteSheet:SpriteSheet = SpriteLoq.parse(ApplicationMain.getAsset("Assets/heroSpriteLoq.xml"), "Assets");
       
        var tileSheet:SparrowTilesheet = new SparrowTilesheet(Assets.getBitmapData("Assets/heroSparrow.png"), 
Assets.getText("Assets/heroSparrow.xml"));
        var heroTileLayer:TileLayer = cast(view, SpriteView).createTileLayer(tileSheet, "hero");
        var hero:Hero = new Hero("hero", {x:100, y:20, width:60, height:135, 
view:new SparrowAnimationSequence(heroTileLayer, "idle")});

        add(hero);

        spriteSheet = SpriteLoq.parse(ApplicationMain.getAsset("Assets/baddySpriteLoq.xml"), "Assets");
        tileSheet = new SparrowTilesheet(Assets.getBitmapData("Assets/baddySparrow.png"), 
Assets.getText("Assets/baddySparrow.xml"));
        var baddyTileLayer:TileLayer = new TileLayer(tileSheet);
        var baddy1:Baddy = new Baddy("baddy1", {x:440, y:200, width:46, height:68, 
view:new SparrowAnimationSequence(baddyTileLayer, "walk")});
        add(baddy1);

        var coin:Coin = new Coin("Coin", {x:Std.random(400), y:Std.random(300) + 100, radius:30, 
view:"Assets/jewel.png"});
        add(coin);
        coin.onBeginContact.add(_recoltCoin);

        view.setupCamera(hero, new MathVector(320, 240), new Rectangle(0, 0, 1550, 0), new MathVector(.25, .05));
    }

    override public function update(timeDelta:Float):Void {

        super.update(timeDelta);
    }

    private function _gameDataChanged(object:String, value:Dynamic):Void {

        trace(object + " - " + value);
    }

    private function _recoltCoin(ctc:B2Contact):Void {

        var hero:Hero = Std.is(ctc.m_fixtureA.getBody().getUserData(), Hero) ? 
ctc.m_fixtureA.getBody().getUserData() : Std.is(ctc.m_fixtureB.getBody().getUserData(), 
Hero) ? ctc.m_fixtureB.getBody().getUserData() : null;

        if (hero != null) {

            remove(Std.is(ctc.m_fixtureA.getBody().getUserData(), Coin) ? 
ctc.m_fixtureA.getBody().getUserData() : ctc.m_fixtureB.getBody().getUserData());
            _ce.sound.playSound("collect");
        }
    }
}

 

 

Cocos2D for Haxe

https://github.com/ralcr/cocos2d-haxe

It's Cocos2D… for Haxe ported from Cocos2D for iPhone.  I really don't want to try to explain the Cocos2D family tree… it's… confusing.

Status: Last updated on Github 4 months ago.  Not encouraging.

Sample code from here.

 

 

import cocos.support.UIImage;

class Sample_UIImage {

    public function new(){
        var uiimage = new UIImage().initWithContentsOfFile("grossini.png");
        uiimage.onComplete = callback (onComplete, uiimage);
        //flash.Lib.current.addChild ( new flash.display.Bitmap ( new Girl(0,0)));
    }
    function onComplete(uiimage:UIImage) {
        flash.Lib.current.addChild ( uiimage.bitmap );
    }

    public static function main(){
        haxe.Firebug.redirectTraces();
        flash.Lib.current.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
        flash.Lib.current.stage.align = flash.display.StageAlign.TOP_LEFT;
        new Sample_UIImage();
    }
}

 

 

Spur

https://github.com/PixelPounce/Spur

A component based game engine.  It appears to be young and hasn't been updated in a long time, a bad combination so I am ignoring it.

 

Hydras

A port of the PushButton engine.  A component based game engine built over top of NME.  Supports many targets, but hasn't been updated in a while.  Documentation?  None, zilch, nodda.  

Status: Last updated about a year ago

Sample code from here:

 

package ;

import com.pblabs.components.scene2D.CircleShape;
import com.pblabs.components.scene2D.SceneAlignment;
import com.pblabs.components.spatial.SpatialComponent;
import com.pblabs.components.tasks.FunctionTask;
import com.pblabs.components.tasks.LocationTask;
import com.pblabs.components.tasks.RepeatingTask;
import com.pblabs.components.tasks.SerialTask;
import com.pblabs.engine.core.PBContext;
import com.pblabs.engine.core.PBGame;
import com.pblabs.engine.core.SignalBondManager;
using Lambda;

using com.pblabs.components.scene2D.SceneUtil;
using com.pblabs.components.tasks.TaskUtil;
using com.pblabs.engine.core.PBGameUtil;
using com.pblabs.engine.util.PBUtil;

class Demo
{
    public function new()
    {
        //Setup logging.
        com.pblabs.engine.debug.Log.setup();

        var game = new PBGame();
        game.addBaseManagers();

        //The main "context". This is equivalent to a level, or a menu screen.
        var context :PBContext = game.pushContext(PBContext);
        //This method is via 'using' SceneUtil
        var scene2D = context.createBaseScene();
        scene2D.sceneAlignment = SceneAlignment.TOP_LEFT;
        var layer = scene2D.addLayer("defaultLayer");

        //Create our blob that we will move around.
        var so = context.createBaseSceneEntity();
        // var blob = context.allocate(com.pblabs.components.scene2D.RectangleShape);
        // blob.borderRadius = 10;
        var blob  = context.allocate(com.pblabs.components.scene2D.CircleShape);
        // blob.radius = 30;

        blob.fillColor = 0xff0000;

        blob.width = 100;
        // blob.height = 300;
        blob.parentProperty = layer.entityProp();
        so.addComponent(blob);
        so.initialize("SomeSceneObj");

        var topLeft = scene2D.getAlignedPoint(SceneAlignment.TOP_LEFT);
        var topRight = scene2D.getAlignedPoint(SceneAlignment.TOP_RIGHT);
        var bottomRight = scene2D.getAlignedPoint(SceneAlignment.BOTTOM_RIGHT);
        var bottomLeft = scene2D.getAlignedPoint(SceneAlignment.BOTTOM_LEFT);

        //This method is via 'using' SceneUtil
        so.setLocation(50, 100);
        //This method is via 'using' TaskUtil
        so.addTask(new RepeatingTask(
            new SerialTask(
                LocationTask.CreateEaseOut(topLeft.x + blob.width / 2, topLeft.y + blob.height / 2, 2),
                LocationTask.CreateEaseOut(topRight.x - blob.width / 2, topRight.y + blob.height / 2, 2),
                LocationTask.CreateEaseOut(bottomRight.x - blob.width / 2, bottomRight.y - blob.height / 2, 2),
                LocationTask.CreateEaseOut(bottomLeft.x + blob.width / 2, bottomLeft.y - blob.height / 2, 2)
            )
            ));

        //Prevents the first frame have the location at (0,0)
        scene2D.update();
    }

    public static function main()
    {
        new Demo();
    }
}

 

Flambe

https://github.com/aduros/flambe

Unfortunately it's web and Flash only so a no-go for me.

 

AWE6

https://code.google.com/p/awe6/

Awe6 is an inversion-of-control / component based game engine.  If you've never heard of IoC or Dependency injection, let me show you this wonderful example from Stack Overflow that shows IoC at it's simplest.

Traditional way:

Class car {

Engine _engine; Public Car() { _engine = new V6(); }

}

Inverted Way

Class car {

Engine _engine;

Public Car(Engine engine) { _engine = engine; }

}

var car = new Car(new V4());

Essentially you are "injecting" functionality into your class, as here, you "Inject" the engine type into the car via the constructor.

Alright, enough about IoC and Dependency Injection, back to Awe6.

Awe6Overview

The above graphic is the overview from the Awe6 site.  The framework has fairly good documentation.

Status: Most recent change was a couple days ago:

Sample code from here:

 

 

package demo.scenes;
import awe6.core.Scene;
import awe6.extras.gui.Text;
import awe6.interfaces.EAudioChannel;
import awe6.interfaces.EMessage;
import awe6.interfaces.EScene;
import awe6.interfaces.ETextStyle;
import awe6.interfaces.IEntity;
import awe6.interfaces.IKernel;
import demo.AssetManager;
import demo.entities.Bouncer;
import demo.entities.Sphere;
import demo.Session;

class Game extends AScene
{
    public static inline var TIME_LIMIT = 30;
    private var _timer:Text;
    private var _score:Int;

    override private function _init():Void
    {
        super._init();
        isPauseable = true;
        isSessionSavedOnNext = true;
        _session.isWin = false;
        var l_textStyle = _kernel.factory.createTextStyle( ETextStyle.SUBHEAD );
        #if js
        // for js performance boost (realtime filters very constly)
        l_textStyle.filters = [];
        l_textStyle.color = 0x020382;
        #end
        _timer = new Text( _kernel, _kernel.factory.width, 50, Std.string( 
_tools.convertAgeToFormattedTime( 0 ) ), l_textStyle );
        _timer.y = 70;
        addEntity( _timer, true, 1000 );

        _kernel.audio.stop( "MusicMenu", EAudioChannel.MUSIC );
        _kernel.audio.start( "MusicGame", EAudioChannel.MUSIC, -1, 0, .5, 0, true );
        for ( i in 0...10 )
        {
            addEntity( new Sphere( _kernel ), true, i + 10 );
        }
        _kernel.messenger.addSubscriber( _entity, EMessage.INIT, handleSphere, Sphere );
        _kernel.messenger.addSubscriber( _entity, EMessage.DISPOSE, handleSphere, Sphere );
    }
    
    public function handleSphere( p_message:EMessage, p_sender:IEntity ):Bool
    {
// trace( p_message + " " + p_sender );
        return true;
    }
    

    override private function _updater( ?p_deltaTime:Int = 0 ):Void
    {
        super._updater( p_deltaTime );

        _score = Std.int( _tools.limit( ( 1000 * TIME_LIMIT ) - _age, 0, _tools.BIG_NUMBER ) );
        if ( _score == 0 )
        {
            _gameOver();
        }
        _timer.text = _tools.convertAgeToFormattedTime( _age );
        var l_spheres:Array<Sphere> = getEntitiesByClass( Sphere );
        if ( ( l_spheres == null ) || ( l_spheres.length == 0 ) )
        {
            _gameOver();
        }
    }

    override private function _disposer():Void
    {
        _kernel.audio.stop( "MusicGame", EAudioChannel.MUSIC );
        super._disposer();
    }

    private function _gameOver():Void
    {
        if ( _score > _session.highScore )
        {
            _session.isWin = true;
            _session.highScore = _score;
        }
        _kernel.scenes.next();
    }

}

 

Ash Entity Framework

https://github.com/nadako/Ash-HaXe

This is a Haxe port of the Ash Framework a popular entity framework.  Unlike earlier examples, this is not a game engine, but may be an option as NME provides a great deal of the functionality you would normally require from a game engine.  That said, it is marked as PRE-ALPHA… that's pretty early on.  It's pretty active development wise but Haxe specific documentation is basically non-existent.

Status: Last commit 5 days ago.

Sample code from here:

 

package net.richardlord.asteroids;

import flash.display.DisplayObjectContainer;

import ash.tick.ITickProvider;
import ash.tick.FrameTickProvider;
import ash.core.Engine;

import net.richardlord.asteroids.systems.BulletAgeSystem;
import net.richardlord.asteroids.systems.CollisionSystem;
import net.richardlord.asteroids.systems.GameManager;
import net.richardlord.asteroids.systems.GunControlSystem;
import net.richardlord.asteroids.systems.MotionControlSystem;
import net.richardlord.asteroids.systems.MovementSystem;
import net.richardlord.asteroids.systems.RenderSystem;
import net.richardlord.asteroids.systems.SystemPriorities;
import net.richardlord.asteroids.systems.AnimationSystem;
import net.richardlord.asteroids.systems.DeathThroesSystem;
import net.richardlord.input.KeyPoll;

class Asteroids
{
    private var container:DisplayObjectContainer;
    private var engine:Engine;
    private var tickProvider:ITickProvider;
    private var creator:EntityCreator;
    private var keyPoll:KeyPoll;
    private var config:GameConfig;

    public function new(container:DisplayObjectContainer, width:Float, height:Float)
    {
        this.container = container;
        prepare(width, height);
    }

    private function prepare(width:Float, height:Float):Void
    {
        engine = new Engine();
        creator = new EntityCreator( engine );
        keyPoll = new KeyPoll( container.stage );
        config = new GameConfig();
        config.width = width;
        config.height = height;

        engine.addSystem(new GameManager( creator, config ), SystemPriorities.preUpdate);
        engine.addSystem(new MotionControlSystem( keyPoll ), SystemPriorities.update);
        engine.addSystem(new GunControlSystem( keyPoll, creator ), SystemPriorities.update);
        engine.addSystem(new BulletAgeSystem( creator ), SystemPriorities.update);
        engine.addSystem(new DeathThroesSystem( creator ), SystemPriorities.update);
        engine.addSystem(new MovementSystem( config ), SystemPriorities.move);
        engine.addSystem(new CollisionSystem( creator ), SystemPriorities.resolveCollisions);
        engine.addSystem(new AnimationSystem(), SystemPriorities.animate);
        engine.addSystem(new RenderSystem( container ), SystemPriorities.render);

        creator.createGame();
    }

    public function start():Void
    {
        tickProvider = new FrameTickProvider( container );
        tickProvider.add(engine.update);
        tickProvider.start();
    }
}

 

Please let me know if I have missed any!



Personally I am leading towards Flixel ( community size and maturity level ), but am going to take a closer look at the Awe6 engine first. If neither works for me, I will simply roll me own!

,

blog comments powered by Disqus

Month List

Popular Comments