Posts Tagged ‘Crafty’

Square Dance Postmortem

Posted by
Tuesday, December 9th, 2014 5:34 pm

I made a thing last weekend, and I’m pretty proud of it! Read on for a large wall of text on just what happened…

I’ve attempted Ludum Dare before, and I’ve always started, gotten discouraged, and given up. The games simply weren’t coming together. Didn’t matter what I used – C++, Javascript, or C#. How the hell am I supposed to make a game within 48 hours? It seems too monumental a task, especially for the compo where you need to make everything essentially from scratch.

But, as with many other things, turns out all I needed was more practice and some luck.  After spending the week before pumping myself up and getting in the right mindset, everything just… clicked. I worked like a fiend, loving every minute of it, and turned out a seemingly-decent game. I didn’t even miss any sleep.

Here’s a list of things that went right:

  • I got really lucky with the theme. At first, I hated it – it was too limiting, it was a mechanic and not really a theme, it wasn’t snowman. But, here’s the thing: a “limiting” theme is exactly what I needed. “Make the smallest game you can” is good advice, but I hate it. How can you know what ideas are finishable in 48 hours if you’ve never finished a game? If the only games you’ve played have taken months or years to make, how can you know to make anything else? The theme really forced me to think smaller in a way that “Make the smallest thing” never did.
  • Halfway through, I dropped the idea of doing any graphics, leaving just squares. This allowed me to concentrate fully on the fun, which I believe is the most important part of a game. There would have been no way I would have been able to concentrate on the mechanics and the difficulty curve as much as I did otherwise.
  • On a whim, I went out and bought snacks an hour before the jam started. This was much more important than I thought it would be. I didn’t buy anything with caffeine – just some fruit and junk food – but this was enough to keep me energized throughout the compo, and provided me with excuses to take breaks throughout.
  • I bought and got used to Ableton Live 9 Intro before the compo began. I’m still not great at composition – not even close – but getting used to Ableton allowed me to produce some decent-sounding music with fairly little effort. The library of samples was especially helpful; with something like Musagi, I’m hopelessly lost.
  • I used Crafty. This, I think, is the single biggest reason I was able to finish. I actually had no experience with Crafty before I started the jam, which makes it all the more surprising that I have it in this list. Crafty is one of the most versatile and well written frameworks I have ever had the pleasure of using. It lets you do things right, but it also lets you break the rules when it’s necessary. I rarely felt hindered by the framework, and that is incredibly important in a jam where momentum is everything. That isn’t to say everything about the framework is impeccable – I’ll come back to that later – but I really fell in love with Crafty over the weekend, and will be using it more.


The list of things that went wrong is much smaller, and they’re mainly small niggles or corollaries to the things that went right.

  • Crafty’s largest weakness is probably in the documentation, which is lacking in many areas. Just to take one example, there’s no tutorial on how to create new components. It wasn’t a serious issue, but it did make me look in the source code on more than one occasion to figure out how to do fairly simple things.
  • Javascript still isn’t the greatest language to work in. Working outside of Crafty felt like pulling teeth. For example, one problem in my game is that clicks outside the play area don’t register. It would have been nice to pause when that the window outside that area is clicked, but this is non-trivial to implement due to the way the event system works in Javascript. I eventually cut the feature because it was just taking too much time.
  • I still believe that deciding to focus on graphics was a good idea, but it definitely won’t win me many points. With this game, it’s somewhat acceptable to have cut graphics as I was going for a bare aesthetic; however, learning some basic spriting will open up options for next time.

All in all, way more went right than wrong, and I loved the experience. Despite it all, though, I’m incredibly terrified that this was all a fluke. What if it was more luck than skill? What if it was just this year’s theme? What if I’m just not as inspired next time? What if, what if…

But then I take a deep breath and square my shoulders. After all, what can we do but deal with things as they come? Onwards!

(Cross-posted from my website)

“Loop Desert” Post mortem

Posted by (twitter: @johnnyaboh)
Friday, December 20th, 2013 3:04 am

The 28th Ludum Dare has been the first for me. I really wanted to attend this game jam and now I did and this is the first huge win for me. I built something in 48 hours, specifically a video game about choice, a hostile environment, and lack of resources.

Don’t forget to play and rate “Loop Desert”.

Loop Desert by Giovanni Cappellotto

What went right

  • I finished the game!
  • I loved to use the Crafty.js engine as the main tool to develop the game, I would thank for this @starwed and @kevinsimper two of the most productive Crafty.js contributors.
  • I was happy with the final concept and I conceived it quickly enough.

What went wrong

  • I used pixel art as I’m not an artist and it was the only way for me to get the job done in 48 hours.
  • I didn’t publish anything (posts, timelapse) during development because I can’t manage coding and sharing together.
  • I would have done more work on music and sound effects but I hadn’t enough time.

Note: I made this game at H-Farm, one of the official gatherings of the jam, the only one in Italy. I’d like to thank Hackatron for the organization of the event, great job guys.

CraftyJS – TweenColor

Posted by
Saturday, April 27th, 2013 9:44 am

So when using CraftyJS’s tweens, it doesn’t tween colors.

Tween::tween only works on numeric attributes.

color is stored as a string

So I’ve spent the past 3 hours figuring that out and how to fix colors.

Find my TweenColor component on github.

Small caveat: you must set colors completely through the new ::rgb method, you can call .rgb(r,g,b) or .rgb({r:r, g:g, b:b}).

.tweenColor is .tweenColor({r:r,g:g,b:b}, frames)

Maybe this helps someone. :)

Space Evolvers – Done!

Posted by (twitter: @netfighters)
Sunday, August 26th, 2012 3:35 pm

Just submitted my entry!

It was really fun to integrate genetic algorithms, neural networks and games, pretty much everything I love 😀 Also, I could experiment with the Crafty JS/HTML5 engine and concluded that it has a lot of potential, but it’s really in an early development stage yet, with some bugs and strange design decisions. Besides that, JS/HTML5 still sux a lot… I thought that by now it would be pretty standarized within all browsers, but actually there is still a lot of hacks needed to make something crossbrowser.

Reasonable Progress

Posted by (twitter: @netfighters)
Saturday, August 25th, 2012 4:11 pm

My game is already half-playable here:
It’s still not possible to die and there is no hud, powerups or different weapons, which I plan to add tomorrow. But it’s already possible to kill the enemies and see their behavior evolve! To achieve this, I’ve used a simplified genetic algorithm combined with a single layer neural network.

And since I didn’t post my setup before the competition start due to some strange word press bug, here it goes:
Language: HTML5/JS
Engines/Libs: Crafty + Sylvester
Editor: Gedit
Audio: Bfxr + Audacity + Wolfram Tones + Timidity
Graphics: Gimp + Inkscape

[cache: storing page]