Starling tutorials OpenFL?

Been searching for some starling tutorials for Haxe but coming up empty. Any one have any pointers to get started using this great flash library in with openfl?

1 Like

Never mind. Starling only seems to run for flash and html. After doing a little testing I could not get it to run on any of the native targets like windows or mac. Too bad I was really excited about it but simply no good for what I want to do. Unless I am doing something wrong.

Hi.
Were you using http://lib.haxe.org/p/starling/ ?
Just to confirm the lib, this may be used as reference for someone else.

1 Like

Yes I was that exact one.

Well, if someone reading this knows how to update the tags on that link : “2d, air, cpp, flash, gpu, js, openfl, starling, web”.

Have you tried the demo project? What issues do you have?

It works on C++, Neko, Flash and HTML5 here

Yes it does, I don’t know what went wrong for you, but I’m migrating my game made with Starling/Air to openFl and I can target c++, neko, html5 (with limitations) without problems.

Now to answer your first question, there is this small guide :
http://www.openfl.org/archive/developer/documentation/actionscript-developers/

And this tool which helped me greatly, an actionScript to Haxe converter :

You still have to change things manually eventually but it does the big part of the job with a lot of efficiency.

Hope this helped, I started with the demo of the port of Starling openFl , you might want to start there too :


You will see that it compile to many different targets including natives.

for starters running the demo “lime test neko” produces this:

Program3D.hx:303: vertex: ERROR: 0:2: ‘’ : version ‘100’ is not supported
ERROR: 0:3: ‘precision’ : syntax error: syntax error

Called from ? line 1
Called from ApplicationMain.hx line 78
Called from ApplicationMain.hx line 118
Called from lime/app/Application.hx line 212
Called from lime/_backend/native/NativeApplication.hx line 136
Called from a C function
Called from lime/_backend/native/NativeApplication.hx line 373
Called from lime/app/Event.hx line 145
Called from openfl/display/Stage.hx line 202
Called from openfl/display/Stage.hx line 772
Called from openfl/display/Stage.hx line 839
Called from openfl/display/DisplayObject.hx line 328
Called from a C function
Called from openfl/events/EventDispatcher.hx line 213
Called from starling/core/Starling.hx line 713
Called from starling/core/Starling.hx line 497
Called from starling/core/Starling.hx line 548
Called from starling/display/DisplayObjectContainer.hx line 378
Called from starling/display/Sprite.hx line 248
Called from a C function
Called from starling/display/DisplayObjectContainer.hx line 378
Called from starling/display/Sprite.hx line 248
Called from a C function
Called from starling/display/DisplayObjectContainer.hx line 378
Called from starling/text/TextField.hx line 179
Called from a C function
Called from starling/display/DisplayObjectContainer.hx line 378
Called from starling/display/Image.hx line 189
Called from starling/core/RenderSupport.hx line 577
Called from starling/core/RenderSupport.hx line 614
Called from starling/display/QuadBatch.hx line 254
Called from starling/display/QuadBatch.hx line 822
Called from starling/core/Starling.hx line 878
Called from starling/core/RenderSupport.hx line 706
Called from openfl/display3D/Program3D.hx line 74
Called from openfl/display3D/Program3D.hx line 307
Uncaught exception - Error compiling vertex shader: ERROR: 0:2: ‘’ : version ‘100’ is not supported
ERROR: 0:3: ‘precision’ : syntax error: syntax error

html5 and flash run fine but nothing else.

Oh, are you running on a Mac?

There was a problem with macOS rejecting our Stage3D shaders that’s fixed in the next release of OpenFL, here was the commit:

Use #if !desktop around the “#version” and precision lines for a quicker simple fix

Yes I am on a Mac. So you are saying copuy that code over to my local copy as a temp fix until it added to the next release?

@singmajesty Success! I replaced my local copy with the one you linked to and that fixed all my issues with starling! I am able to run the demo successfully! I guess I am a go on my project using starling! Thanks for your help!

1 Like

Awesome!

Let me know how it goes. My hope is that it will just keep getting better!

1 Like

So it looks as if there may still be issues on OSX with openfl and starling? Should I be developing on a windows box instead of of a Mac? It has been very difficult to get anything running on it. Like I said on another thread the only target that seems to run for me are neko, and mac. HTML5 was working for me on 4.4.1 but I still could not target iOS. I am on openfl 4.5.2 and lime3.5.2. and OSX El Capitan. But even if I switch to a PC will I continue to have these issues?