ads

Monday 27 December 2010

Browser Based 2D fighting game - Part 2



Things getting developed much more as I started digging into this framework. The framework is pretty easy to handle.When you define an animation and register it, it will start animation when you load it in Browser.Another beauty of this framework is , you do not have to write lot of code to initialize and register an animation. A small piece of code like this will kick of animation!. This was pretty easy.

var abobo = {
        currentState : IDLE,
        oldState:0,
        position: 400,
        adversary: "#cvs",
        animations: [
        {animation: new $.gameQuery.Animation({    imageURL: "./img/forgame/14657-14670-idle.png",
                                    numberOfFrame: 13, delta: 368, rate: 250,
                type: $.gameQuery.ANIMATION_HORIZONTAL | $.gameQuery.ANIMATION_CALLBACK}),
                  deltaX: 0, deltaY: 0, width: 468, height: 240}]};

The only thing you need to know is some background about sprite based animations and what are these parameters related to.

Friday 14 May 2010

Browser Based 2D fighting game - Part 1



I was thinking about writing a browser based 2d fighting game sometime back.It was just inspirational one as I had seen and played 2d fighting games in PS2 and PC.Also, I had seen the real Mugen fighting engine written in C and later it was ported to Java as well.All these works really deserve salute to its developers as it was an outstanding piece of work.Thinking that , I want to develop a small 2d fighting game written in Javascript.I started my journey some time back.But writing such a game is not trivial job, as it requires good framework support and understanding in scripting languages and last not but the least, experience in developing browser based games.Today, I think I do not have any of these.But I really wanted to develop such a game for the users who depend heavily on browser based game.So I decided to experiment with.

The framework I am going to use is GameQuery.This is a jQuery plug-in developed by Salim Arsever.The advantages of this plug-in are many.I could not delve much into this as I am not an expert.I am slowly digging this framework.To get more inspirational support, I saw one demo of fighting game on GameQuery site.This lead to me right direction what is to be done and how is to be done.So finally I was able to do something like this seen below.