# [Project] Abe Browsered



## ste2425 (Nov 8, 2014)

*Have A Play! http://abe-browsered.azurewebsites.net/*​
Hey guys n gals. I came across this brilliant framework called phaser.io a couple of weeks ago. Its for building browser based games and has some neat features, physics, collision detection, audio and much more.

So I was thinking what could I build to have a play with it. Well Abe's Oddysee was the first video game I remember playing (I was four when it came out  ). So I thought it fitting to to pay homage to this brilliant game by it being to first game I've ever tried to create.

Now i am only about a week or two in, i have never had any experience with building games at all (Took me all evening just to create the logo). So this is going to be a steep learning curve but should be great fun.

Currently i don't have much to show for that week to you lot but its on github if you want to have a laugh at my initial code. I'm currently just working of the master branch and once ive reached my first goal below ill be splitting of to a dev/master kind of set up. Hopefully with both automatically building to Azure websites upon pushes.

So Progress.

Currently im focusing on Abe's basic animations. Mostly his transitions.  I capture user input and play walking, turning and idle animations depending but i want to get the transitions between them smooth. Most importantly i want to decide on a proper system for handling this. Currently Abe doesn't move around screen.

So Goals so far:

Have a system in place for separating user controls from character animation, and be able to transition between these animations.
To provide physical movement along with animations
Set up a simple game world and implement collisions and the correct animations
There is shed loads left to do after this point but i don't want to underestimate the difficulty and time involved in just this much, i know all to well if you set too many tasks to accomplish a project at the start, halfway they almost always change.

I did get the most important animation done though.


----------



## ste2425 (Nov 11, 2014)

Well progress has been sooooo slow. When i started with my animation frames i didn't think about alpha. So they all have a god aweful grey background. I'm working my way through them but its painful work.

With regards to the animations i have settled on a state system, with states for walking, turning, stopping, idling, jump etc. When the player wants to stop or turn first it check the characters current state so it can play the correct animation, a sliding turn if your running for example or just a standing turn if your not moving. At the moment this seem's quite easy to work with but time will tell when i get all the animations in place.






As you can see he only walks, turns, jumps and shrugs his shoulders.

Once I've sorted the alpha on them all ill get an Azure site up and running so ya'll can actually see him in action.

(Not used to writing these here log things, maybe i should inject more drama to each post?)


----------



## ste2425 (Nov 13, 2014)

Well made some progress the past couple of days.

Firstly he actually moves now, no longer just playing static animations! yay!

Also iv'e removed a huge amount of duplication in the actual image data. Originally animation frames were duplicated and flipped for their opposite facing counterparts. Now Phaser is used to scale the image depending on direction so the number of image frames that are needed is almost halved.

So he can walk left and right with turning animations played in-between, but he will also stop properly too. In the game when you let go of the arrow key he will keep walking untill both his feet are on the ground, usually an extra step. This has also been replicated. It's a small detail that will most likely never be noticed once it's complete but im really pleased with it.

This does however raise a question. Say your walking on a ledge that ends and you can fall off. You let go of the arrow key but Abe will continue another step to come to a halt. Now what if that extra step takes you over the ledge? You let go before it though so should the game stop you from actually falling over the edge? I'll have to have a play with the original again and see how it behaves.

Also he will collide with objects when walking and play the 'push' animation. He will also jump from a standstill. Currently the collision don't take into account if your jumping, or running so it will most likely then play the walking collision if you jump into objects.

Also i have a live demo of what it does so far on

http://abe-browsered.azurewebsites.net/

It is just using the free subscription so don't now how many times in a day it cn be hit before Azure turns it off but for now it works 

Edit: Oh controls arrow keys move, D shrugs shoulders, and P jumps. Don't ask why i chose these, they won't remain


----------



## ste2425 (Nov 14, 2014)

Just a small update.

Abe now collides when jumping. However i going to need to rethink how i ignore user input. Currently certain actions require input to be ignored. Such as turning, colliding etc. This is done by checking the flags for any of the blocking actions but this is far from the best way to do it. Plus it mean when i forget to check a flag you get some fun behaviour. If you turn then jump before the turn is complete you will still face the old way but jump in the direction you turned. Quite fun at first but not desirable  I think i will have a single flag to lock the character. All other actions that cannot be performed when the character is locked will check this single flag. 

Really looking forward to start working on possession, wan't to get some sligs in there 

Anyhoo the azure site is up to date. Once ive modified the state system ill be splitting off to dev/master branches.


----------



## blobster21 (Nov 14, 2014)

Do you plan on adding the whistle and fart animation ?


----------



## ste2425 (Nov 14, 2014)

blobster21 said:


> Do you plan on adding the whistle and fart animation ?



I plan to add everything you can do from the original  Possessing farts was only in Exodus right? Can't remember now.

Edit: Quite fun seeing how times the site has been hit, 67 times in the last 24 hours, 208 since i turned the site on yesterday i think it was  Just got the keep up the pace of the work.


----------



## ste2425 (Nov 17, 2014)

So done some more work on the state system and my character object.

The way iv'e built it i think will be quite helpful (without realising it). My character object can be applied to any character. When its instantiated its passed a reference to the sprite sheet for that character and json data telling it which frames from that sprite sheet make up its different animations. Hopefully this can then be swapped out for different sprite sheets and json data for different characters and it will just work. There's nothing character specific in the character object itself. The json data my have the specify which actions the character can do however because Abe can do more than a Slig, which can also do more then a Glukkon. 

Hopefully though all the actions methods exposed can be easily interfaced with some form of AI 'thing' which will mean possession will be quite easy, just ignore user input on Abe and switch control from AI to the user for the possessed character.


----------

