Facebook OA / AI2 – Week 9 (March 25 – April 1)

For this week, I added new components to the game. One of these components is a flexible platform.

Recalling our previous implementation of platform, there was no support for custom-sized platforms. In the latest iteration however, this is possible.

I also added a couple of animated sprites to control the user animations. However, instead of dealing with the low-end Blockly code, it is possible to change the state of the player sprite (running / moving / left / right) via a simple function call. Phaser already does some of the heavy-lifting (For example, cutting up the spritesheet into the various frames), however this is not intuitive and may be too slow for the novice user if it were implemented through blocks.

So here is the game in action, with a couple of new sprites:

game in action

Oh and, you could change the texture of the custom platform!

And the blocks:

Create a user:

block-1

Ever wanted the user to turn left? No problem!

changeState

And the custom platform block:

blocks-3

For next steps, I am debugging the getter function. Right now the issue with the getter is, synchronizing a bi-directional callback between the Java and Javascript endpoints. Its using an event-driven callback, and while it seems alright, the game somehow hangs every time. Debugging it for next week! (Pressing issue).

Leave a Reply

Your email address will not be published. Required fields are marked *


*

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>