Ludus in the current amber > compilation issue

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

Ludus in the current amber > compilation issue

philippeback
I am trying to get Ludus working again with the current version.

I am facing a compilation error, associated with Javascript <> notation:

$ amberc Ludus.st -l Web -n HOS
Reading: Ludus.st
[Error: Compiler error in section:
Game methodsFor: 'events'

while processing chunk:
mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := <$(window).scrollTop();>.
        windowScrollLeft := <$(window).scrollLeft();>.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).

a RethrowErrorHandler does not understand #handleError:]


How is this code now supposed to be written?

Once done, this will be good material for a screencast.


TIA
Phil

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Clément Béra
You cannot inline any more javascript code in st code. A method is now either full javascript or full smalltalk.

So basically instead of:

mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := <$(window).scrollTop();>.
        windowScrollLeft := <$(window).scrollLeft();>.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).

You should have 3 method:

scrollTop
<return $(window).scrollTop();>

scrollLeft
<return $(window).scrollLeft();>

mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := self scrollTop.
        windowScrollLeft := self scrollLeft.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).


2014-04-15 15:43 GMT-07:00 [hidden email] <[hidden email]>:
I am trying to get Ludus working again with the current version.

I am facing a compilation error, associated with Javascript <> notation:

$ amberc Ludus.st -l Web -n HOS
Reading: Ludus.st
[Error: Compiler error in section:
Game methodsFor: 'events'

while processing chunk:
mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := <$(window).scrollTop();>.
        windowScrollLeft := <$(window).scrollLeft();>.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).

a RethrowErrorHandler does not understand #handleError:]


How is this code now supposed to be written?

Once done, this will be good material for a screencast.


TIA
Phil

--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Herby Vojčík
In reply to this post by philippeback


phil@highoctane.benapísal/a:

I am trying to get Ludus working again with the current version.

I am facing a compilation error, associated with Javascript <> notation:

$ amberc Ludus.st -l Web -n HOS
Reading: Ludus.st
[Error: Compiler error in section:
Game methodsFor: 'events'

while processing chunk:
mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := <$(window).scrollTop();>.

windowScrollTop := window asJQuery scrollTop.

The rest is similsr.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

philippeback
In reply to this post by Clément Béra
On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera <[hidden email]> wrote:
You cannot inline any more javascript code in st code. A method is now either full javascript or full smalltalk.

So basically instead of:

mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := <$(window).scrollTop();>.
        windowScrollLeft := <$(window).scrollLeft();>.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).

You should have 3 method:

scrollTop
<return $(window).scrollTop();>

scrollLeft
<return $(window).scrollLeft();>

mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := self scrollTop.
        windowScrollLeft := self scrollLeft.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).

Ok, I've done that and now, some games do work.

But I've a harder time with this one that I transformed into a method:

>>forElement: anElement ofDataEntry: aDataEntryName getProperty: aPropertyName
<return $(anElement).data(aDataEntryName)[aPropertyName];>

I do get a 

JavaScript exception: TypeError: $(...).data(...) is undefined

The basic question is: how do I pass parameters? When the call was inline, I guess that the 'XXX' were Javascript. But now, these are passed as Strings...

Help :-)

Phil
 


2014-04-15 15:43 GMT-07:00 [hidden email] <[hidden email]>:
I am trying to get Ludus working again with the current version.

I am facing a compilation error, associated with Javascript <> notation:

$ amberc Ludus.st -l Web -n HOS
Reading: Ludus.st
[Error: Compiler error in section:
Game methodsFor: 'events'

while processing chunk:
mouseMove: evt
        |canvasPosition windowScrollTop windowScrollLeft canvasRelative|

        windowScrollTop := <$(window).scrollTop();>.
        windowScrollLeft := <$(window).scrollLeft();>.
        canvasPosition := 'canvas' asJQuery position.

        canvasRelative := (canvasPosition left - windowScrollLeft) @ ( canvasPosition top - windowScrollTop ) .
        mousePosition := (evt clientX - canvasRelative x) @ (evt clientY - canvasRelative y).

a RethrowErrorHandler does not understand #handleError:]


How is this code now supposed to be written?

Once done, this will be good material for a screencast.


TIA
Phil

--
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/d/optout.

--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Herby Vojčík


[hidden email] wrote:

> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera <[hidden email]
> <mailto:[hidden email]>> wrote:
>
> But I've a harder time with this one that I transformed into a method:
>
>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
> aPropertyName
> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>
> I do get a
>
> JavaScript exception: TypeError: $(...).data(...) is undefined
>
> The basic question is: how do I pass parameters? When the call was
> inline, I guess that the 'XXX' were Javascript. But now, these are
> passed as Strings...

Well, I don't know what are you talking about (parsing as string), but
why are you taking all JS snippets and put them into methods?

Why not doing it in Smalltalk?

(anELement asJQuery data: aDataEntryName) at: aPropertyName

> Help :-)
>
> Phil

P.S.: See my previous email about previous issue where there is also no
need to have two additional methods.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

philippeback
On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík <[hidden email]> wrote:


[hidden email] wrote:
On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera <[hidden email]
<mailto:[hidden email]>> wrote:

But I've a harder time with this one that I transformed into a method:

 >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
aPropertyName
<return $(anElement).data(aDataEntryName)[aPropertyName];>

I do get a

JavaScript exception: TypeError: $(...).data(...) is undefined

The basic question is: how do I pass parameters? When the call was
inline, I guess that the 'XXX' were Javascript. But now, these are
passed as Strings...

Well, I don't know what are you talking about (parsing as string), but why are you taking all JS snippets and put them into methods?

Why not doing it in Smalltalk?

(anELement asJQuery data: aDataEntryName) at: aPropertyName

Yes, this is better indeed. I'll use that.
 
I was busy porting Ludus, where there are a couple of things like that and Clément told me that JavaScript now had to be in its own method and not inline anymore.


Question still holds tough.  

Help :-)

Phil

P.S.: See my previous email about previous issue where there is also no need to have two additional methods.

--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Bernat Romagosa

Hi Phil!

Cool to see there's still interest in Ludus! I'm flattered :)

I can take a look at it this afternoon, I haven't touched the code in about 3 years, but it shouldn't be too much work porting it.

What's the official way to proceed? Should Ludus be a branch in the official project? Is there a new way to pack and share Amber projects?

Sorry, been away for far too long...

Bernat.

p.s. I'm studying a specialization in videogame programming, and I was considering resurrecting Ludus and making it mobile-friendly as a final project.

On Apr 16, 2014 11:09 AM, "[hidden email]" <[hidden email]> wrote:
On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík <[hidden email]> wrote:


[hidden email] wrote:
On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera <[hidden email]
<mailto:[hidden email]>> wrote:

But I've a harder time with this one that I transformed into a method:

 >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
aPropertyName
<return $(anElement).data(aDataEntryName)[aPropertyName];>

I do get a

JavaScript exception: TypeError: $(...).data(...) is undefined

The basic question is: how do I pass parameters? When the call was
inline, I guess that the 'XXX' were Javascript. But now, these are
passed as Strings...

Well, I don't know what are you talking about (parsing as string), but why are you taking all JS snippets and put them into methods?

Why not doing it in Smalltalk?

(anELement asJQuery data: aDataEntryName) at: aPropertyName

Yes, this is better indeed. I'll use that.
 
I was busy porting Ludus, where there are a couple of things like that and Clément told me that JavaScript now had to be in its own method and not inline anymore.


Question still holds tough.  

Help :-)

Phil

P.S.: See my previous email about previous issue where there is also no need to have two additional methods.

--
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/d/optout.

--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

philippeback
In reply to this post by Herby Vojčík
On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík <[hidden email]> wrote:


[hidden email] wrote:
On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera <[hidden email]
<mailto:[hidden email]>> wrote:

But I've a harder time with this one that I transformed into a method:

 >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
aPropertyName
<return $(anElement).data(aDataEntryName)[aPropertyName];>

I do get a

JavaScript exception: TypeError: $(...).data(...) is undefined

The basic question is: how do I pass parameters? When the call was
inline, I guess that the 'XXX' were Javascript. But now, these are
passed as Strings...

Well, I don't know what are you talking about (parsing as string), but why are you taking all JS snippets and put them into methods?

Why not doing it in Smalltalk?

Passing, not parsing. 

(anELement asJQuery data: aDataEntryName) at: aPropertyName

This wasn't working too well for:

(self 
forElement: '#canvas' 
ofDataEntry: 'events' 
getProperty: 'click')

'#canvas' asJQuery works and gives an HTMLCanvas element.

which doens't understand data:


Any idea?

Phil






Help :-)

Phil

P.S.: See my previous email about previous issue where there is also no need to have two additional methods.

--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

philippe.back@highoctane.be
In reply to this post by Bernat Romagosa
Hi Bernat,

On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:

Hi Phil!

Cool to see there's still interest in Ludus! I'm flattered :)

It is a cool framework.
I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and before that Blitz3D things.

 

I can take a look at it this afternoon, I haven't touched the code in about 3 years, but it shouldn't be too much work porting it.

What's the official way to proceed? Should Ludus be a branch in the official project? Is there a new way to pack and share Amber projects?

I've ported most of the stuff.

It is here: 

https://github.com/philippeback/Ludus 

for easy reference. It is an amber init codebase with Ludus assets and code copied and the code fixed as much as I could.

Just clone it and open the game.html file. All is in there.

Now, sokoban and pong kind of run, as the sokoban editor with the mouse.
Simplepacman and Simplecave have issues, mostly with keypresses or canvas event binding.
Sound works as well. I learned a ton from your code. It is nice to read.

Let's make it working nicely again.
 

Sorry, been away for far too long...

Bernat.

p.s. I'm studying a specialization in videogame programming, and I was considering resurrecting Ludus and making it mobile-friendly as a final project.


Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of things, there is interesting stuff to do.

Phil


On Apr 16, 2014 11:09 AM, "<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ph...@..." <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ph...@...> wrote:
On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">he...@...> wrote:


<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ph...@... wrote:
On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">bera.c...@...
<mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">bera.c...@...>> wrote:

But I've a harder time with this one that I transformed into a method:

 >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
aPropertyName
<return $(anElement).data(aDataEntryName)[aPropertyName];>

I do get a

JavaScript exception: TypeError: $(...).data(...) is undefined

The basic question is: how do I pass parameters? When the call was
inline, I guess that the 'XXX' were Javascript. But now, these are
passed as Strings...

Well, I don't know what are you talking about (parsing as string), but why are you taking all JS snippets and put them into methods?

Why not doing it in Smalltalk?

(anELement asJQuery data: aDataEntryName) at: aPropertyName

Yes, this is better indeed. I'll use that.
 
I was busy porting Ludus, where there are a couple of things like that and Clément told me that JavaScript now had to be in its own method and not inline anymore.


Question still holds tough.  

Help :-)

Phil

P.S.: See my previous email about previous issue where there is also no need to have two additional methods.

--
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="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
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="WWiKiey-eTkJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Hannes Hirzel
Hi Philippe,

You had this up and running quickly!

On 4/16/14, Philippe Back <[hidden email]> wrote:

> Hi Bernat,
>
> On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:
>>
>> Hi Phil!
>>
>> Cool to see there's still interest in Ludus! I'm flattered :)
>>
> It is a cool framework.
> I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and before
> that Blitz3D things.
>
>
>
>> I can take a look at it this afternoon, I haven't touched the code in
>> about 3 years, but it shouldn't be too much work porting it.
>>
>> What's the official way to proceed? Should Ludus be a branch in the
>> official project? Is there a new way to pack and share Amber projects?
>>
> I've ported most of the stuff.
>
> It is here:
>
> https://github.com/philippeback/Ludus
>
> for easy reference. It is an amber init codebase with Ludus assets and code
>
> copied and the code fixed as much as I could.
>
> Just clone it and open the game.html file. All is in there.
>
> Now, sokoban and pong kind of run, as the sokoban editor with the mouse.

Key commands for Sokoban? Or should it work with the mouse?

> Simplepacman and Simplecave have issues, mostly with keypresses or canvas
> event binding.
> Sound works as well. I learned a ton from your code. It is nice to read.

Yes. And an astonishing low number of classes.

--Hannes

> Let's make it working nicely again.
>
>
>> Sorry, been away for far too long...
>>
> Bernat.
>>
>> p.s. I'm studying a specialization in videogame programming, and I was
>> considering resurrecting Ludus and making it mobile-friendly as a final
>> project.
>>
>
> Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of
> things, there is interesting stuff to do.
>
> Phil
>
>
> On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>> [hidden email] <javascript:>> wrote:
>>
>>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> <[hidden email]<javascript:>
>>> > wrote:
>>>
>>>>
>>>>
>>>> [hidden email] <javascript:> wrote:
>>>>
>>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>>>> <[hidden email]<javascript:>
>>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>>>>
>>>>> But I've a harder time with this one that I transformed into a method:
>>>>>
>>>>>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
>>>>> aPropertyName
>>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>>>>
>>>>> I do get a
>>>>>
>>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>>>>
>>>>> The basic question is: how do I pass parameters? When the call was
>>>>> inline, I guess that the 'XXX' were Javascript. But now, these are
>>>>> passed as Strings...
>>>>>
>>>>
>>>> Well, I don't know what are you talking about (parsing as string), but
>>>> why are you taking all JS snippets and put them into methods?
>>>>
>>>> Why not doing it in Smalltalk?
>>>>
>>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>>>
>>>
>>> Yes, this is better indeed. I'll use that.
>>>
>>> I was busy porting Ludus, where there are a couple of things like that
>>> and Clément told me that JavaScript now had to be in its own method and
>>> not
>>> inline anymore.
>>>
>>>
>>> Question still holds tough.
>>>
>>>>
>>>>  Help :-)
>>>>>
>>>>> Phil
>>>>>
>>>>
>>>> P.S.: See my previous email about previous issue where there is also no
>>>>
>>>> need to have two additional methods.
>>>>
>>>> --
>>>> 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] <javascript:>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> 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] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> 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/d/optout.
>

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

philippeback
Sokoban uses the keys



On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]> wrote:
Hi Philippe,

You had this up and running quickly!

On 4/16/14, Philippe Back <[hidden email]> wrote:
> Hi Bernat,
>
> On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:
>>
>> Hi Phil!
>>
>> Cool to see there's still interest in Ludus! I'm flattered :)
>>
> It is a cool framework.
> I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and before
> that Blitz3D things.
>
>
>
>> I can take a look at it this afternoon, I haven't touched the code in
>> about 3 years, but it shouldn't be too much work porting it.
>>
>> What's the official way to proceed? Should Ludus be a branch in the
>> official project? Is there a new way to pack and share Amber projects?
>>
> I've ported most of the stuff.
>
> It is here:
>
> https://github.com/philippeback/Ludus
>
> for easy reference. It is an amber init codebase with Ludus assets and code
>
> copied and the code fixed as much as I could.
>
> Just clone it and open the game.html file. All is in there.
>
> Now, sokoban and pong kind of run, as the sokoban editor with the mouse.

Key commands for Sokoban? Or should it work with the mouse?

> Simplepacman and Simplecave have issues, mostly with keypresses or canvas
> event binding.
> Sound works as well. I learned a ton from your code. It is nice to read.

Yes. And an astonishing low number of classes.

--Hannes

> Let's make it working nicely again.
>
>
>> Sorry, been away for far too long...
>>
> Bernat.
>>
>> p.s. I'm studying a specialization in videogame programming, and I was
>> considering resurrecting Ludus and making it mobile-friendly as a final
>> project.
>>
>
> Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of
> things, there is interesting stuff to do.
>
> Phil
>
>
> On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>> [hidden email] <javascript:>> wrote:
>>
>>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> <[hidden email]<javascript:>
>>> > wrote:
>>>
>>>>
>>>>
>>>> [hidden email] <javascript:> wrote:
>>>>
>>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>>>> <[hidden email]<javascript:>
>>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>>>>
>>>>> But I've a harder time with this one that I transformed into a method:
>>>>>
>>>>>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
>>>>> aPropertyName
>>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>>>>
>>>>> I do get a
>>>>>
>>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>>>>
>>>>> The basic question is: how do I pass parameters? When the call was
>>>>> inline, I guess that the 'XXX' were Javascript. But now, these are
>>>>> passed as Strings...
>>>>>
>>>>
>>>> Well, I don't know what are you talking about (parsing as string), but
>>>> why are you taking all JS snippets and put them into methods?
>>>>
>>>> Why not doing it in Smalltalk?
>>>>
>>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>>>
>>>
>>> Yes, this is better indeed. I'll use that.
>>>
>>> I was busy porting Ludus, where there are a couple of things like that
>>> and Clément told me that JavaScript now had to be in its own method and
>>> not
>>> inline anymore.
>>>
>>>
>>> Question still holds tough.
>>>
>>>>
>>>>  Help :-)
>>>>>
>>>>> Phil
>>>>>
>>>>
>>>> P.S.: See my previous email about previous issue where there is also no
>>>>
>>>> need to have two additional methods.
>>>>
>>>> --
>>>> 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] <javascript:>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> 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] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> 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/d/optout.
>

--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Hannes Hirzel
UpArrow key produces a walkback in

Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock

The keys array contains elements which are nil and a few elements
which are false.

--Hannes

On 4/16/14, [hidden email] <[hidden email]> wrote:

> Sokoban uses the keys
>
>
>
> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
> wrote:
>
>> Hi Philippe,
>>
>> You had this up and running quickly!
>>
>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>> > Hi Bernat,
>> >
>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:
>> >>
>> >> Hi Phil!
>> >>
>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>> >>
>> > It is a cool framework.
>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and
>> before
>> > that Blitz3D things.
>> >
>> >
>> >
>> >> I can take a look at it this afternoon, I haven't touched the code in
>> >> about 3 years, but it shouldn't be too much work porting it.
>> >>
>> >> What's the official way to proceed? Should Ludus be a branch in the
>> >> official project? Is there a new way to pack and share Amber projects?
>> >>
>> > I've ported most of the stuff.
>> >
>> > It is here:
>> >
>> > https://github.com/philippeback/Ludus
>> >
>> > for easy reference. It is an amber init codebase with Ludus assets and
>> code
>> >
>> > copied and the code fixed as much as I could.
>> >
>> > Just clone it and open the game.html file. All is in there.
>> >
>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>> > mouse.
>>
>> Key commands for Sokoban? Or should it work with the mouse?
>>
>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>> > canvas
>> > event binding.
>> > Sound works as well. I learned a ton from your code. It is nice to
>> > read.
>>
>> Yes. And an astonishing low number of classes.
>>
>> --Hannes
>>
>> > Let's make it working nicely again.
>> >
>> >
>> >> Sorry, been away for far too long...
>> >>
>> > Bernat.
>> >>
>> >> p.s. I'm studying a specialization in videogame programming, and I was
>> >> considering resurrecting Ludus and making it mobile-friendly as a
>> >> final
>> >> project.
>> >>
>> >
>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of
>> > things, there is interesting stuff to do.
>> >
>> > Phil
>> >
>> >
>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>> >> [hidden email] <javascript:>> wrote:
>> >>
>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>> >>> <[hidden email]<javascript:>
>> >>> > wrote:
>> >>>
>> >>>>
>> >>>>
>> >>>> [hidden email] <javascript:> wrote:
>> >>>>
>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>> >>>>> <[hidden email]<javascript:>
>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>> >>>>>
>> >>>>> But I've a harder time with this one that I transformed into a
>> method:
>> >>>>>
>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
>> >>>>> aPropertyName
>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>> >>>>>
>> >>>>> I do get a
>> >>>>>
>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>> >>>>>
>> >>>>> The basic question is: how do I pass parameters? When the call was
>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these are
>> >>>>> passed as Strings...
>> >>>>>
>> >>>>
>> >>>> Well, I don't know what are you talking about (parsing as string),
>> >>>> but
>> >>>> why are you taking all JS snippets and put them into methods?
>> >>>>
>> >>>> Why not doing it in Smalltalk?
>> >>>>
>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>> >>>>
>> >>>
>> >>> Yes, this is better indeed. I'll use that.
>> >>>
>> >>> I was busy porting Ludus, where there are a couple of things like
>> >>> that
>> >>> and Clément told me that JavaScript now had to be in its own method
>> >>> and
>> >>> not
>> >>> inline anymore.
>> >>>
>> >>>
>> >>> Question still holds tough.
>> >>>
>> >>>>
>> >>>>  Help :-)
>> >>>>>
>> >>>>> Phil
>> >>>>>
>> >>>>
>> >>>> P.S.: See my previous email about previous issue where there is also
>> no
>> >>>>
>> >>>> need to have two additional methods.
>> >>>>
>> >>>> --
>> >>>> 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] <javascript:>.
>> >>>> For more options, visit https://groups.google.com/d/optout.
>> >>>>
>> >>>
>> >>>  --
>> >>> 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] <javascript:>.
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>>
>> >>
>> >
>> > --
>> > 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/d/optout.
>> >
>>
>> --
>> 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/d/optout.
>>
>
> --
> 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/d/optout.
>

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Hannes Hirzel
The keys instance variable (class Game) is initialized to
    keys := #().

I wonder what it is supposed to contain.

On 4/16/14, H. Hirzel <[hidden email]> wrote:

> UpArrow key produces a walkback in
>
> Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>
> The keys array contains elements which are nil and a few elements
> which are false.
>
> --Hannes
>
> On 4/16/14, [hidden email] <[hidden email]> wrote:
>> Sokoban uses the keys
>>
>>
>>
>> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>> wrote:
>>
>>> Hi Philippe,
>>>
>>> You had this up and running quickly!
>>>
>>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> > Hi Bernat,
>>> >
>>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:
>>> >>
>>> >> Hi Phil!
>>> >>
>>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>
>>> > It is a cool framework.
>>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and
>>> before
>>> > that Blitz3D things.
>>> >
>>> >
>>> >
>>> >> I can take a look at it this afternoon, I haven't touched the code in
>>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>
>>> >> What's the official way to proceed? Should Ludus be a branch in the
>>> >> official project? Is there a new way to pack and share Amber
>>> >> projects?
>>> >>
>>> > I've ported most of the stuff.
>>> >
>>> > It is here:
>>> >
>>> > https://github.com/philippeback/Ludus
>>> >
>>> > for easy reference. It is an amber init codebase with Ludus assets and
>>> code
>>> >
>>> > copied and the code fixed as much as I could.
>>> >
>>> > Just clone it and open the game.html file. All is in there.
>>> >
>>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> > mouse.
>>>
>>> Key commands for Sokoban? Or should it work with the mouse?
>>>
>>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> > canvas
>>> > event binding.
>>> > Sound works as well. I learned a ton from your code. It is nice to
>>> > read.
>>>
>>> Yes. And an astonishing low number of classes.
>>>
>>> --Hannes
>>>
>>> > Let's make it working nicely again.
>>> >
>>> >
>>> >> Sorry, been away for far too long...
>>> >>
>>> > Bernat.
>>> >>
>>> >> p.s. I'm studying a specialization in videogame programming, and I
>>> >> was
>>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >> final
>>> >> project.
>>> >>
>>> >
>>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of
>>> > things, there is interesting stuff to do.
>>> >
>>> > Phil
>>> >
>>> >
>>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >> [hidden email] <javascript:>> wrote:
>>> >>
>>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> <[hidden email]<javascript:>
>>> >>> > wrote:
>>> >>>
>>> >>>>
>>> >>>>
>>> >>>> [hidden email] <javascript:> wrote:
>>> >>>>
>>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>>>> <[hidden email]<javascript:>
>>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>>>>
>>> >>>>> But I've a harder time with this one that I transformed into a
>>> method:
>>> >>>>>
>>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
>>> >>>>> aPropertyName
>>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>>>>
>>> >>>>> I do get a
>>> >>>>>
>>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>>>>
>>> >>>>> The basic question is: how do I pass parameters? When the call was
>>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these are
>>> >>>>> passed as Strings...
>>> >>>>>
>>> >>>>
>>> >>>> Well, I don't know what are you talking about (parsing as string),
>>> >>>> but
>>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>>>
>>> >>>> Why not doing it in Smalltalk?
>>> >>>>
>>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>>>
>>> >>>
>>> >>> Yes, this is better indeed. I'll use that.
>>> >>>
>>> >>> I was busy porting Ludus, where there are a couple of things like
>>> >>> that
>>> >>> and Clément told me that JavaScript now had to be in its own method
>>> >>> and
>>> >>> not
>>> >>> inline anymore.
>>> >>>
>>> >>>
>>> >>> Question still holds tough.
>>> >>>
>>> >>>>
>>> >>>>  Help :-)
>>> >>>>>
>>> >>>>> Phil
>>> >>>>>
>>> >>>>
>>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>>> also
>>> no
>>> >>>>
>>> >>>> need to have two additional methods.
>>> >>>>
>>> >>>> --
>>> >>>> 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] <javascript:>.
>>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>>>
>>> >>>
>>> >>>  --
>>> >>> 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] <javascript:>.
>>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>>
>>> >>
>>> >
>>> > --
>>> > 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/d/optout.
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>> --
>> 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/d/optout.
>>
>

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Bernat Romagosa
Yeah that's correct.

In many game frameworks you use an array to store the state of keys, instead of doing polling or interruptions. When the key is pressed, you reflect it in the array.

So, this array (if I remember well) is actually a dictionary that'll contain the state of a key once it's pressed.

(you may wanna take a look at the class Key as well)

Cheers!
Bernat.


2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
The keys instance variable (class Game) is initialized to
    keys := #().

I wonder what it is supposed to contain.

On 4/16/14, H. Hirzel <[hidden email]> wrote:
> UpArrow key produces a walkback in
>
> Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>
> The keys array contains elements which are nil and a few elements
> which are false.
>
> --Hannes
>
> On 4/16/14, [hidden email] <[hidden email]> wrote:
>> Sokoban uses the keys
>>
>>
>>
>> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>> wrote:
>>
>>> Hi Philippe,
>>>
>>> You had this up and running quickly!
>>>
>>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> > Hi Bernat,
>>> >
>>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:
>>> >>
>>> >> Hi Phil!
>>> >>
>>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>
>>> > It is a cool framework.
>>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and
>>> before
>>> > that Blitz3D things.
>>> >
>>> >
>>> >
>>> >> I can take a look at it this afternoon, I haven't touched the code in
>>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>
>>> >> What's the official way to proceed? Should Ludus be a branch in the
>>> >> official project? Is there a new way to pack and share Amber
>>> >> projects?
>>> >>
>>> > I've ported most of the stuff.
>>> >
>>> > It is here:
>>> >
>>> > https://github.com/philippeback/Ludus
>>> >
>>> > for easy reference. It is an amber init codebase with Ludus assets and
>>> code
>>> >
>>> > copied and the code fixed as much as I could.
>>> >
>>> > Just clone it and open the game.html file. All is in there.
>>> >
>>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> > mouse.
>>>
>>> Key commands for Sokoban? Or should it work with the mouse?
>>>
>>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> > canvas
>>> > event binding.
>>> > Sound works as well. I learned a ton from your code. It is nice to
>>> > read.
>>>
>>> Yes. And an astonishing low number of classes.
>>>
>>> --Hannes
>>>
>>> > Let's make it working nicely again.
>>> >
>>> >
>>> >> Sorry, been away for far too long...
>>> >>
>>> > Bernat.
>>> >>
>>> >> p.s. I'm studying a specialization in videogame programming, and I
>>> >> was
>>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >> final
>>> >> project.
>>> >>
>>> >
>>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of
>>> > things, there is interesting stuff to do.
>>> >
>>> > Phil
>>> >
>>> >
>>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >> [hidden email] <javascript:>> wrote:
>>> >>
>>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> <[hidden email]<javascript:>
>>> >>> > wrote:
>>> >>>
>>> >>>>
>>> >>>>
>>> >>>> [hidden email] <javascript:> wrote:
>>> >>>>
>>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>>>> <[hidden email]<javascript:>
>>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>>>>
>>> >>>>> But I've a harder time with this one that I transformed into a
>>> method:
>>> >>>>>
>>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
>>> >>>>> aPropertyName
>>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>>>>
>>> >>>>> I do get a
>>> >>>>>
>>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>>>>
>>> >>>>> The basic question is: how do I pass parameters? When the call was
>>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these are
>>> >>>>> passed as Strings...
>>> >>>>>
>>> >>>>
>>> >>>> Well, I don't know what are you talking about (parsing as string),
>>> >>>> but
>>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>>>
>>> >>>> Why not doing it in Smalltalk?
>>> >>>>
>>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>>>
>>> >>>
>>> >>> Yes, this is better indeed. I'll use that.
>>> >>>
>>> >>> I was busy porting Ludus, where there are a couple of things like
>>> >>> that
>>> >>> and Clément told me that JavaScript now had to be in its own method
>>> >>> and
>>> >>> not
>>> >>> inline anymore.
>>> >>>
>>> >>>
>>> >>> Question still holds tough.
>>> >>>
>>> >>>>
>>> >>>>  Help :-)
>>> >>>>>
>>> >>>>> Phil
>>> >>>>>
>>> >>>>
>>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>>> also
>>> no
>>> >>>>
>>> >>>> need to have two additional methods.
>>> >>>>
>>> >>>> --
>>> >>>> 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] <javascript:>.
>>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>>>
>>> >>>
>>> >>>  --
>>> >>> 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] <javascript:>.
>>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>>
>>> >>
>>> >
>>> > --
>>> > 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/d/optout.
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>> --
>> 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/d/optout.
>>
>

--
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/d/optout.



--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Bernat Romagosa
Oh! And take a look at the documentation! I spent a long while writing the docs for Ludus, so you may find a way to connect the missing dots by reading how things should work.

You can access it by pointing to ludus.html

Cheers,
Bernat.


2014-04-16 17:50 GMT+02:00 Bernat Romagosa <[hidden email]>:
Yeah that's correct.

In many game frameworks you use an array to store the state of keys, instead of doing polling or interruptions. When the key is pressed, you reflect it in the array.

So, this array (if I remember well) is actually a dictionary that'll contain the state of a key once it's pressed.

(you may wanna take a look at the class Key as well)

Cheers!
Bernat.


2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:

The keys instance variable (class Game) is initialized to
    keys := #().

I wonder what it is supposed to contain.

On 4/16/14, H. Hirzel <[hidden email]> wrote:
> UpArrow key produces a walkback in
>
> Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>
> The keys array contains elements which are nil and a few elements
> which are false.
>
> --Hannes
>
> On 4/16/14, [hidden email] <[hidden email]> wrote:
>> Sokoban uses the keys
>>
>>
>>
>> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>> wrote:
>>
>>> Hi Philippe,
>>>
>>> You had this up and running quickly!
>>>
>>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> > Hi Bernat,
>>> >
>>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa wrote:
>>> >>
>>> >> Hi Phil!
>>> >>
>>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>
>>> > It is a cool framework.
>>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz), and
>>> before
>>> > that Blitz3D things.
>>> >
>>> >
>>> >
>>> >> I can take a look at it this afternoon, I haven't touched the code in
>>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>
>>> >> What's the official way to proceed? Should Ludus be a branch in the
>>> >> official project? Is there a new way to pack and share Amber
>>> >> projects?
>>> >>
>>> > I've ported most of the stuff.
>>> >
>>> > It is here:
>>> >
>>> > https://github.com/philippeback/Ludus
>>> >
>>> > for easy reference. It is an amber init codebase with Ludus assets and
>>> code
>>> >
>>> > copied and the code fixed as much as I could.
>>> >
>>> > Just clone it and open the game.html file. All is in there.
>>> >
>>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> > mouse.
>>>
>>> Key commands for Sokoban? Or should it work with the mouse?
>>>
>>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> > canvas
>>> > event binding.
>>> > Sound works as well. I learned a ton from your code. It is nice to
>>> > read.
>>>
>>> Yes. And an astonishing low number of classes.
>>>
>>> --Hannes
>>>
>>> > Let's make it working nicely again.
>>> >
>>> >
>>> >> Sorry, been away for far too long...
>>> >>
>>> > Bernat.
>>> >>
>>> >> p.s. I'm studying a specialization in videogame programming, and I
>>> >> was
>>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >> final
>>> >> project.
>>> >>
>>> >
>>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind of
>>> > things, there is interesting stuff to do.
>>> >
>>> > Phil
>>> >
>>> >
>>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >> [hidden email] <javascript:>> wrote:
>>> >>
>>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> <[hidden email]<javascript:>
>>> >>> > wrote:
>>> >>>
>>> >>>>
>>> >>>>
>>> >>>> [hidden email] <javascript:> wrote:
>>> >>>>
>>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>>>> <[hidden email]<javascript:>
>>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>>>>
>>> >>>>> But I've a harder time with this one that I transformed into a
>>> method:
>>> >>>>>
>>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName getProperty:
>>> >>>>> aPropertyName
>>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>>>>
>>> >>>>> I do get a
>>> >>>>>
>>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>>>>
>>> >>>>> The basic question is: how do I pass parameters? When the call was
>>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these are
>>> >>>>> passed as Strings...
>>> >>>>>
>>> >>>>
>>> >>>> Well, I don't know what are you talking about (parsing as string),
>>> >>>> but
>>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>>>
>>> >>>> Why not doing it in Smalltalk?
>>> >>>>
>>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>>>
>>> >>>
>>> >>> Yes, this is better indeed. I'll use that.
>>> >>>
>>> >>> I was busy porting Ludus, where there are a couple of things like
>>> >>> that
>>> >>> and Clément told me that JavaScript now had to be in its own method
>>> >>> and
>>> >>> not
>>> >>> inline anymore.
>>> >>>
>>> >>>
>>> >>> Question still holds tough.
>>> >>>
>>> >>>>
>>> >>>>  Help :-)
>>> >>>>>
>>> >>>>> Phil
>>> >>>>>
>>> >>>>
>>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>>> also
>>> no
>>> >>>>
>>> >>>> need to have two additional methods.
>>> >>>>
>>> >>>> --
>>> >>>> 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] <javascript:>.
>>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>>>
>>> >>>
>>> >>>  --
>>> >>> 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] <javascript:>.
>>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>>
>>> >>
>>> >
>>> > --
>>> > 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/d/optout.
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>> --
>> 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/d/optout.
>>
>

--
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/d/optout.



--
Bernat Romagosa.



--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Hannes Hirzel
Yes I found the documentation and it quite comprehensive. However it
does not talk about instance variables and the general design. Mainly
method comments.

There is no ludus.html in https://github.com/philippeback/Ludus but 4
other html files

Documentation in Game.html

whileKeyPressed:do:
While the key given by the first argument is pressed, it evaluates the
block given by the second argument.


MyGame >> step
    self whileKeyPressed: Key upArrow do: [ superheroe moveCentreBy: (0 @ -1) ].



The code:

whileKeyPressed: aKeyCode do: aBlock
        ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at: aKeyCode
] ) ifTrue: aBlock

What is this last line supposed to do? Key code is 37. I open the
Sokoban game and only press 'UpArrow' once and the debugger comes up.

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:

> Oh! And take a look at the documentation! I spent a long while writing the
> docs for Ludus, so you may find a way to connect the missing dots by
> reading how things should work.
>
> You can access it by pointing to ludus.html
>
> Cheers,
> Bernat.
>
>
> 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
> <[hidden email]>:
>
>> Yeah that's correct.
>>
>> In many game frameworks you use an array to store the state of keys,
>> instead of doing polling or interruptions. When the key is pressed, you
>> reflect it in the array.
>>
>> So, this array (if I remember well) is actually a dictionary that'll
>> contain the state of a key once it's pressed.
>>
>> (you may wanna take a look at the class Key as well)
>>
>> Cheers!
>> Bernat.
>>
>>
>> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>>
>> The keys instance variable (class Game) is initialized to
>>>     keys := #().
>>>
>>> I wonder what it is supposed to contain.
>>>
>>> On 4/16/14, H. Hirzel <[hidden email]> wrote:
>>> > UpArrow key produces a walkback in
>>> >
>>> > Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>>> >
>>> > The keys array contains elements which are nil and a few elements
>>> > which are false.
>>> >
>>> > --Hannes
>>> >
>>> > On 4/16/14, [hidden email] <[hidden email]> wrote:
>>> >> Sokoban uses the keys
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>>> >> wrote:
>>> >>
>>> >>> Hi Philippe,
>>> >>>
>>> >>> You had this up and running quickly!
>>> >>>
>>> >>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> >>> > Hi Bernat,
>>> >>> >
>>> >>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa
>>> wrote:
>>> >>> >>
>>> >>> >> Hi Phil!
>>> >>> >>
>>> >>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>> >>
>>> >>> > It is a cool framework.
>>> >>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz),
>>> >>> > and
>>> >>> before
>>> >>> > that Blitz3D things.
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> >> I can take a look at it this afternoon, I haven't touched the
>>> >>> >> code
>>> in
>>> >>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>> >>
>>> >>> >> What's the official way to proceed? Should Ludus be a branch in
>>> >>> >> the
>>> >>> >> official project? Is there a new way to pack and share Amber
>>> >>> >> projects?
>>> >>> >>
>>> >>> > I've ported most of the stuff.
>>> >>> >
>>> >>> > It is here:
>>> >>> >
>>> >>> > https://github.com/philippeback/Ludus
>>> >>> >
>>> >>> > for easy reference. It is an amber init codebase with Ludus assets
>>> and
>>> >>> code
>>> >>> >
>>> >>> > copied and the code fixed as much as I could.
>>> >>> >
>>> >>> > Just clone it and open the game.html file. All is in there.
>>> >>> >
>>> >>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> >>> > mouse.
>>> >>>
>>> >>> Key commands for Sokoban? Or should it work with the mouse?
>>> >>>
>>> >>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> >>> > canvas
>>> >>> > event binding.
>>> >>> > Sound works as well. I learned a ton from your code. It is nice to
>>> >>> > read.
>>> >>>
>>> >>> Yes. And an astonishing low number of classes.
>>> >>>
>>> >>> --Hannes
>>> >>>
>>> >>> > Let's make it working nicely again.
>>> >>> >
>>> >>> >
>>> >>> >> Sorry, been away for far too long...
>>> >>> >>
>>> >>> > Bernat.
>>> >>> >>
>>> >>> >> p.s. I'm studying a specialization in videogame programming, and
>>> >>> >> I
>>> >>> >> was
>>> >>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >>> >> final
>>> >>> >> project.
>>> >>> >>
>>> >>> >
>>> >>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind
>>> of
>>> >>> > things, there is interesting stuff to do.
>>> >>> >
>>> >>> > Phil
>>> >>> >
>>> >>> >
>>> >>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >>> >> [hidden email] <javascript:>> wrote:
>>> >>> >>
>>> >>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> >>> <[hidden email]<javascript:>
>>> >>> >>> > wrote:
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>
>>> >>> >>>> [hidden email] <javascript:> wrote:
>>> >>> >>>>
>>> >>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>> >>>>> <[hidden email]<javascript:>
>>> >>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>> >>>>>
>>> >>> >>>>> But I've a harder time with this one that I transformed into a
>>> >>> method:
>>> >>> >>>>>
>>> >>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName
>>> getProperty:
>>> >>> >>>>> aPropertyName
>>> >>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>> >>>>>
>>> >>> >>>>> I do get a
>>> >>> >>>>>
>>> >>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>> >>>>>
>>> >>> >>>>> The basic question is: how do I pass parameters? When the call
>>> was
>>> >>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these
>>> are
>>> >>> >>>>> passed as Strings...
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> Well, I don't know what are you talking about (parsing as
>>> string),
>>> >>> >>>> but
>>> >>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>> >>>>
>>> >>> >>>> Why not doing it in Smalltalk?
>>> >>> >>>>
>>> >>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>> Yes, this is better indeed. I'll use that.
>>> >>> >>>
>>> >>> >>> I was busy porting Ludus, where there are a couple of things
>>> >>> >>> like
>>> >>> >>> that
>>> >>> >>> and Clément told me that JavaScript now had to be in its own
>>> method
>>> >>> >>> and
>>> >>> >>> not
>>> >>> >>> inline anymore.
>>> >>> >>>
>>> >>> >>>
>>> >>> >>> Question still holds tough.
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>  Help :-)
>>> >>> >>>>>
>>> >>> >>>>> Phil
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>> >>>> also
>>> >>> no
>>> >>> >>>>
>>> >>> >>>> need to have two additional methods.
>>> >>> >>>>
>>> >>> >>>> --
>>> >>> >>>> 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] <javascript:>.
>>> >>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>>  --
>>> >>> >>> 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] <javascript:>.
>>> >>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>
>>> >>> >>
>>> >>> >
>>> >>> > --
>>> >>> > 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/d/optout.
>>> >>> >
>>> >>>
>>> >>> --
>>> >>> 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/d/optout.
>>> >>>
>>> >>
>>> >> --
>>> >> 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/d/optout.
>>> >>
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>>
>
>
>
> --
> 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/d/optout.
>

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Bernat Romagosa
I really should take a deeper look at my old code, but the idea is:

((keys at: aKeyCode ifAbsent: [ false ]) and: [ keys at: aKeyCode ]) ifTrue: aBlock

If the keys dictionary doesn't have an entry for this key in it, evaluate to false. Otherwise evaluate to its value. Then, if the previous evaluated to true, execute aBlock.

Without having looked at it, I'm guessing the error may come from keys not being a Dictionary. Back in the day, Amber had a unique way to create dictionaries on the fly, but I think it's not there anymore, am I right?


2014-04-16 18:39 GMT+02:00 H. Hirzel <[hidden email]>:
Yes I found the documentation and it quite comprehensive. However it
does not talk about instance variables and the general design. Mainly
method comments.

There is no ludus.html in https://github.com/philippeback/Ludus but 4
other html files

Documentation in Game.html

whileKeyPressed:do:
While the key given by the first argument is pressed, it evaluates the
block given by the second argument.


MyGame >> step
    self whileKeyPressed: Key upArrow do: [ superheroe moveCentreBy: (0 @ -1) ].



The code:

whileKeyPressed: aKeyCode do: aBlock
        ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at: aKeyCode
] ) ifTrue: aBlock

What is this last line supposed to do? Key code is 37. I open the
Sokoban game and only press 'UpArrow' once and the debugger comes up.

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:
> Oh! And take a look at the documentation! I spent a long while writing the
> docs for Ludus, so you may find a way to connect the missing dots by
> reading how things should work.
>
> You can access it by pointing to ludus.html
>
> Cheers,
> Bernat.
>
>
> 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
> <[hidden email]>:
>
>> Yeah that's correct.
>>
>> In many game frameworks you use an array to store the state of keys,
>> instead of doing polling or interruptions. When the key is pressed, you
>> reflect it in the array.
>>
>> So, this array (if I remember well) is actually a dictionary that'll
>> contain the state of a key once it's pressed.
>>
>> (you may wanna take a look at the class Key as well)
>>
>> Cheers!
>> Bernat.
>>
>>
>> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>>
>> The keys instance variable (class Game) is initialized to
>>>     keys := #().
>>>
>>> I wonder what it is supposed to contain.
>>>
>>> On 4/16/14, H. Hirzel <[hidden email]> wrote:
>>> > UpArrow key produces a walkback in
>>> >
>>> > Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>>> >
>>> > The keys array contains elements which are nil and a few elements
>>> > which are false.
>>> >
>>> > --Hannes
>>> >
>>> > On 4/16/14, [hidden email] <[hidden email]> wrote:
>>> >> Sokoban uses the keys
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>>> >> wrote:
>>> >>
>>> >>> Hi Philippe,
>>> >>>
>>> >>> You had this up and running quickly!
>>> >>>
>>> >>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> >>> > Hi Bernat,
>>> >>> >
>>> >>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa
>>> wrote:
>>> >>> >>
>>> >>> >> Hi Phil!
>>> >>> >>
>>> >>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>> >>
>>> >>> > It is a cool framework.
>>> >>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz),
>>> >>> > and
>>> >>> before
>>> >>> > that Blitz3D things.
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> >> I can take a look at it this afternoon, I haven't touched the
>>> >>> >> code
>>> in
>>> >>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>> >>
>>> >>> >> What's the official way to proceed? Should Ludus be a branch in
>>> >>> >> the
>>> >>> >> official project? Is there a new way to pack and share Amber
>>> >>> >> projects?
>>> >>> >>
>>> >>> > I've ported most of the stuff.
>>> >>> >
>>> >>> > It is here:
>>> >>> >
>>> >>> > https://github.com/philippeback/Ludus
>>> >>> >
>>> >>> > for easy reference. It is an amber init codebase with Ludus assets
>>> and
>>> >>> code
>>> >>> >
>>> >>> > copied and the code fixed as much as I could.
>>> >>> >
>>> >>> > Just clone it and open the game.html file. All is in there.
>>> >>> >
>>> >>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> >>> > mouse.
>>> >>>
>>> >>> Key commands for Sokoban? Or should it work with the mouse?
>>> >>>
>>> >>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> >>> > canvas
>>> >>> > event binding.
>>> >>> > Sound works as well. I learned a ton from your code. It is nice to
>>> >>> > read.
>>> >>>
>>> >>> Yes. And an astonishing low number of classes.
>>> >>>
>>> >>> --Hannes
>>> >>>
>>> >>> > Let's make it working nicely again.
>>> >>> >
>>> >>> >
>>> >>> >> Sorry, been away for far too long...
>>> >>> >>
>>> >>> > Bernat.
>>> >>> >>
>>> >>> >> p.s. I'm studying a specialization in videogame programming, and
>>> >>> >> I
>>> >>> >> was
>>> >>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >>> >> final
>>> >>> >> project.
>>> >>> >>
>>> >>> >
>>> >>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind
>>> of
>>> >>> > things, there is interesting stuff to do.
>>> >>> >
>>> >>> > Phil
>>> >>> >
>>> >>> >
>>> >>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >>> >> [hidden email] <javascript:>> wrote:
>>> >>> >>
>>> >>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> >>> <[hidden email]<javascript:>
>>> >>> >>> > wrote:
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>
>>> >>> >>>> [hidden email] <javascript:> wrote:
>>> >>> >>>>
>>> >>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>> >>>>> <[hidden email]<javascript:>
>>> >>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>> >>>>>
>>> >>> >>>>> But I've a harder time with this one that I transformed into a
>>> >>> method:
>>> >>> >>>>>
>>> >>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName
>>> getProperty:
>>> >>> >>>>> aPropertyName
>>> >>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>> >>>>>
>>> >>> >>>>> I do get a
>>> >>> >>>>>
>>> >>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>> >>>>>
>>> >>> >>>>> The basic question is: how do I pass parameters? When the call
>>> was
>>> >>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these
>>> are
>>> >>> >>>>> passed as Strings...
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> Well, I don't know what are you talking about (parsing as
>>> string),
>>> >>> >>>> but
>>> >>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>> >>>>
>>> >>> >>>> Why not doing it in Smalltalk?
>>> >>> >>>>
>>> >>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>> Yes, this is better indeed. I'll use that.
>>> >>> >>>
>>> >>> >>> I was busy porting Ludus, where there are a couple of things
>>> >>> >>> like
>>> >>> >>> that
>>> >>> >>> and Clément told me that JavaScript now had to be in its own
>>> method
>>> >>> >>> and
>>> >>> >>> not
>>> >>> >>> inline anymore.
>>> >>> >>>
>>> >>> >>>
>>> >>> >>> Question still holds tough.
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>  Help :-)
>>> >>> >>>>>
>>> >>> >>>>> Phil
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>> >>>> also
>>> >>> no
>>> >>> >>>>
>>> >>> >>>> need to have two additional methods.
>>> >>> >>>>
>>> >>> >>>> --
>>> >>> >>>> 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] <javascript:>.
>>> >>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>>  --
>>> >>> >>> 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] <javascript:>.
>>> >>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>
>>> >>> >>
>>> >>> >
>>> >>> > --
>>> >>> > 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/d/optout.
>>> >>> >
>>> >>>
>>> >>> --
>>> >>> 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/d/optout.
>>> >>>
>>> >>
>>> >> --
>>> >> 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/d/optout.
>>> >>
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>>
>
>
>
> --
> 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/d/optout.
>

--
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/d/optout.



--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Bernat Romagosa
Oh, and ludus.html is in the original repo, you can get it here:



2014-04-16 18:45 GMT+02:00 Bernat Romagosa <[hidden email]>:
I really should take a deeper look at my old code, but the idea is:

((keys at: aKeyCode ifAbsent: [ false ]) and: [ keys at: aKeyCode ]) ifTrue: aBlock

If the keys dictionary doesn't have an entry for this key in it, evaluate to false. Otherwise evaluate to its value. Then, if the previous evaluated to true, execute aBlock.

Without having looked at it, I'm guessing the error may come from keys not being a Dictionary. Back in the day, Amber had a unique way to create dictionaries on the fly, but I think it's not there anymore, am I right?


2014-04-16 18:39 GMT+02:00 H. Hirzel <[hidden email]>:

Yes I found the documentation and it quite comprehensive. However it
does not talk about instance variables and the general design. Mainly
method comments.

There is no ludus.html in https://github.com/philippeback/Ludus but 4
other html files

Documentation in Game.html

whileKeyPressed:do:
While the key given by the first argument is pressed, it evaluates the
block given by the second argument.


MyGame >> step
    self whileKeyPressed: Key upArrow do: [ superheroe moveCentreBy: (0 @ -1) ].



The code:

whileKeyPressed: aKeyCode do: aBlock
        ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at: aKeyCode
] ) ifTrue: aBlock

What is this last line supposed to do? Key code is 37. I open the
Sokoban game and only press 'UpArrow' once and the debugger comes up.

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:
> Oh! And take a look at the documentation! I spent a long while writing the
> docs for Ludus, so you may find a way to connect the missing dots by
> reading how things should work.
>
> You can access it by pointing to ludus.html
>
> Cheers,
> Bernat.
>
>
> 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
> <[hidden email]>:
>
>> Yeah that's correct.
>>
>> In many game frameworks you use an array to store the state of keys,
>> instead of doing polling or interruptions. When the key is pressed, you
>> reflect it in the array.
>>
>> So, this array (if I remember well) is actually a dictionary that'll
>> contain the state of a key once it's pressed.
>>
>> (you may wanna take a look at the class Key as well)
>>
>> Cheers!
>> Bernat.
>>
>>
>> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>>
>> The keys instance variable (class Game) is initialized to
>>>     keys := #().
>>>
>>> I wonder what it is supposed to contain.
>>>
>>> On 4/16/14, H. Hirzel <[hidden email]> wrote:
>>> > UpArrow key produces a walkback in
>>> >
>>> > Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>>> >
>>> > The keys array contains elements which are nil and a few elements
>>> > which are false.
>>> >
>>> > --Hannes
>>> >
>>> > On 4/16/14, [hidden email] <[hidden email]> wrote:
>>> >> Sokoban uses the keys
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>>> >> wrote:
>>> >>
>>> >>> Hi Philippe,
>>> >>>
>>> >>> You had this up and running quickly!
>>> >>>
>>> >>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> >>> > Hi Bernat,
>>> >>> >
>>> >>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa
>>> wrote:
>>> >>> >>
>>> >>> >> Hi Phil!
>>> >>> >>
>>> >>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>> >>
>>> >>> > It is a cool framework.
>>> >>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz),
>>> >>> > and
>>> >>> before
>>> >>> > that Blitz3D things.
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> >> I can take a look at it this afternoon, I haven't touched the
>>> >>> >> code
>>> in
>>> >>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>> >>
>>> >>> >> What's the official way to proceed? Should Ludus be a branch in
>>> >>> >> the
>>> >>> >> official project? Is there a new way to pack and share Amber
>>> >>> >> projects?
>>> >>> >>
>>> >>> > I've ported most of the stuff.
>>> >>> >
>>> >>> > It is here:
>>> >>> >
>>> >>> > https://github.com/philippeback/Ludus
>>> >>> >
>>> >>> > for easy reference. It is an amber init codebase with Ludus assets
>>> and
>>> >>> code
>>> >>> >
>>> >>> > copied and the code fixed as much as I could.
>>> >>> >
>>> >>> > Just clone it and open the game.html file. All is in there.
>>> >>> >
>>> >>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> >>> > mouse.
>>> >>>
>>> >>> Key commands for Sokoban? Or should it work with the mouse?
>>> >>>
>>> >>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> >>> > canvas
>>> >>> > event binding.
>>> >>> > Sound works as well. I learned a ton from your code. It is nice to
>>> >>> > read.
>>> >>>
>>> >>> Yes. And an astonishing low number of classes.
>>> >>>
>>> >>> --Hannes
>>> >>>
>>> >>> > Let's make it working nicely again.
>>> >>> >
>>> >>> >
>>> >>> >> Sorry, been away for far too long...
>>> >>> >>
>>> >>> > Bernat.
>>> >>> >>
>>> >>> >> p.s. I'm studying a specialization in videogame programming, and
>>> >>> >> I
>>> >>> >> was
>>> >>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >>> >> final
>>> >>> >> project.
>>> >>> >>
>>> >>> >
>>> >>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind
>>> of
>>> >>> > things, there is interesting stuff to do.
>>> >>> >
>>> >>> > Phil
>>> >>> >
>>> >>> >
>>> >>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >>> >> [hidden email] <javascript:>> wrote:
>>> >>> >>
>>> >>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> >>> <[hidden email]<javascript:>
>>> >>> >>> > wrote:
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>
>>> >>> >>>> [hidden email] <javascript:> wrote:
>>> >>> >>>>
>>> >>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>> >>>>> <[hidden email]<javascript:>
>>> >>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>> >>>>>
>>> >>> >>>>> But I've a harder time with this one that I transformed into a
>>> >>> method:
>>> >>> >>>>>
>>> >>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName
>>> getProperty:
>>> >>> >>>>> aPropertyName
>>> >>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>> >>>>>
>>> >>> >>>>> I do get a
>>> >>> >>>>>
>>> >>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>> >>>>>
>>> >>> >>>>> The basic question is: how do I pass parameters? When the call
>>> was
>>> >>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these
>>> are
>>> >>> >>>>> passed as Strings...
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> Well, I don't know what are you talking about (parsing as
>>> string),
>>> >>> >>>> but
>>> >>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>> >>>>
>>> >>> >>>> Why not doing it in Smalltalk?
>>> >>> >>>>
>>> >>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>> Yes, this is better indeed. I'll use that.
>>> >>> >>>
>>> >>> >>> I was busy porting Ludus, where there are a couple of things
>>> >>> >>> like
>>> >>> >>> that
>>> >>> >>> and Clément told me that JavaScript now had to be in its own
>>> method
>>> >>> >>> and
>>> >>> >>> not
>>> >>> >>> inline anymore.
>>> >>> >>>
>>> >>> >>>
>>> >>> >>> Question still holds tough.
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>  Help :-)
>>> >>> >>>>>
>>> >>> >>>>> Phil
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>> >>>> also
>>> >>> no
>>> >>> >>>>
>>> >>> >>>> need to have two additional methods.
>>> >>> >>>>
>>> >>> >>>> --
>>> >>> >>>> 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] <javascript:>.
>>> >>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>>  --
>>> >>> >>> 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] <javascript:>.
>>> >>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>
>>> >>> >>
>>> >>> >
>>> >>> > --
>>> >>> > 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/d/optout.
>>> >>> >
>>> >>>
>>> >>> --
>>> >>> 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/d/optout.
>>> >>>
>>> >>
>>> >> --
>>> >> 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/d/optout.
>>> >>
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>>
>
>
>
> --
> 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/d/optout.
>

--
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/d/optout.



--
Bernat Romagosa.



--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

philippeback

Take the latest version from my repo. I fixed things with Sebastian.

Le 16 avr. 2014 18:46, "Bernat Romagosa" <[hidden email]> a écrit :
Oh, and ludus.html is in the original repo, you can get it here:



2014-04-16 18:45 GMT+02:00 Bernat Romagosa <[hidden email]>:
I really should take a deeper look at my old code, but the idea is:

((keys at: aKeyCode ifAbsent: [ false ]) and: [ keys at: aKeyCode ]) ifTrue: aBlock

If the keys dictionary doesn't have an entry for this key in it, evaluate to false. Otherwise evaluate to its value. Then, if the previous evaluated to true, execute aBlock.

Without having looked at it, I'm guessing the error may come from keys not being a Dictionary. Back in the day, Amber had a unique way to create dictionaries on the fly, but I think it's not there anymore, am I right?


2014-04-16 18:39 GMT+02:00 H. Hirzel <[hidden email]>:

Yes I found the documentation and it quite comprehensive. However it
does not talk about instance variables and the general design. Mainly
method comments.

There is no ludus.html in https://github.com/philippeback/Ludus but 4
other html files

Documentation in Game.html

whileKeyPressed:do:
While the key given by the first argument is pressed, it evaluates the
block given by the second argument.


MyGame >> step
    self whileKeyPressed: Key upArrow do: [ superheroe moveCentreBy: (0 @ -1) ].



The code:

whileKeyPressed: aKeyCode do: aBlock
        ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at: aKeyCode
] ) ifTrue: aBlock

What is this last line supposed to do? Key code is 37. I open the
Sokoban game and only press 'UpArrow' once and the debugger comes up.

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:
> Oh! And take a look at the documentation! I spent a long while writing the
> docs for Ludus, so you may find a way to connect the missing dots by
> reading how things should work.
>
> You can access it by pointing to ludus.html
>
> Cheers,
> Bernat.
>
>
> 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
> <[hidden email]>:
>
>> Yeah that's correct.
>>
>> In many game frameworks you use an array to store the state of keys,
>> instead of doing polling or interruptions. When the key is pressed, you
>> reflect it in the array.
>>
>> So, this array (if I remember well) is actually a dictionary that'll
>> contain the state of a key once it's pressed.
>>
>> (you may wanna take a look at the class Key as well)
>>
>> Cheers!
>> Bernat.
>>
>>
>> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>>
>> The keys instance variable (class Game) is initialized to
>>>     keys := #().
>>>
>>> I wonder what it is supposed to contain.
>>>
>>> On 4/16/14, H. Hirzel <[hidden email]> wrote:
>>> > UpArrow key produces a walkback in
>>> >
>>> > Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>>> >
>>> > The keys array contains elements which are nil and a few elements
>>> > which are false.
>>> >
>>> > --Hannes
>>> >
>>> > On 4/16/14, [hidden email] <[hidden email]> wrote:
>>> >> Sokoban uses the keys
>>> >>
>>> >>
>>> >>
>>> >> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <[hidden email]>
>>> >> wrote:
>>> >>
>>> >>> Hi Philippe,
>>> >>>
>>> >>> You had this up and running quickly!
>>> >>>
>>> >>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>>> >>> > Hi Bernat,
>>> >>> >
>>> >>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa
>>> wrote:
>>> >>> >>
>>> >>> >> Hi Phil!
>>> >>> >>
>>> >>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>>> >>> >>
>>> >>> > It is a cool framework.
>>> >>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz),
>>> >>> > and
>>> >>> before
>>> >>> > that Blitz3D things.
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> >> I can take a look at it this afternoon, I haven't touched the
>>> >>> >> code
>>> in
>>> >>> >> about 3 years, but it shouldn't be too much work porting it.
>>> >>> >>
>>> >>> >> What's the official way to proceed? Should Ludus be a branch in
>>> >>> >> the
>>> >>> >> official project? Is there a new way to pack and share Amber
>>> >>> >> projects?
>>> >>> >>
>>> >>> > I've ported most of the stuff.
>>> >>> >
>>> >>> > It is here:
>>> >>> >
>>> >>> > https://github.com/philippeback/Ludus
>>> >>> >
>>> >>> > for easy reference. It is an amber init codebase with Ludus assets
>>> and
>>> >>> code
>>> >>> >
>>> >>> > copied and the code fixed as much as I could.
>>> >>> >
>>> >>> > Just clone it and open the game.html file. All is in there.
>>> >>> >
>>> >>> > Now, sokoban and pong kind of run, as the sokoban editor with the
>>> >>> > mouse.
>>> >>>
>>> >>> Key commands for Sokoban? Or should it work with the mouse?
>>> >>>
>>> >>> > Simplepacman and Simplecave have issues, mostly with keypresses or
>>> >>> > canvas
>>> >>> > event binding.
>>> >>> > Sound works as well. I learned a ton from your code. It is nice to
>>> >>> > read.
>>> >>>
>>> >>> Yes. And an astonishing low number of classes.
>>> >>>
>>> >>> --Hannes
>>> >>>
>>> >>> > Let's make it working nicely again.
>>> >>> >
>>> >>> >
>>> >>> >> Sorry, been away for far too long...
>>> >>> >>
>>> >>> > Bernat.
>>> >>> >>
>>> >>> >> p.s. I'm studying a specialization in videogame programming, and
>>> >>> >> I
>>> >>> >> was
>>> >>> >> considering resurrecting Ludus and making it mobile-friendly as a
>>> >>> >> final
>>> >>> >> project.
>>> >>> >>
>>> >>> >
>>> >>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap kind
>>> of
>>> >>> > things, there is interesting stuff to do.
>>> >>> >
>>> >>> > Phil
>>> >>> >
>>> >>> >
>>> >>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>>> >>> >> [hidden email] <javascript:>> wrote:
>>> >>> >>
>>> >>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>>> >>> >>> <[hidden email]<javascript:>
>>> >>> >>> > wrote:
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>
>>> >>> >>>> [hidden email] <javascript:> wrote:
>>> >>> >>>>
>>> >>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>>> >>> >>>>> <[hidden email]<javascript:>
>>> >>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>>> >>> >>>>>
>>> >>> >>>>> But I've a harder time with this one that I transformed into a
>>> >>> method:
>>> >>> >>>>>
>>> >>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName
>>> getProperty:
>>> >>> >>>>> aPropertyName
>>> >>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>>> >>> >>>>>
>>> >>> >>>>> I do get a
>>> >>> >>>>>
>>> >>> >>>>> JavaScript exception: TypeError: $(...).data(...) is undefined
>>> >>> >>>>>
>>> >>> >>>>> The basic question is: how do I pass parameters? When the call
>>> was
>>> >>> >>>>> inline, I guess that the 'XXX' were Javascript. But now, these
>>> are
>>> >>> >>>>> passed as Strings...
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> Well, I don't know what are you talking about (parsing as
>>> string),
>>> >>> >>>> but
>>> >>> >>>> why are you taking all JS snippets and put them into methods?
>>> >>> >>>>
>>> >>> >>>> Why not doing it in Smalltalk?
>>> >>> >>>>
>>> >>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>> Yes, this is better indeed. I'll use that.
>>> >>> >>>
>>> >>> >>> I was busy porting Ludus, where there are a couple of things
>>> >>> >>> like
>>> >>> >>> that
>>> >>> >>> and Clément told me that JavaScript now had to be in its own
>>> method
>>> >>> >>> and
>>> >>> >>> not
>>> >>> >>> inline anymore.
>>> >>> >>>
>>> >>> >>>
>>> >>> >>> Question still holds tough.
>>> >>> >>>
>>> >>> >>>>
>>> >>> >>>>  Help :-)
>>> >>> >>>>>
>>> >>> >>>>> Phil
>>> >>> >>>>>
>>> >>> >>>>
>>> >>> >>>> P.S.: See my previous email about previous issue where there is
>>> >>> >>>> also
>>> >>> no
>>> >>> >>>>
>>> >>> >>>> need to have two additional methods.
>>> >>> >>>>
>>> >>> >>>> --
>>> >>> >>>> 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] <javascript:>.
>>> >>> >>>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>>
>>> >>> >>>
>>> >>> >>>  --
>>> >>> >>> 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] <javascript:>.
>>> >>> >>> For more options, visit https://groups.google.com/d/optout.
>>> >>> >>>
>>> >>> >>
>>> >>> >
>>> >>> > --
>>> >>> > 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/d/optout.
>>> >>> >
>>> >>>
>>> >>> --
>>> >>> 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/d/optout.
>>> >>>
>>> >>
>>> >> --
>>> >> 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/d/optout.
>>> >>
>>> >
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>>
>
>
>
> --
> 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/d/optout.
>

--
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/d/optout.



--
Bernat Romagosa.



--
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/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Ludus in the current amber > compilation issue

Hannes Hirzel
In reply to this post by Bernat Romagosa
Yes, dictionary handling has improved. It now has a Dictionary class.
I thought there should be as well a HashedDictionary but I do not see
it anymore.

However as for Sokoban I think it has to do with initialization and an
unhandeled error condition.

If I press upArrow as the very first key after starting the gameI get
a debugger window.

If after starting the game I press leftArrow instead, the guy turns,
and then upArrow the guy starts walking out.

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:

> I really should take a deeper look at my old code, but the idea is:
>
> ((keys at: aKeyCode ifAbsent: [ false ]) and: [ keys at: aKeyCode
> ])ifTrue: aBlock
>
> If the keys dictionary doesn't have an entry for this key in it, evaluate
> to false. Otherwise evaluate to its value. Then, if the previous evaluated
> to true, execute aBlock.
>
> Without having looked at it, I'm guessing the error may come from keys not
> being a Dictionary. Back in the day, Amber had a unique way to create
> dictionaries on the fly, but I think it's not there anymore, am I right?
>
>
> 2014-04-16 18:39 GMT+02:00 H. Hirzel <[hidden email]>:
>
>> Yes I found the documentation and it quite comprehensive. However it
>> does not talk about instance variables and the general design. Mainly
>> method comments.
>>
>> There is no ludus.html in https://github.com/philippeback/Ludus but 4
>> other html files
>>
>> Documentation in Game.html
>>
>> whileKeyPressed:do:
>> While the key given by the first argument is pressed, it evaluates the
>> block given by the second argument.
>>
>>
>> MyGame >> step
>>     self whileKeyPressed: Key upArrow do: [ superheroe moveCentreBy: (0 @
>> -1) ].
>>
>>
>>
>> The code:
>>
>> whileKeyPressed: aKeyCode do: aBlock
>>         ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at:
>> aKeyCode
>> ] ) ifTrue: aBlock
>>
>> What is this last line supposed to do? Key code is 37. I open the
>> Sokoban game and only press 'UpArrow' once and the debugger comes up.
>>
>> --Hannes
>>
>> On 4/16/14, Bernat Romagosa <[hidden email]> wrote:
>> > Oh! And take a look at the documentation! I spent a long while writing
>> the
>> > docs for Ludus, so you may find a way to connect the missing dots by
>> > reading how things should work.
>> >
>> > You can access it by pointing to ludus.html
>> >
>> > Cheers,
>> > Bernat.
>> >
>> >
>> > 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
>> > <[hidden email]>:
>> >
>> >> Yeah that's correct.
>> >>
>> >> In many game frameworks you use an array to store the state of keys,
>> >> instead of doing polling or interruptions. When the key is pressed,
>> >> you
>> >> reflect it in the array.
>> >>
>> >> So, this array (if I remember well) is actually a dictionary that'll
>> >> contain the state of a key once it's pressed.
>> >>
>> >> (you may wanna take a look at the class Key as well)
>> >>
>> >> Cheers!
>> >> Bernat.
>> >>
>> >>
>> >> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>> >>
>> >> The keys instance variable (class Game) is initialized to
>> >>>     keys := #().
>> >>>
>> >>> I wonder what it is supposed to contain.
>> >>>
>> >>> On 4/16/14, H. Hirzel <[hidden email]> wrote:
>> >>> > UpArrow key produces a walkback in
>> >>> >
>> >>> > Sokoban(Game)>>whileKeyPressed: aKeyCode do: aBlock
>> >>> >
>> >>> > The keys array contains elements which are nil and a few elements
>> >>> > which are false.
>> >>> >
>> >>> > --Hannes
>> >>> >
>> >>> > On 4/16/14, [hidden email] <[hidden email]> wrote:
>> >>> >> Sokoban uses the keys
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> On Wed, Apr 16, 2014 at 12:39 PM, H. Hirzel <
>> [hidden email]>
>> >>> >> wrote:
>> >>> >>
>> >>> >>> Hi Philippe,
>> >>> >>>
>> >>> >>> You had this up and running quickly!
>> >>> >>>
>> >>> >>> On 4/16/14, Philippe Back <[hidden email]> wrote:
>> >>> >>> > Hi Bernat,
>> >>> >>> >
>> >>> >>> > On Wednesday, April 16, 2014 11:24:47 AM UTC+2, Bernat Romagosa
>> >>> wrote:
>> >>> >>> >>
>> >>> >>> >> Hi Phil!
>> >>> >>> >>
>> >>> >>> >> Cool to see there's still interest in Ludus! I'm flattered :)
>> >>> >>> >>
>> >>> >>> > It is a cool framework.
>> >>> >>> > I am used to Monkey from Mark Sibly (http://monkeycoder.co.nz),
>> >>> >>> > and
>> >>> >>> before
>> >>> >>> > that Blitz3D things.
>> >>> >>> >
>> >>> >>> >
>> >>> >>> >
>> >>> >>> >> I can take a look at it this afternoon, I haven't touched the
>> >>> >>> >> code
>> >>> in
>> >>> >>> >> about 3 years, but it shouldn't be too much work porting it.
>> >>> >>> >>
>> >>> >>> >> What's the official way to proceed? Should Ludus be a branch
>> >>> >>> >> in
>> >>> >>> >> the
>> >>> >>> >> official project? Is there a new way to pack and share Amber
>> >>> >>> >> projects?
>> >>> >>> >>
>> >>> >>> > I've ported most of the stuff.
>> >>> >>> >
>> >>> >>> > It is here:
>> >>> >>> >
>> >>> >>> > https://github.com/philippeback/Ludus
>> >>> >>> >
>> >>> >>> > for easy reference. It is an amber init codebase with Ludus
>> assets
>> >>> and
>> >>> >>> code
>> >>> >>> >
>> >>> >>> > copied and the code fixed as much as I could.
>> >>> >>> >
>> >>> >>> > Just clone it and open the game.html file. All is in there.
>> >>> >>> >
>> >>> >>> > Now, sokoban and pong kind of run, as the sokoban editor with
>> >>> >>> > the
>> >>> >>> > mouse.
>> >>> >>>
>> >>> >>> Key commands for Sokoban? Or should it work with the mouse?
>> >>> >>>
>> >>> >>> > Simplepacman and Simplecave have issues, mostly with keypresses
>> or
>> >>> >>> > canvas
>> >>> >>> > event binding.
>> >>> >>> > Sound works as well. I learned a ton from your code. It is nice
>> to
>> >>> >>> > read.
>> >>> >>>
>> >>> >>> Yes. And an astonishing low number of classes.
>> >>> >>>
>> >>> >>> --Hannes
>> >>> >>>
>> >>> >>> > Let's make it working nicely again.
>> >>> >>> >
>> >>> >>> >
>> >>> >>> >> Sorry, been away for far too long...
>> >>> >>> >>
>> >>> >>> > Bernat.
>> >>> >>> >>
>> >>> >>> >> p.s. I'm studying a specialization in videogame programming,
>> >>> >>> >> and
>> >>> >>> >> I
>> >>> >>> >> was
>> >>> >>> >> considering resurrecting Ludus and making it mobile-friendly
>> >>> >>> >> as
>> a
>> >>> >>> >> final
>> >>> >>> >> project.
>> >>> >>> >>
>> >>> >>> >
>> >>> >>> > Ubercool. Especially with the  https://trigger.io/ | PhoneGap
>> kind
>> >>> of
>> >>> >>> > things, there is interesting stuff to do.
>> >>> >>> >
>> >>> >>> > Phil
>> >>> >>> >
>> >>> >>> >
>> >>> >>> > On Apr 16, 2014 11:09 AM, "[hidden email] <javascript:>" <
>> >>> >>> >> [hidden email] <javascript:>> wrote:
>> >>> >>> >>
>> >>> >>> >>> On Wed, Apr 16, 2014 at 11:00 AM, Herby Vojčík
>> >>> >>> >>> <[hidden email]<javascript:>
>> >>> >>> >>> > wrote:
>> >>> >>> >>>
>> >>> >>> >>>>
>> >>> >>> >>>>
>> >>> >>> >>>> [hidden email] <javascript:> wrote:
>> >>> >>> >>>>
>> >>> >>> >>>>> On Wed, Apr 16, 2014 at 12:56 AM, Clément Bera
>> >>> >>> >>>>> <[hidden email]<javascript:>
>> >>> >>> >>>>> <mailto:[hidden email] <javascript:>>> wrote:
>> >>> >>> >>>>>
>> >>> >>> >>>>> But I've a harder time with this one that I transformed
>> >>> >>> >>>>> into
>> a
>> >>> >>> method:
>> >>> >>> >>>>>
>> >>> >>> >>>>>  >>forElement: anElement ofDataEntry: aDataEntryName
>> >>> getProperty:
>> >>> >>> >>>>> aPropertyName
>> >>> >>> >>>>> <return $(anElement).data(aDataEntryName)[aPropertyName];>
>> >>> >>> >>>>>
>> >>> >>> >>>>> I do get a
>> >>> >>> >>>>>
>> >>> >>> >>>>> JavaScript exception: TypeError: $(...).data(...) is
>> undefined
>> >>> >>> >>>>>
>> >>> >>> >>>>> The basic question is: how do I pass parameters? When the
>> call
>> >>> was
>> >>> >>> >>>>> inline, I guess that the 'XXX' were Javascript. But now,
>> these
>> >>> are
>> >>> >>> >>>>> passed as Strings...
>> >>> >>> >>>>>
>> >>> >>> >>>>
>> >>> >>> >>>> Well, I don't know what are you talking about (parsing as
>> >>> string),
>> >>> >>> >>>> but
>> >>> >>> >>>> why are you taking all JS snippets and put them into
>> >>> >>> >>>> methods?
>> >>> >>> >>>>
>> >>> >>> >>>> Why not doing it in Smalltalk?
>> >>> >>> >>>>
>> >>> >>> >>>> (anELement asJQuery data: aDataEntryName) at: aPropertyName
>> >>> >>> >>>>
>> >>> >>> >>>
>> >>> >>> >>> Yes, this is better indeed. I'll use that.
>> >>> >>> >>>
>> >>> >>> >>> I was busy porting Ludus, where there are a couple of things
>> >>> >>> >>> like
>> >>> >>> >>> that
>> >>> >>> >>> and Clément told me that JavaScript now had to be in its own
>> >>> method
>> >>> >>> >>> and
>> >>> >>> >>> not
>> >>> >>> >>> inline anymore.
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>> Question still holds tough.
>> >>> >>> >>>
>> >>> >>> >>>>
>> >>> >>> >>>>  Help :-)
>> >>> >>> >>>>>
>> >>> >>> >>>>> Phil
>> >>> >>> >>>>>
>> >>> >>> >>>>
>> >>> >>> >>>> P.S.: See my previous email about previous issue where there
>> is
>> >>> >>> >>>> also
>> >>> >>> no
>> >>> >>> >>>>
>> >>> >>> >>>> need to have two additional methods.
>> >>> >>> >>>>
>> >>> >>> >>>> --
>> >>> >>> >>>> 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] <javascript:>.
>> >>> >>> >>>> For more options, visit https://groups.google.com/d/optout.
>> >>> >>> >>>>
>> >>> >>> >>>
>> >>> >>> >>>  --
>> >>> >>> >>> 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] <javascript:>.
>> >>> >>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>> >>> >>>
>> >>> >>> >>
>> >>> >>> >
>> >>> >>> > --
>> >>> >>> > 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/d/optout.
>> >>> >>> >
>> >>> >>>
>> >>> >>> --
>> >>> >>> 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/d/optout.
>> >>> >>>
>> >>> >>
>> >>> >> --
>> >>> >> 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/d/optout.
>> >>> >>
>> >>> >
>> >>>
>> >>> --
>> >>> 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/d/optout.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Bernat Romagosa.
>> >>
>> >
>> >
>> >
>> > --
>> > 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/d/optout.
>> >
>>
>> --
>> 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/d/optout.
>>
>
>
>
> --
> 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/d/optout.
>

--
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/d/optout.
123