Videogame Developer

lunes, 12 de noviembre de 2012

Shot and Crush Spatial Crash Edition 2



Click here to play on browser (Chrome recommended)

This time you pilot a car with wings and helped with some propulsion to fly around the outer space and destroy twets in the form of asteroids :)

To play enter the name of the twets you want to see and start destroying asteroids to see the message of every tweet :)

There're two kinds of powerups:
* Super-shot pill: By pressing "Q" button you will be able to fire eight fire bullets.
* Extra time: As of the second 30 approx extra time powerups will start appearing and will let add you a few more seconds.


The difficulty is adaptative, the faster you kill asteroids the more tweets per second will be appearing and the more points you'll be able to sum up.



Note: The ranking at the end of the level is currently not working.

sábado, 20 de octubre de 2012

Back to Videogames

It's been a good time playing around with REST and SOA architectures to create cool APIs with XML, WSDL and JSON as resource formats to communicate to Java/PHP APIs from Flesh and HTML5 clients, this was used to make a tool for non-experts to create web user experiences, this was part of a research project called "España Virtual".

The last year has also been really exciting from a learning point of view but even more from a responsability perspective as I had to lead the building of an e-commerce site called tecno-key.com, it's in production since 6 months ago and it seems still to be working fine, some of our clients are FNAC and El Corte Ingles, among others.

Now I feel it's time to go to the most hard/freak side of software development like making awesome videogames! I believe that's one of the most enjoyable, challenging and artistic work that a computer engineer can do.
I've started a master's degree in the UPF to create videogames so during this year my team are going to work real hard to create something awesome.

To whet your appetite I'm going to show my first videogame I did with a colleage 4 years ago called Marble Blast Ultra (engine and graphic art is fully done by  my colleague and me) and I've luckily found! and also a very tiny demo I did with Unity (I've to thank the walker boys tutorial) some months ago called Shot and Crush spatial crap edition.

Marble Blast Ultra
To Download:


Shot & Crush Spatial Crap edition


To play it:
https://dl.dropbox.com/u/4119039/Videogames/WalkerBoysLabs/Lab1.1/WebPlayer/WebPlayer.html

The real awesome stuff is coming ;)

lunes, 23 de abril de 2012

Discussion about best practices managing entity relations in a database agnostic way


Hello, I'm playing a bit figuring out what's the best way to decouple database relations among persisting entities to make it database-agnostic and more service-oriented, in a way that the entities relates each other through an abstraction service layer.

So I think that all the database relations between entities that belongs to different services must be avoid, then these relations have to be defined in a way that not implies to know how the other object is stored.

let's put a simple example, I have a couple of Bundles, UserBundle and BlogBundle:
UserBundle has an object called User which is persisted in MySQL database and  all accesses to save/find the object are encapsulated by the UserManager.
BlogBundle has the blog object which is persisted in MongoDB, all accesses to save/find the object are encapsulated by the BlogManager.

I have the next two main concerns about how to make the relation:
1) What to store in the User Entity ?
2) How to retrieve the Blog object from User Entity ?

1) What to store in the User Entity?
If I want to relate a user to a blog then I must persist something in the User table that links the user to the blog, but what kind of thing ? I can use the _id from MongoDB Blog Document but it is a database autogenerated field, also I can use a centraliced service to generate a custom objectId, Imo at least every persisting object must implement a getObjectId method to have an uniform way to get its id not matter how they are stored and what kind of id field uses as primary key (if used).

In the Blog entity class I'd have its oid:
//Class MQM/BlogBundle/Document/Blog
/**
 * @ORM\Column(name="oid", type="string", length=255, nullable=true)
 */
private $oid;
//...

public getObjectId()
{
return $oid;
}

The User entity class would have its own oid and the blog_oid:
//Class MQM/UserBundle/Entity/User
/**
 * @ORM\Column(name="oid", type="string", length=255, nullable=true)
 */
private $oid;

/**
 * @ORM\Column(name="blog_oid", type="string", length=255, nullable=true)
 */
private $blog;
//...

public getObjectId()
{
return $oid;
}

2) How to retrieve the Blog object from User Entity ?
The second part of this is whether or not to retrieve/hydrate the Blog(convert Blog objectId string into a Blog object like Doctrine would do).

//Example in UserManager class:
public function findUserByUsername($username)
{
$user = $this->repository->findOneBy(array('username' => $username));
$user->blog = $this->blogManager->findBlogBy(array('oid' => $user->blog));

return $user;
}

Maybe it requires more database accesses but keeps all blog retrieval/hydration centraliced in the User class keeping things DRY, otherwise everytime everywhere when it's needed to get the Blog object from the user it would be needed to call the BlogManager->findBlogBy(...) method.

martes, 6 de marzo de 2012

Symfony 2.0

Hello, since some months ago I've started an e-commerce project and I used the framework called Symfony2, it's a real pleasure to program with such a rock solid and well constructed piece of software.

I've finished the main client and admin part of the e-commerce's site, now I'm working in finishing the shopping cart and the user registration part of the site.

The ecommerce site is called tecno-key.com, here you can see a preview of the site :)