kittykatattack / hexi

Make games the fun way!
MIT License
551 stars 83 forks source link

What's the difference between Ga and Hexi? #1

Open webkitstudio opened 8 years ago

webkitstudio commented 8 years ago

Also, there's a bug in the code, if healthBar.width < 0 never occurs, does a rectangle ever go below a 0 value in width/height?

Also, thanks for this framework and the awesome documentation! I'm just reading through it, it's super well written and easy to follow/understand.

kittykatattack commented 8 years ago

Yes, a rectangle can go below zero... it's an interesting effect :) Of course, in a more complex game you'd want to prevent that.

Ga and Hexi have almost exactly the same API. But, they're hugely different under-the-hood:

Ga is a custom canvas based renderer that compresses down to less than 6k. Ga was specifically written to create a full-featured 2D game engine with the smallest possible code footprint.

Hexi is built on top of Pixi (a super-fast WebGL renderer.) It lets you access the PIXI global object to do low-level Pixi coding, and use all of Pixi's cool effects, like filters. Hexi has also been built around a very different architecture: it's composed of a suite of stand-alone modules that can be used as plugins for Pixi.

I would use Hexi for commercial projects, and Ga if you want to learn how a game engine works, or leverage its tiny file size to make a game for the JS13K game competition.