jueves, 26 de febrero de 2015

rubyquest - Day Four

So after four days of using LimeJS and the Google Closure Library to code our game, we realized that moving forward, it would bring us more problems than solutions and made a decision that should almost never be done: we switched frameworks. In our case, I believe that it actually made a lot of sense. LimeJS is very good for what we were trying to accomplish, but unfortunately, it's a framework that's not actively developed. We chose Phaser because it's the most popular JavaScript framework for games and it has a very nice and active community. 

So, after four days of coding, we decided to scratch everything and start from zero. Our biggest problem with LimeJS was doing animation and movement, and we were able to solve that with Phaser in about 4 hours. 

But No Framework Is Perfect

The problems with frameworks is that not one will cover everything that you need. While movement and animation is a lot easier with Phaser, transitioning from scene to scene is harder. Also, doing dialogue and inserting labels onto the screen can be hard. The way we are approaching that is by manipulating the DOM rather than the Canvas element of HTML only. 

We have jQuery code that toggles on/off our dialogue boxes, and also our main menu. This way, we call it from our game with the press of a button, and then it'll just show up on top of our game.
This approach might not be the tidiest but it works for what we are trying to do and it's pretty simple to implement. It'll also be good practice for when we have to implement our puzzles which will send an AJAX request to our server from an input box.

Our demo is almost done and we really need it for tomorrow as we need to present it for us to keep the project alive. 

No hay comentarios:

Publicar un comentario