Following the new milestone of CreateJS, I just released Creatine 0.2.0!

This version has some cool new additions to the library:

  • Tile Maps: now you can load maps created with Tiled by using the new TMXMap. It supports all maps projections of tiles (orthogonal, isometric and staggered) and all type of layers (tile, image and object). Check it out the examples.
  • Jukebox: a helper class to handle music and sound playback. With this class, you can set different volume setting for music and sounds, and play random sounds from a group.
  • Storage: a helper class to handle persistent data using the HTML5 localStorage. With this class you overcome the type limitation in localStorage (it only accept string variables) and , thus, can save and retrieve objects, numbers, arrays, etc.
  • Entity-Component-System: a ultra basic implementation of ECS model, I hope to provide more features in the future.

Moreover, there are some other modifications on the existing features:

  • Sizers now manage scale and registration point properties of children.
  • Fixed an initialization bug present in several transition.
  • A complete update to the class and inheritance model of creatine, following the new style of CreateJS.

Together with this new version, I also published the new website for creatine (the old one http://guineashots.com/creatine now redirects to the new site):

http://creatine.guineashots.com

Right now I’m updating my boilerplate to follow the new releases and to include a new improved architecture.

Read more

This week we finally had the new release of CreateJS, with a lot of changes, starting with the new site and new visual identity! All libraries (EaselJS, PreloadJS, TweenJS and SoundJS) have major updates that improve performance and the architecture.

Some important updates:

New class model with performance improvements:

In the old CreateJS, attributes were defined in the classes prototypes. By moving the definition from prototype to instance, EaselJS could decreases the canvas update time (by stage.update) in more than 2 times (a 100%-150% improvement).

The tick propagation was also improved with a small change: the tick event is reused for all display objects through the propagation of the tick, i.e., the tick event is instantiated only a single time. By avoiding redundant instantiation, the tick propagation has also an improvement of ~100%.

See:

New inheritance model

The inheritance model were updated following the modification of the class model. Now, if you want to inherit some class in CreateJS, you need to use createjs.extend and createjs.promote.

The createjs.extend function set up the prototype and constructor of a new class. The code is pretty simple:

createjs.extend = function(subclass, superclass) {
    function o() { this.constructor = subclass; }
    o.prototype = superclass.prototype;
    return (subclass.prototype = new o());
}

 and this function must be called right after the creation of the new class constructor.

The createjs.promote back up the superclass methods that were overridden. For example, if you create a FlexibleBitmap inheriting from Bitmap and override the method draw, createjs.promote back up the method bitmap draw by creating an alias Bitmap_draw inside the new FlexibleBitmap.

See:

All classes now implement properties for getters and setters

Some changes are pretty straightforward, e.g., Container.getNumChildren() is now replaced by Container.numChildren; but some names have been updated too, e.g., Ticker.getFPS() is now Ticker.framerate. Using properties instead of getters and setters is a good practice, nice to see that on CreateJS.

See:

Other updates

See https://github.com/CreateJS/EaselJS/blob/master/VERSIONS.txt for a full list of changes.

Read more

banner

Finally I finished my entry for this Ludum Dare (LD31, the theme is The Entire Game on One Screen). This time, I am so exhausted that I couldn’t do any progress report during the weekend, but, on the other hand, I could finish the game, including the mechanics, graphics and sounds.

My idea was creating something with artificial intelligence (again) and for some reason, after the theme announcement, I remembered that I never touched at a flocking algorithm and this would be a good opportunity for it. The game idea is to take some sheeps from one point and bring them to another, without letting them to leave the map or to be killed. The player uses the mouse to herd the sheeps, which will behave accordingly to their neighbor mates and some tiles in the environment.

As tradition, I writing here a summary of the competition:

What was good:

  • Could finish the game!
  • Cute sheeps with nice behavior;
  • I could follow the schedule without any change;
  • I could do some music and sound effects;
  • I drawn my first tileset!

What wasn’t good:

  • Lot of problems with collisions ;/
  • Spend a lot of time with rotation math (shame on me);
  • The sound effects are pretty limited and the music is too simple;
  • The graphics are cool but some things I’m hating, such as the windmill;
  • I had to redraw the tileset 2 times!

Which technologies and techniques I used:

  • The sheeps are controlled by a flocking algorithm, (or boid algorithm) as described here and here;
  • The graphics were made in Inkscape;
  • The map were built in Tiled, using a 32×32 tileset;
  • I recorded the audio for the sound effects in Audacity;
  • The music were made in Guitar Pro and converted in audacity;
  • CreateJS and Creatine were used as programming base;

anim1

(VIEW LUDUM DARE ENTRY | PLAY BAA-RAM-EWE)

Read more

Ludum Dare 31 has begun! I was expecting the snowman theme, the favorite on the previous voting rounds, but, thanks to all gods, snowman melted in the flames of hell. The winner theme was “The Entire Game on One Screen“.

I finally have an idea (hopefully, a good one): a game where you command a dog herding a group of sheeps where the goal is keeping the maximum number of sheeps inside the screen area.

 

Read more

So, I’m back from USA, where I visited Disney Orlando and Las Vegas.

Orlando is a great and beautiful city, with a lot of lakes and parks. The traffic flows so well, the food is so good (I’m in love for the Irish pub at downtown Disney), Disney is perfect. I’ve spent 7 days in Orlando and I really loved the city.

After that, we went to Vegas, which is kind of disappointing, especially after the greatness of Orlando. The casinos are so decadents, only good if you are looking for sex, cigars, drinks and losing money. On the other hand, Grand Canyon and Flagstaff (a small city near of Grand Canyon) are so cool. The Canyon is awesome, despite the temperature of -6°C and Flagstaff is so cute with all that nice people.

Both Orlando and Vegas have nice RPG stores. The Sci-Fi City in Orlando and the Little Shop of Magic in Vegas, both have great sections of board games. I think I spent more than 200 bucks on them. I bought some nice games, expansions, and dices (a lot of dices). I really recommend both stores.

Finally, we went home at Friday, the black Friday. Man, that is crazy, 32″ televisions for 89$, 60″ televisions for 490$, several kitchen appliance for 5$-10$. How could a man leave USA at black Friday without spend all its money on it? So, I bought a PS4 (for 349$, four times less than in Brazil), Shadow of Mordor (for 25$) and a lot of other little things. Man, Shadow of Mordor… What a game!

I’m back now and I hope to keep posting things here every week.

Note: this weekend will happen the last ludum dare of the year!

Read more