Saturday, November 10, 2007

MtgLife returns

Main GUI

Finally I rescued from backups the code of the MgtLife, a Python application I developed a year or two ago for Symbian. The main purpose of this application is to keep updated the life points of the two opponents of a Magic The Gathering match. This is what I call a freak combo, Magic + CellPhone + PyS60.
Main Features

  • Show opponents life points
  • Use pad keys to easily add or remove life points:
    1. Left and Right keys change the opponent selected
    2. Up and Down keys are used to add positive or negative life points
    3. Center key to apply the positive or negative life points to the selected opponent
  • Use the menu key to choose take a photo of the opponent. This photo will be displayed over the life points counter

  • Use the menu key to choose Set Team Name to enter the name of the selected opponent. This name will be displayed over the life points counter
About the code

This program is probably more interesting from the point of view of a pys60 programmer. Although it lacks lots of comments, it shows how to deal with:

  • Back buffer management to avoid flickering when updating the GUI
  • How to manage a list of images
  • How to avoid the back light to switch off
  • How to use the camara input and place it in your GUI
  • How to implement all these using OOP, may be this HowTo not too sucessfully
Installation Process
For those who own a Nokia 6600 or similar and doesn't have python installed I made a mtglife.sis package (Be careful with this, just use it on a Nokia 6600 without python installed). People with a different Nokia cellphone follow next terribly weird steps:
  1. Download and install python for your symbian. Check this links: Nokia Forum and pys60 open source project
  2. Download and install miso python library (Nice library to do several hacks like avoid the backlight to turn off). Check miso homepage or just download miso.sis
  3. Download mgtLife code. You should unzip this on the phone unit where you have python installed (Phone memory or MemCard). If you have python installed in your phone memory card, the process will be as easy as reading that mem card on a PC and unziping the directly on it.
  4. To execute the mgtLife, go an execute python console on your cellular, then select run script, and you will find in an entry to my/ Extremely awful I know.

Thanks to
Thanks to Marcos Martinez who made the GUI designs.

No comments:

Post a Comment