[ANN] EnchantFromAmber

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] EnchantFromAmber

Masashi Umezawa-4
Hi all,

I've just released EnchantFromAmber. A simple enchant.js wrapper for Amber Smalltalk.

FYI: enchant.js is a popular game development framework.
http://enchantjs.com/ (See the showcase, for the games developed).

EnchantFromAmber enables you to develop/debug browser-based games interactively in Amber Smalltalk environment.

Any feedback is welcome. Since it is my first Amber project, there might be some oddities.  

Enjoy!






--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] EnchantFromAmber

Bernat Romagosa
Hi Masashi!

It's funny we're always working in similar projects! I developed a game framework for Amber a couple years ago (Ludus), although it kind of died since I haven't used it or updated it in a very long time. Actually, I tried to write some bindings to Box2Djs a while ago too, and I've been interested in using different JS game frameworks since JTalk came out.

I'll take a look at your wrapper when I have a moment and see how can I contribute to the project.

Best,
Bernat.




2013/5/17 Masashi Umezawa <[hidden email]>
Hi all,

I've just released EnchantFromAmber. A simple enchant.js wrapper for Amber Smalltalk.

FYI: enchant.js is a popular game development framework.
http://enchantjs.com/ (See the showcase, for the games developed).

EnchantFromAmber enables you to develop/debug browser-based games interactively in Amber Smalltalk environment.

Any feedback is welcome. Since it is my first Amber project, there might be some oddities.  

Enjoy!






--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] EnchantFromAmber

Masashi Umezawa-4
Hi Bernat,

Thank you for the interest. It is great hearing from you! 

One of the merit of enchant.js is its plugin support. There are lots of interesting plugins already available (including box2d):

Current EnchantFromAmber only supports core enchant.js library. It is enough for simple games. But if we extend the wrapper to plugins, we can expect to develop richer games (network, physics, 3D, etc) in Amber. 

Best regards,

On Friday, May 17, 2013 6:31:32 PM UTC+9, Bernat Romagosa wrote:
Hi Masashi!

It's funny we're always working in similar projects! I developed a game framework for Amber a couple years ago (Ludus), although it kind of died since I haven't used it or updated it in a very long time. Actually, I tried to write some bindings to Box2Djs a while ago too, and I've been interested in using different JS game frameworks since JTalk came out.

I'll take a look at your wrapper when I have a moment and see how can I contribute to the project.

Best,
Bernat.




2013/5/17 Masashi Umezawa <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="G72A4XacOxQJ">u...@...>
Hi all,

I've just released EnchantFromAmber. A simple enchant.js wrapper for Amber Smalltalk.

FYI: enchant.js is a popular game development framework.
http://enchantjs.com/ (See the showcase, for the games developed).

EnchantFromAmber enables you to develop/debug browser-based games interactively in Amber Smalltalk environment.

Any feedback is welcome. Since it is my first Amber project, there might be some oddities.  

Enjoy!






--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="G72A4XacOxQJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] EnchantFromAmber

Nicolas Petton
In reply to this post by Masashi Umezawa-4
Hi Masashi!

This looks really cool :)

Could you explain how you did it? For example I'm very interested to know if you're using Amber's proxies for JS objects to communicate with the JS library.
Do you already have examples using your library?

Also, I couldn't find a license for it.

Thanks,
Nico

On May 17, 2013, at 10:35 AM, Masashi Umezawa <[hidden email]> wrote:

Hi all,

I've just released EnchantFromAmber. A simple enchant.js wrapper for Amber Smalltalk.

FYI: enchant.js is a popular game development framework.
http://enchantjs.com/ (See the showcase, for the games developed).

EnchantFromAmber enables you to develop/debug browser-based games interactively in Amber Smalltalk environment.

Any feedback is welcome. Since it is my first Amber project, there might be some oddities.  

Enjoy!







--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] EnchantFromAmber

Masashi Umezawa-4
Hi Nico,

On Friday, May 17, 2013 8:32:00 PM UTC+9, nicolas petton wrote:
Hi Masashi!

This looks really cool :)


Thanks a lot!
 
Could you explain how you did it? For example I'm very interested to know if you're using Amber's proxies for JS objects to communicate with the JS library.

Actually how to design the proxy was the most difficult part for me. As you mention, Amber already generates JSObjectProxy objects dynamically, so it is not necessary to define explicit proxy classes in Smalltalk side. However, I selected to map JS class hierarchy structures to Smalltalk side, by subclassing from JSObjectProxy.

So, EcSprite (enchant.Sprite in JS) inheritance is like:  
JSObjectProxy <- EcProxy <- EcEventTarget <- EcEntity <- EcSprite

I also manually implemented some of the methods that are not so descriptive in original enchant.js API.
For example, JS enchant.Timeline has a function 'moveBy(x, y, time, easing)'. It is a bit confusing if we use automatically mapped method like moveBy:y:time:easing: (first part seems to be strange). In that case, I added #moveBy: aPoint time: time easing: easing manually, and used #forwardMessage:withArguments: internally.

The merits of this approach are: 
 - We can grasp class hierarchy without seeing JS API documents.
 - We can add some better-looking methods, utility methods, cache variables to the mapped classes.

The bad thing is that it is costly. If enchant.js's API changes drastically, EnchantFromAmber has to catch up with it.

Maybe I need some tool for defining wrapper classes from JS, but implementation seems to be very hard.
 
Do you already have examples using your library?


EnchantFromAmber includes three examples. Those were basically ported from enchant.js tutorials.
I've put one of them, a shooting game example here:

Also, I couldn't find a license for it.

It is a MIT style. README.md and LICENSE.txt describe about the license. Please let me know if I missed something.

Best regards,

 
Thanks,
Nico

On May 17, 2013, at 10:35 AM, Masashi Umezawa <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="MFtpC1f1a3kJ">u...@...> wrote:

Hi all,

I've just released EnchantFromAmber. A simple enchant.js wrapper for Amber Smalltalk.

FYI: enchant.js is a popular game development framework.
http://enchantjs.com/ (See the showcase, for the games developed).

EnchantFromAmber enables you to develop/debug browser-based games interactively in Amber Smalltalk environment.

Any feedback is welcome. Since it is my first Amber project, there might be some oddities.  

Enjoy!







--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="MFtpC1f1a3kJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] EnchantFromAmber

Herby Vojčík


Masashi Umezawa wrote:

> Actually how to design the proxy was the most difficult part for me. As
> you mention, Amber already generates JSObjectProxy objects dynamically,
> so it is not necessary to define explicit proxy classes in Smalltalk
> side. However, I selected to map JS class hierarchy structures to
> Smalltalk side, by subclassing from JSObjectProxy.
>
> So, EcSprite (enchant.Sprite in JS) inheritance is like:
> JSObjectProxy <- EcProxy <- EcEventTarget <- EcEntity <- EcSprite
>
> I also manually implemented some of the methods that are not so
> descriptive in original enchant.js API.
> For example, JS enchant.Timeline has a function 'moveBy(x, y, time,
> easing)'. It is a bit confusing if we use automatically mapped method
> like moveBy:y:time:easing: (first part seems to be strange). In that
> case, I added #moveBy: aPoint time: time easing: easing manually, and
> used #forwardMessage:withArguments: internally.
>
> The merits of this approach are:
> - We can grasp class hierarchy without seeing JS API documents.
> - We can add some better-looking methods, utility methods, cache
> variables to the mapped classes.
>
> The bad thing is that it is costly. If enchant.js's API changes
> drastically, EnchantFromAmber has to catch up with it.
>
> Maybe I need some tool for defining wrapper classes from JS, but
> implementation seems to be very hard.

If you generate only the smalltalk code and leave the rest for the
compiler, it should not be that hard... You can create classes/methods
at runtime, so it is just a metter of supplying the mappings /
deviations from defaults.

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.