HTML5 Space Invaders

Next wednesday I’m lecturing ‘Construyendo y publicando nuestra primera app multiplataforma (II)’ for the program ‘Miércoles de profundización en e-business’ developed by Interlat Group (Colombia). I already lectured this same webinar about one year and a half ago (link here) and when preparing the slides I thought that, apart from updating contents to be along the current time where we are in, it would be great to update the sample application as well.

So first of all I wanted something that viewers could connect to and test live in their devices, and immediately after that, and idea of interaction between them came to my mind. Result: A couple of hours later I saw myself developing a HTML5 Canvas and JS simplified version of the extremely popular ‘Space Invaders’  with world ranking that is displayed both in a map and also in a table updated live by using websockets technology.

Links:

 

Advertisements

Rails Friendly URLs Gem

Great! After several months working on this, I have finally released the first stable version of my Rails Friendly URLs gem. This is a very interesting feature that I started developing at OffsideGaming as a feature request for a particular partner and I was surprised to realise that no gems already existed for this! Basically it consists of a gem that allows administrators of any web service to dynamically configure any url they want into a SEO Friendly one and instantly see it applied in its website. Apart from how cool it is to see a url as friendly rather than a machine generated one, it definitely has it’s SEO advantages and therefore I thought It would be a nice contribution to the open source community. It performs three changes for every configured url:

  • Makes the application recognise the new route and act exactly as the originally configured one.
  • Makes the original one to be redirected to the new one, to avoid search engines penalise your site.
  • Makes Rails url and path helpers to use the friendly url, so you don’t need to change any single line of code in order to use them. And all these is done dynamically, without even need to restart your application server!

If you want to know more just visit the Rails Friendly URLs Gem Github Repo where you will find all the source code and instructions to set up and running easily. Also, if you want to see it in action and even play a little bit with it I’ve uploaded an example application in Heroku. The url is this: https://rails-friendly-urls-test.herokuapp.com/

I’ll be more than happy of hearing from you if you ever use it, or even if you find any issue using it. Leave your comments below!

Cheers!

Rails Push Notifications Gem

For the last months I’ve come across several backend ruby developments that required, at least, one common thing. Mobile devices push notifications.

Although it’s true that you can find several open source gems out there, I found none fully featured, bug free and suitable for both iOS and Android so I thought that could be a very good contribution for the community and, after some time working on it and testing it here is the result.

The Rails Push Notifications Gem is an intuitive and easy to use gem that will allow you to integrate both iOS and Android push notifications into your rails project.

Rails Push Notifications Gem supports:

  • Multiple iOS and Android applications/configurations
  • Ad-hoc and bulk notifications
  • Fully customisable notification’s contents
  • Apple’s both sandbox and production environments
  • Apple’s feedback service

At the moment of sending the notification(s) you’ll have feedback information available on whether the push was successful or failed.

At the moment, I’m using it successfully in two live products and having a great experience.

Visit the GitHub repository at: https://github.com/calonso/rails-push-notifications for detailed installation instructions and a step by step usage example and, please, feel free to leave a comment here if you need help or just to tell us about your experience using it!

Enjoy.

 

iOS Augmented Reality Engine

It’s a long time ago since I was asked to build an iPhone application with augmented reality capabilities (typical feature to show stores around user’s location).

I used the http://www.iphonear.org/ project as starting point for my solution, but soon I realised that my requirements won’t be fully covered by that project so I started implementing my own ARKit Engine at that moment. Nowadays it has become a fully featured and easy to use iOS engine, which I have open-sourced and I’m really proud of the results.

It’s core features are:

  • Fully compatible with all versions of iOS from 5.0 onwards.
  • Supports all orientations.
  • Scales and rotates displayed objects based on distance and orientation.
  • Allows user interaction with displayed objects.
  • Displayed objects positions are updated live (According to the user’s position).
  • Supports and distinguishes front looking as well as floor looking .
  • Allows any custom overlay views.
  • Builtin support for radar view.
  • Fully customisable.

At the moment I have used it in these iOS applications with really good results so far:

Go to the iOS ARKit Github repo to know more or try it. I’ve open-sourced it along with a demo project that shows how to use it.