SilverMenu library for WP7

Inspired by the menus of WP7 game Puzzle Jumble, I decided to write a library that would help me and others to build menus for WP7 games easily. The Puzzle Jumble’s GUI code is a bit of a mess because it wasn’t thought for this kind of interface from the beginning so I decided to write SilverMenu from scratch.

Puzzle Jumble’s GUI

 

SilverMenu aims to bring some of the Silverlight user interface that is now present on WP7 to the XNA. To make it simple to use you can build simple animated menus with just a few lines of XML. It has only one week of development but you can see some progress already:

First SilverMenu sample.

 

With time I hope it grows into something more complete and useful. I’ll still update my blog about this project but if you want to follow the project closely and keep up to date, as well as, download the last build, you can do it at http://silvermenu.codeplex.com. I hope you find it useful and I appreciate all the feedback I can get. Thanks!

Windows Phone 7 – Tips for programming games

Puzzle Jumble started as an experiment to test and learn a little bit about XNA and Windows Phone 7. I decided to write some tips to help those who like me started experimenting with XNA and WP7.

Stencil

The stencil was used to cut the hole for doors so that pieces would appear to be sliding over the doors but under the board. The stencil was active in every frame which lowered the frame rate quite a lot (18-20 FPS). The solution was to activate the stencil only when a piece is going to leave through a door, so be careful when using the stencil buffer on the WP7.

DXT

GPUs like the DXT format and the WP7 is no exception, but unlike desktop’s GPUs the WP7 processor only loads DXTs that are power of two. My regret is not using DXT from the beginning when I started working on Puzzle Jumble. When I changed all my textures to DXT I had to change a lot of code, all the draw calls where I was using a position to draw a sprite had to be changed to a rectangle because the textures had a different resolution (power of two).
But the change was very useful:
– I gain some FPS;
– the memory footprint was reduced from 95MB (total peak) to about 45MB;
– the XAP file was reduced from 25MB to 9MB;
– thus, as a consequence reduced the loading times.

Floats (culture)

When parsing floats it’s easy to add bugs in your application if you ignore the culture format. Make sure to use the correct format provider or at least use the culture independent System.Globalization.NumberFormatInfo.InvariantInfo.

Float precision

Another problem that I found when using floats was that this comparison: if(a < float.Epsilon) (when a = 0) would work everywhere except on the WP7 device itself where it would always return false.

HTML page requests

This is not a WP7 specific problem but I thought it was worth mentioning it. Since Microsoft didn’t provide us with an API for leader boards I implemented an online score system using our servers to keep track of the users’ scores and best times.
The system was working fine to post data online but there was a problem when retrieving it. The first time the data was retrieved everything was fine but the subsequent retrievals would always be the same as if the data was cached somewhere.
After searching for a while I found out that the problem was that the HTTP request was being cached since the URL didn’t change, it would cache the result for that URL. The solution was to add a random attribute to the URL so that the the request couldn’t be cached. Not pretty but it was the only way I found to make it work.

And those were the problems that I found during the Puzzle Jumble’s development phase. I hope this useful for you!

3D Cascais (2010)

In 3D Cascais you can visit and explore the natural park of Sintra-Cascais. All the work in this project was made based on real world data. ZPX’s team members (me included) made several visits to the park and took some photographs to be used as reference. Detailed height maps and information about fauna and flora (including actual sounds recorded in the park) were provided by our partners SiQuant and Cascais Natura.

cn_01cn_02

This project took about 6 months, two programmers and two artists but one of them not fulltime. It was built using the Unity3D engine.

cn_03cn_04

Go on and visit the park:

http://percursos.webcomfort.org/PedraAmarela@26.aspx – Pedra Amarela – partial demo (faster download)
http://percursos.webcomfort.org/Pisao@27.aspx – Pisão – partial demo (faster download)
http://percursos.webcomfort.org/Global@30.aspx – full project online (slower download)

http://percursos.webcomfort.org/Viewer3D/cascais3d_1_1_8.zip – full project with better quality to download and test it on your pc.

Since the terrain is all generated on real data and is very highly detailed the builds became a bit big so bare in mind that the downloads can take a bit.

cn_05cn_08

cn_07cn_06

Synopsis:

Visit Sintra-Cascais park
Sintra-Cascais natural park is now just a click away, offering an unprecedented interactive experience.

3D Cascais trailer

Ocean (2009)

This was my first 3D interactive project at ZPX and was developed for the EMEPC (Task Group for the Extension of the Portuguese Continental Shelf) aiming to captivate the interest of the general public to this project.

srv-epc_01srv-epc_02

All that you see is mapped using real data that took several months to gather. Visit the deep Atlantic ocean or follow the automatic trails to take a tour. It took about 6 weeks of development with two programmers using the Unity3D engine. All the graphic content was delivered to us by our partner. Unfortunately there wasn’t time to add more interesting stuff to the deep ocean, such as some fishes or plants.

srv-epc_03srv-epc_04

srv-epc_05

Synopsis:

See the Ocean as never before
An amazing journey to the bottom of the Ocean, illustrating the Extension of Portugal’s Continental Platform project. This project was the result of a partnership between ZPX and Caixa d’Imagens.

You can try it here! Click on “Modelo Virtual 3D” – gamepad icon and wait for it to load, it may take a while due to the dimension of the terrain. You may have to install Unity3D web player.

Puzzle Jumble (2010)

This project started as a personal project to test the XNA 4 and the Windows Phone 7 emulator. I made a simple prototype in just one day (2 afternoons to be more precise.) After that, 3D artist Bruno Nunes and I endeavoured in the task of making the game as fast as possible so we could release it on time coinciding with the WP7 release. The project took about 4-5 weeks to complete just the two of us and is available on the Windows Phone Marketplace.

pj_ss01hpj_ss02h

Puzzle Jumble appears to be a simple puzzle game where the user has to complete an image within time but there’s more to it. It mixes other gameplay elements such as doors, springs and bombs to make things more interesting.

Puzzle Jumble trailer

Synopsis:

Puzzle Jumble, the amazingly addictive puzzle game that takes picture puzzles to a whole new level. Make your way through delightful jigsaw puzzles full of beautiful colourful images… but watch out for the doors, springs, bombs and more as they are sure to create additional challenges and add to the fun.
Choose between arcade mode or attack mode and try to compete with top online scores.

We’re so sure you’re going to love Puzzle Jumble that we’re going to let you try it out for yourself – check out our FREE trial.

pj_ss03hpj_ss05h

Orange Game (2010)

Orange Game is a mini game of a larger game prototype that ZPX decided to publish for the iPhone and more recently available on the Windows Phone 7. It took about 3 weeks to a month and two people to make the first release to pc/mac/web using Unity3D. You can try it online for free at its homepage or at Wooglie where it is the most played mini game at this time.

orangegame_01

Synopsis:

Orange Game is a thrilling game that tests the player skills.

In a remote town called Farmocolis, Uncle Bob asks for his nephew’s help to catch some oranges. Little Zoy thought it was a boring task so, to make things interesting, he decided to retrieve the oranges in a rather unusual way. Instead of using a basket to carry oranges like a normal person, he uses a helmet with a spring attached. The oranges bounce on his head and he doesn’t know where they’ll fall. They either fall in an empty zone which Zoy has to prevent it from happening or they will fall in their final destination, the truck with an insanely deep cargo area.

As time passes by Uncle Bob will give more and more oranges to Zoy and this is where the fun begins!

Orange Game on the iPhone and WP7

Ugo Volt (2005 – 2008)

This project is where I started my career as a game programmer professionally. In 2005 I joined Move Interactive to work on this title which unfortunately haven’t seen the light of day. But I learned a lot while working on this project and I can say I’m proud of my work and the work of the rest of the team. We sure did a good job building an engine from scratch and putting up a trailer and technology demo for E3, a playable prototype using our in house engine and also one more prototype using the Unreal Engine 3 (UE3). IGN wrote a nice preview about it after E3.

12336Ugo volt

Ugo Volt is an action/adventure game played in first and third person. Ugo, the main character, leads a rebellion group against a the corporation controlling a post-apocalyptic future. He is the first prototype of a hybrid humanoid with implants that allow him to control electricity in different ways.

ugo-01ugo-02

ugo-ue3-01ugo_ue3_02

It was first presented at E3 in April of 2006 with a trailer built using the in house engine and two tech demos showing the engine’s capabilities. Still using the proprietary in October of 2007 the first playable demo was released on both PC and XBox 360 in the form of vertical slice. Trying to focus the low resources available on the gameplay, Move Interactive decided to switch to Unreal Technology and another playable demo was launched in March of 2008 using the UE3.

Playable demo using Unreal Engine 3

Being a small team of developers, my responsibilities in this project varied in different areas including: core engine, editor, engine’s integration with FMOD, ScaleFormFX and GameMonkey script, gameplay, simple particle and shader effects, cinematic engine and sound manager.

Floribella (2007)

While I was working at Move Interactive as a game programmer, we were just finishing another prototype of Ugo Volt and there was an opportunity to develop a simple 3D platformer game. Inspired by Pandemonium, we developed Floribella.

floribella_cover

The Floribella game is based on an argentine telenovela named Floricienta which was very popular some years ago in the Portuguese adaptation with the same name.

flor1flor4

This project begun in June of 2007 and was published by November 25th of that same year in Portugal. More recently in 2009 it was launched in several other countries such as Italy, France, Spain and Brazil.

Floribella TV spot

 

The Torque Game Engine was used in this production where I worked as a gameplay programmer in both Torque Script and C++.

Merry Christmas!

I want to wish you all a Merry Christmas and that the new year of 2011 may bring you health and joy! Also check out the ZPX’s Christmas card, it’s in Portuguese but here is a translation of my message: “I wish you a Merry Christmas with a stocking filled with pixels and an excellent year of 2011!”.

Time for change

Welcome to my new home.

After considering this change for a while, I decided to move forward with it because I think it will bring more useful content to the site. The problem with my other page was that I had to do everything by hand and I don’t have much time to spend on maintaining the code for the website. With a known blog and with lots of tools to help I can focus on what’s important, the tutorials, articles, etc.

One other change I decided to make was to remove some menu categories because I simply couldn’t maintain/update all of them. I think the other page was mostly visited by people searching for programming topics. If there is anyone interested in getting the other categories back drop me a note and I’ll do my best to bring them back.

I’ll keep my old page running in this address: http://www.ricardosabino.com/index_old.php for a while during the transition to this new blog format.

With this change I hope to post much more than only 5 times per year. Let’s see out it goes.