[Jprogramming] New 2048 game addon released

Raul Miller rauldmiller at gmail.com
Tue Jun 21 23:04:20 UTC 2016


I saw that you were struggling with getting the (relatively) raw key
events, shortly after sending that message. I remember having similar
frustrations when I've attempted such things in the past.

Another possibility, though, might be to use some other set of keys.
Modern computer games tend to favor WASD for directional movement.
Older rouge-likes (and vi) use HJKL in the same fashion. Implementing
either of those and providing a caption hint might be a way to go.

Thanks,

-- 
Raul


On Tue, Jun 21, 2016 at 5:18 PM, Ric Sherlock <tikkanz at gmail.com> wrote:
> Thanks Raul,
> You're right about the merging behaviour. I think I must have mis-read the
> spec on Rosetta code. I've fixed it there and on Github now. Will be fixed
> in the next release.
>
> Using arrow keys would be nice - I'm investigating to see if I can make
> that happen.
>
> Cheers,
>
> On Wed, Jun 22, 2016 at 7:47 AM, Raul Miller <rauldmiller at gmail.com> wrote:
>
>> I tried this, and I noticed some differences from the implementation
>> at https://gabrielecirulli.github.io/2048/
>>
>> Probably the most significant is that in the original if you have:
>>
>> 2
>> 2
>> 2
>>
>> And you select the "up" direction, the result is:
>>
>> 4
>> 2
>>
>> Where currently your J implementation gives:
>>
>> 2
>> 4
>>
>> There are other differences, of course (J does not yet support the
>> arrow keys, for example).
>>
>> The fix looks straightforward.
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>> On Tue, Jun 21, 2016 at 3:54 AM, Ric Sherlock <tikkanz at gmail.com> wrote:
>> > I've added a Wd-based UI to the Rosetta code task 2048 engine
>> > <http://rosettacode.org/wiki/2048#J> and released it as an addon.
>> >
>> > Install via the Package Manager
>> > Run using:
>> >    load 'games/2048'
>> >
>> > or load the desired UI directly
>> >    load 'games/2048/ui_wd'
>> >    load 'games/2048/ui_console'
>> >
>> > Enjoy!
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


More information about the Programming mailing list