Archive for April, 2008

AnimaLogic: S60 Web Runtime game

Wednesday, April 16th, 2008

I’ve got some fun with my friend Fabio in creating a first game for Nokia Web Runtime.

Since Web Runtime allows building mobile applications with classic web technologies, we’ve used nothing more that html, css and plain-old-good javascript… isn’t it great? :D

Animalogic Web Runtime game

It’s a very first alpha release with not too much functionalities (local hi-scores and a single game mode), but feel free to take a try :)

The main interface was done using classical <a> elements to represent the menu options, but this has 2 important drawbacks, as you can see:

  • links (like also input fields and other focusable elements) when focused are surrounded by a thick border: not really beautiful..
  • managing of focus itself, between different screens, is not easy, so it happens that focus sometimes disappears, or starts from the last menu options, or other odd things.

Next release will try to solve those and other issues… meanwhile, we’ll be happy of any kind of feedback about it :)

Download Web Runtime AnimaLogic

Collapsible trees with J2ME

Tuesday, April 15th, 2008

Trees are not often used within j2me applications, but since it’s quite always a mess to deal with them, here’s a ready to use component for managing and drawing collapsible/scrollable trees :)
j2me collapsible trees

As usual, you can go to Forum Nokia Wiki for the full source code: J2me Collapsible Trees, or go to the emulator page to have a first look at a sample midlet using this component.

Customizing game sprites with J2ME

Monday, April 14th, 2008

You know, my great passion are games, and here’s a first game-related tutorial :)

Often in games a nice feature to give to users it the possibility to customize their own character, for example changing colors of the different parts (hairs, eyes, shirt, and so on).

To support this features there are 2 possibilities:

  • Include a different image for each color of each different part
  • Replace colors by code

The second options will save you the effort to create these multiple images, and will strip down your JAR size. Also, it will allow you to support a lot more colors.

You can see a simple midlet showing how this can be done with simple code on the emulator page

For the full source code you can visit the Forum Nokia Wiki page: J2ME Customizing Game Sprites Color

How to draw gradients with J2ME

Saturday, April 12th, 2008

Gradients are a nice graphic element to be used within your game or application. But, wouldn’t it be great if you could use all the gradients you want, without using images?

And here is the Saturday Tutorial :)

Draw gradients with J2me

The gradients shown in the screenshot above are generated by the following straightforward method:

Gradient.gradientBox(Graphics g, 
	int color1, int color2, 
	int left, int top, 
	int width, int height, 
	int orientation)

For the full source code you can see the J2me Gradient tutorial on Forum Nokia Wiki

How to build a tab menu with J2ME

Friday, April 11th, 2008

Here is a tutorial showing how to build a simple tabbed menu using J2ME, that you can try live on the emulator page

J2me tabbed menu
This first version will support:

  • Full styling of tabs (bg color, fore color, font face, margin, paddings and corner radius)
  • Automatic horizontal scrolling, so that you can put as many tab you want, without caring about screen width

There’s still a lot of room for improvements, but we’ll leave them for the next tutorial :)

You can find a detailed tutorial with source code on Form Nokia Wiki: J2ME Tabbed Menu Tutorial.

Direct links to source code:

  • TabMenu.java: main class, to include in your projects to build Tabbed Menus
  • TabMenuCanvas.java: a sample Canvas using TabMenu component, useful to understand how to use it

Building a J2ME vertical scrollable text component

Thursday, April 10th, 2008

Everyone needs scrollable text, soon or late :)

This is the reason why I’ve posted a simple tutorial on how vertical scrollable text can be implemented with J2ME.

Scrollable text screenshot

You can find it on Forum Nokia Wiki: J2me Scrollable Text tutorial

Comments are welcome!

Forum Nokia Wiki.. my first article!

Wednesday, April 9th, 2008

Forum Nokia Wiki

Yeah, I’ve finally done it!

Forum Nokia Wiki is a precious source for any kind of mobile related problems or questions, and now I’m really happy to have found the time to post my first article, that is…

How to implement custom Text Fields with J2ME!

Hope you’ll find it useful :)

EDIT: you can now test the custom Text Field component with the web emulator here.

KuneriLite: Nokia N95 advert with Microsoft Paint, cool!

Wednesday, April 9th, 2008

KuneriLite is a superb tool to build rich applications on Symbian S60 phones using FlashLite, allowing to access native phone funcionalities that would be otherwise unaccessible. I’m currently developing some apps with it, and I’ll post more on this later.

By now, just take a look at how cool is this advert made by KuneriLite team, using Microsoft Paint.. I think it’s terrific!

It’s absolutely worth a Digg!

Edit: you can use also this new Digg link