PDA

View Full Version : Rhymes with Shmetris



Patros
2007-09-24, 12:00
Here's a Tetris plug-in I kludged together. The framework is based on the snake game found on this forum.

It will crash if you lose, so consider yourself warned ;)

Keys:

Up - rotate (clockwise only)
Left - move left
Right - move right

Anyone who feels like adding more features like rotate ccw, preview next piece, levels, etc, feel free. I might do more with it if I get the time.

dean
2007-09-24, 15:45
Nice!

To make it usable on the device, can I suggest a different key map:

- move left: ADD
- move right: PLAY
- rotate: scroll wheel
- drop: center button

Patros
2007-09-25, 11:34
Changed the keys, so it should work on the hardware now. Also cleaned things up a bit.


Move Left : LEFT or ADD
Move Right: RIGHT or PLAY
Rotate(CW): UP or SCROLL (left or right)

ezkcdude
2007-09-25, 11:48
So, how do we install this?

dean
2007-09-25, 12:00
And let's put the instructions up on the wiki so folks don't have to
keep answering the question...

Patros
2007-09-25, 12:42
Extract the zip to /usr/share/jive/applets/ . If you're running jive on windows, extract it to release\lua\applets

In either case make sure that it creates a sub directory and extracts the files there (don't just copy the files in the zip to the location above).

ceejay
2007-09-25, 12:58
And to get it onto the Jive beta hardware?

kdf
2007-09-25, 13:05
On Jive hardware:
Settings->Remote Settings->Advanced->Remote Login
Enable and make note of the password and IP addy. If it is already enabled, I hope you remember the password or you'll have to disable and re-enable.

unzip shmetris with folders structure
from a unix command line:
scp -r Tetris root@<jiveIP>:/usr/share/jive/applets

you will then be asked for the password, give the one shown on the jive hardware.

If all you have is windows...see if you can google an scp equivalent for scp.

-kdf

pfarrell
2007-09-25, 13:12
kdf wrote:
> If all you have is windows...see if you can google an scp equivalent
> for scp.

Such as
http://winscp.net/eng/index.php
which is what I have my Windows folks use

Pat



--
Pat Farrell
http://www.pfarrell.com/

ceejay
2007-09-25, 14:30
Downloaded winscp - seemed to install and run ok ... enabled remote login on the jive box ... tried to connect using winscp, authenticated ok but then timed out waiting for the remote to respond.

Did this a few times in case I was misreading the lovely passwords, same each time. Any clues as to what I'm doing wrong?

Firmware 1r512

TIA
Ceejay

kdf
2007-09-25, 17:02
Did this a few times in case I was misreading the lovely passwords, same each time. Any clues as to what I'm doing wrong?

Firmware 1r512


First thing, always...ALWAYS update before asking. There is big activity on jive checkins and a lot is being updated along the way. Wireless/network connectivity is an ongoing task.

Things to make sure jive is working and actively connect:
browse a bit, forcing slimserver query/response.
ping jive until you get a steady response.
make sure jive is reporting good signal quality.
check settings->remote nettings->wireless networks and make sure there is an ip there (something this will kickstart a flakey/stalled wireless connection)

All are based on my experience only, so won't guarantee success and certainly doesn't represent an exhaustive list of ideas :)

-kdf

erland
2007-09-25, 19:59
On Jive hardware:
Settings->Remote Settings->Advanced->Remote Login
Enable and make note of the password and IP addy. If it is already enabled, I hope you remember the password or you'll have to disable and re-enable.

unzip shmetris with folders structure
from a unix command line:
scp -r Tetris root@<jiveIP>:/usr/share/jive/applets

you will then be asked for the password, give the one shown on the jive hardware.

Is this the way third party applets will be installed also when the Jive remote is released, or is there some plan to make it easier for end users to install third party applets ?

I'm thinking of applets for third party plugins to SlimServer.

Will the third party applets installed the above way survive a firmware update of the remote or do I need to reinstall the applets again after I have updated the Jive firmware ?

pfarrell
2007-09-25, 20:03
erland wrote:
> Is this the way third party applets will be installed also when the
> Jive remote is released, or is there some plan to make it easier for
> end users to install third party applets ?

Nope, you'll have to hand enter the hex of passwords.

Sigh. its a beta of hardware that may never be released.
Of course it will get better. And be transparent, or at least
translucent for naive users.

Jive is all about user friendly access.

kdf
2007-09-25, 20:07
On 25-Sep-07, at 7:59 PM, erland wrote:

>
> Will the third party applets installed the above way survive a
> firmware
> update of the remote

the file system is currently left intact.
-k

erland
2007-09-25, 20:15
erland wrote:
> Is this the way third party applets will be installed also when the
> Jive remote is released, or is there some plan to make it easier for
> end users to install third party applets ?

Nope, you'll have to hand enter the hex of passwords.

Sigh. its a beta of hardware that may never be released.
Of course it will get better. And be transparent, or at least
translucent for naive users.

Jive is all about user friendly access.

I think it would be great if there was some way for plugins in SlimServer to offer a Jive applet. This way the Jive remote could ask SlimServer if there are any applets available for the installed plugins and automatically download them if there are any, pretty much in the same way as the Jive firmware is downloaded now.

This way the end user only have to bother with installing the plugin in SlimServer.

kdf
2007-09-25, 20:37
On 25-Sep-07, at 8:15 PM, erland wrote:

>
> I think it would be great if there was some way for plugins in
> SlimServer to offer a Jive applet. This way the Jive remote could ask
> SlimServer if there are any applets available for the installed
> plugins
> and automatically download them if there are any, pretty much in the
> same way as the Jive firmware is downloaded now.
>
certainly possible, within limits. SS already provides content for
Jive via the Jive Plugin.
Other plugins can do the same but still need an applet on the Jive
side that handles that content.
Someday (tm) there may be a selection of extensible applets.

for downloads, the jive binary archive is automatically downloaded
each day. jive then sees this and offers to update.

Think early days: Slimp3 and the Slimp3 server. It's a very long
list of changes from A to B.
-kdf

dean
2007-09-25, 20:44
On Sep 25, 2007, at 8:15 PM, erland wrote:
> I think it would be great if there was some way for plugins in
> SlimServer to offer a Jive applet. This way the Jive remote could ask
> SlimServer if there are any applets available for the installed
> plugins
> and automatically download them if there are any, pretty much in the
> same way as the Jive firmware is downloaded now.
>
> This way the end user only have to bother with installing the
> plugin in
> SlimServer.

I think that this is a great idea. One package that can add
functionality to Jive (hardware or software) or SlimServer. And a
manager that makes it easy to install. Let's talk about how we get
there in the Developer forum.

erland
2007-09-25, 22:12
On Sep 25, 2007, at 8:15 PM, erland wrote:
> I think it would be great if there was some way for plugins in
> SlimServer to offer a Jive applet. This way the Jive remote could ask
> SlimServer if there are any applets available for the installed
> plugins
> and automatically download them if there are any, pretty much in the
> same way as the Jive firmware is downloaded now.
>
> This way the end user only have to bother with installing the
> plugin in
> SlimServer.

I think that this is a great idea. One package that can add
functionality to Jive (hardware or software) or SlimServer. And a
manager that makes it easy to install. Let's talk about how we get
there in the Developer forum.

I've started a thread in the Developer forum regarding this:
http://forums.slimdevices.com/showthread.php?p=229957

Patrick Dixon
2007-09-26, 00:54
Downloaded winscp - seemed to install and run ok ... enabled remote login on the jive box ... tried to connect using winscp, authenticated ok but then timed out waiting for the remote to respond.

Did this a few times in case I was misreading the lovely passwords, same each time. Any clues as to what I'm doing wrong?

Firmware 1r512

TIA
Ceejay
I couldn't get winscp to talk to the jive hw either. The jive hw doesn't seem to support 'ls' - I don't know if this is the problem?

sbjaerum
2007-09-26, 01:01
I couldn't get winscp to talk to the jive hw either. The jive hw doesn't seem to support 'ls' - I don't know if this is the problem?

I have successfully used pscp downloaded from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Patros
2007-09-26, 11:06
Got a little bored. Added increasing speed with levels, fixed the crash on losing. Has anyone got it running on the hardware?

kdf
2007-09-26, 11:25
I've used it on the hardware from version 1. The crash would require a hard power off and restart (or at least a restart of /usr/bin/jive from ssh).

It plays a touch fast on the hardware, I think :)

A minor issue, I think it should use "Games" as the menu name, rather than "GAMES". The other game demos posted use "Games" so it keeps them grouped. The menu is case sensitive and isn't yet localised (in which case "GAMES" would be good as the string token)

-kdf

ceejay
2007-09-26, 14:39
Well, I still can't get to copy the files to the remote. Remote now at firmware 1r578. Have tried both winscp and pscp as referenced earlier in this thread. Both look like they are making contact with the box but can't get copy to work. pscp reports:

/usr/libexec/sftp-server: not found
unable to initialise SFTP: could not connect

Otherwise the remote seems to be working fine - I can browse, etc, also ping it from a command prompt.

Any more ideas?

Ceejay

kdf
2007-09-26, 15:18
You want SCP protocol, not SFTP. Check the config options.
-kdf

ceejay
2007-09-26, 16:42
Ah! Thanks! for anyone following this, the exact pscp command was:

pscp -scp -r Tetris root@192.168.xxx.xxx:/usr/share/jive/applets

And it works!

BTW - it would be SOOO much better if the centre button was "drop" - at the moment it seems to be "repeat last command".

While I was at it I also tried winscp again. This time remembering to set the protocol to SCP, it did work (though it gave some error messages on the way in, they obviously weren't fatal...)

Command 'groups'
failed with return code 127 and error message

Command 'pwd'
failed with return code 0 and error message
-sh: groups: not found.

Thanks
Ceejay

Patros
2007-09-28, 11:07
Added the centre button as improved drop, and changed the folder to 'Games' instead of 'GAMES'