[RL2] extending is super easy, really!

32 views
Skip to first unread message

Alessandro Bianco

unread,
Jan 27, 2012, 9:48:06 AM1/27/12
to Robotlegs AS3
Just want to let you know that extending RL2 is super easy, even at
this stage.

I'm using it just since a couple of days, but today I was able to make
Starling and RL2 work togheter ^_^
I just had to "clone" some of the base extensions, to make them point
to the right classes for Starling, but the overall process was really
straightforward and took just a couple of hours ...

In the past, with RL1, I struggled to make it work with Away3D and
eventually abandoned the idea because the effort was greater than the
final gain ... but at this point I think I bring that idea back on the
table ...

I'm going to share this little experiment soon, after I've done some
more tests to see if everything works as expected

cheers to the devs for the terrific work

Shaun Smith

unread,
Jan 27, 2012, 9:58:38 AM1/27/12
to robo...@googlegroups.com
Ah, that's good to hear!

I'd be interested in hearing what you had to do to get this working - looking forward to reading about your process.

Thanks for the feedback.

> --
> You received this message because you are subscribed to the Google
> Groups "Robotlegs" group.
> To post to this group, send email to robo...@googlegroups.com
> To unsubscribe from this group, send email to
> robotlegs+...@googlegroups.com
> for support visit http://knowledge.robotlegs.org

Alessandro Bianco

unread,
Jan 27, 2012, 11:25:16 AM1/27/12
to Robotlegs AS3
Since I'm not ready yet to share the code, I'll explain it here
briefly :)

Basically I took some of the original extensions:
ContextViewExtension, MediatorMapExtension, ModularityExtension,
StageSyncExtension, StageObserverExtension, ViewManagerExtension

all of which used the flash.display.DisplayObject or
flash.display.DisplayObjectContainer classes and I made them use the
starling equivalent.
Then I build a custom bundle, which uses my version of those
extensions ... and everything works automagically.
I didn't had to change the Context or any of the other core classes.

I'm still looking into all these classes to understand more deeply
what they do and why and who, because it's possible that some of those
extensions won't be needed in a Starling application.
So far I can say that mediators and commands seems to work fine.
I feel like I should build some test to prove that, but I'll release
the code with a dumb demo before diving into that ...

Then I'll probably be curious to see if a starling and a regular
context can coexist and cooperate ... and I bet they will :)

Alessandro Bianco

unread,
Jan 28, 2012, 5:55:51 AM1/28/12
to Robotlegs AS3
it's still in a super early stage, but there we go with the release
https://github.com/alebianco/robotlegs-extensions-starling
there's also a dumb example at
https://github.com/alebianco/StarlingExtension-example

Shaun Smith

unread,
Jan 29, 2012, 3:14:59 PM1/29/12
to robo...@googlegroups.com
Hey Alessandro, sorry for the delay. I'll try to make time to have a proper look during the week. My first thought it that hopefully you won't need to be duplicating quite so much code. As far as I understand it you can only have one Stage3D or StageVideo surface per player, so the modular stuff doesn't make as much sense as it does with a traditional display list. My feeling is that we just need to make a new Observer and wire it into the ViewManager that way. I know that there are a couple of hard-references to DisplayObject so I'll take a look and see what can be done there.
Reply all
Reply to author
Forward
0 new messages