Urban Race has been freed

1

A few months ago I developed Urban Race, a very simple (and quite lame) time attack racing game using XNA. It was a University project so I couldn’t release the source until it was graded but then, I totally forgot about it. Recently, a reader asked me to publish the source and here we are. Please, bare in mind it’s for educational purposes, it was developed in one month without previous knowledge of neither C# or XNA and it’s not intended to be a fully playable product.

I usually document my projects with Doxygen and several articles or tutorials, this time has been different. At least I’ve uploaded a PDF file with the documentation I submitted for my project to be graded. You’ll have to excuse me for lack of further and more accessible documentation but I don’t have much time now and, prior to this moment, I didn’t think this game was worth making public.

Anyways, you can freely access the source, reuse components and re-share. Bare in mind that the code is under GPL v3 and the media is under Creative Commons 3.0 BY-NC so, please, stick to their conditions.

Internationalization for libgdx projects

6

Edit: I just added UTF-8 support

Localization is a key aspect in games, specially if you want to reach a wider audience. I recently ported Freegemas to the libgdx platform and, as the original one, I wanted to ship it with multi-language support. There is no such a thing as gettext for Java and I didn’t see the Android internationalization system as a good fit in a multiplatform development. That’s why I developed my little own internationalization module.

Download LanguagesManager.java

Its usage is extremely simple, first we need a media/languages.xml file where all the strings in our project will be located. The syntax is pretty straight forward, we lay language sections identified with the code for each language. Inside every language, we provide a list of key value pairs with the localized strings.

< ?xml version="1.0" encoding="UTF-8"?>
<languages>
   <!-- English -->
   <language name="en_UK" >
      <!--  Menu  -->
      <string key="Timetrial mode" value="Timetrial mode" />
      <string key="How to play" value="How to play" />
      <string key="Exit" value="Exit" />
   </language>

   <!-- Spanish -->
   <language name="es_ES" >
      <!--  Menu  -->
      <string key="Timetrial mode" value="Contrarreloj" />
      <string key="How to play" value="Ayuda" />
      <string key="Exit" value="Salir" />
   </language>
</languages>

We can retrieve localized strings in our project through the LanguagesManager class and its getString() method. It’s been implemented using the Singleton design pattern as we only need one instance accessible from, potentially, everywhere in the code. When we ask our manager for a certain string we will use its key, if it finds it within the current language, it’ll return it, otherwise it’ll return the key itself. That’s why using strings in a base language (English) as keys can be a good idea, those will be returned by default.

For now, it uses lazy initialization which means it’ll load the language the first time the getInstance() method is called but that might change in the future. It automatically detects the system language (no matter if we are on Android or a desktop environment) and it fallsback to English if the system language is not among the available ones in the media/languages.xml file. However, you can explicitly specify the language you want to load through the loadLanguage() method.

LanguagesManager lang;

lang = LanguagesManager.getInstance();

String option1 = lang.getString("Timetrial mode");
String option2 = lang.getString("How to play");
String option3 = lang.getString("Exit");

Freegemas libgdx is open source (GPL v3) as is this internationalization module which means you’re more than welcome to download it, use it and improve it. If you do the latest, make sure you distribute it the same way as me.

Getting started with libgdx, Freegemas!

0

I can’t believe it’s been almost three months since I started at Crytek UK, time has passed amazingly fast! Nevertheless, I’ve managed to get some stuff done game development wise. I’ve always wanted to jump into mobile and that’s what I’ve been doing during the last couple of weeks. May I present you Freegemas libgdx edition!

It’s basically a libgdx port of the original Freegemas, a simple Bejeweled like C++ Gosu puzzle game developed by José Tomás Tocino who I have to thank for the neat original code and the excellent art. This means you can run it on your desktop, Android phone and very soon on your browser through HTML5 sweetness.

Freegemas screen, neat art huh? Thank Jose for that!

Libgdx it’s an open source Java library that allows you to create multiplatform games (desktop, Android, HTML5) sharing the same code base. That alone is amazing enough, so kudos to Mario for the titanic work. The library uses OpenGL so the performance it’s quite good even though we’re talking about Java! It has so many features and associated tools that it’d take me a few days to cover them all. Plus the community is always very helpful, besides the forums there’s always someone on the IRC channel willing to save your ass. However, to be honest it’s a bit of a downside to me it’s lack of UFT-8 font rendering support. Maybe some other day I’ll talk with some more insight about libgdx.

This was a warm up project, bigger things are yet to come!

PS: I must not forget about the HTML5 version of the game, it’ll be available soon.

I just got hired by Crytek UK!

3

I can finally say it out loud: I just got hired by Crytek UK as a junior programmer! In case you were wondering, yes, they are the same guys that pulled the Crysis saga together using their jaw dropping CryEngine, and now they’re working on games like Homefront 2. Their British studio is based in Nottingham, so I moved here a couple of days ago and I really like the city so far.

Nottingham Lace Market Square - Is nice isn't it?

This is, without any doubts, a dream job and I couldn’t be happier about it, it’s what I’ve been aiming for since I started University. I couldn’t possibly have predicted this would happen a few months ago. Maybe a little mobile games company crossed my mind, but a huge triple A company like Crytek? No way. As you can see, the office is quite amazing and the people here are most thoughtful and friendly.

Crytek office building

I’d like to thank everyone who’s helped me from professors to team mates without forgetting about family and friends. A new life full of changes and exciting experiences lies ahead! I’ll try to update the blog as often as I can. Of course I’ll post personal games reviews, game design and games programming articles.

Recent projects and future changes

0

Lots of stuff has happened since I last posted something here. Crazy Eramus life, you want to do everything: projects, social life, studying… So, logically, the blog has been a little bit left behind. I just wanted to post a quick update about the two university projects I’ve been working on recently:

  • Laterdroid: Read it Later client for Android created using the official SDK.
  • Urban Race: time attack racing game developed using C# and the XNA framework.

For further information please go to each project’s page, you’ll find a more detailed description, screenshots, videos and download links. I was thinking of making both projects open source and upload them to a Google Code repository but I guess that’ll have to wait until they’re graded by the professors.

And now for something completely different…

Huge events have taken place recently, the dream has come true. Unfortunately, I can’t make anything public yet, I’ve only told my family and friends. However, I’ll soon post something on that matter.

Getting started with XNA: Urban Race

2

As if I didn’t have enough work, I recently started another project which has an early deadline. For the Advanced Games Programming module here at Kingston University we have to develop a game for Windows and Xbox 360 using C# and the XNA framework. The final deadline was in a month counting from the start date and, halfway through the development, we had to show a demo. That’s how Urban Race began just a week ago, in this post I’ll talk about the game and my first impressions on XNA.

(more…)

Official open source PlayStation Move library

0

Just a quick update: Sony has released moveme, an official and open source PlayStation Move API that enables developers to create Windows and Linux applications controlled using Sony’s famous wand. You can read more about the library in the following paragraphs.

(more…)

Flocking behavior demo

0

I’ve just finished this simple flocking behavior demo based on the 3 Reynolds rules: separation, cohesion and alignment. It was part of a coursework for the Strategy & Intelligent Games module I’m taking here in Kingston University. I know it’s not precisely pretty but at least the boids are moving in a nice way. It’s written in C++ using the despicable Open Scene Graph library (such an uncomfortable API).

Features:

  • 3 Reynolds rules: separation, cohesion and alignment.
  • Collision avoidance.
  • User interaction: dynamic mouse seeking or avoidance.
  • Steering behaviors blending.
  • Configurable parameters using an XML options file.

Most of the algorithms have been extracted from the Artificial Intelligence for Games book written by Ian Millington and John Funge. If you’re interested in the topic it’s totally a must read, I strongly recommend it.

Evolve: submitted prototype

0

I’ve been working quite hard in Evolve, the PSP First Person Shooter prototype I’m developing for the Advanced Games Programming module here at Kingston University. The submission deadline is getting dangerously closer and I’ve had to crunch a little bit to get the basic features I wanted to include and be able to write a report on the game. In the following lines I’ll give my impressions on the development and at the bottom you’ll find a doubtful quality trailer.

(more…)

Evolve: early stage demo

0

Yesterday I had an in class demo at university of my PSP First Person Shooter prototype, Evolve. The professor was impressed with the software engineering behind the system so, apparently, it went quite well although the project is in a very early stage of development. As always, I was in the games lab (it’s becoming my second home), so I recorded a video of the demo to keep track of the process.

Go to Top