Hacker News new | past | comments | ask | show | jobs | submit login
Crafty: open source JS game engine (craftyjs.com)
64 points by mcantelon on Dec 21, 2010 | hide | past | favorite | 10 comments



So, I went to look at the demos, and (since I'm not much of an arcade gamer) I clicked "Isometric test". I figured out how to scroll around and delete blocks, but I couldn't seem to create them - somewhat nihilistic.

Then I went to "Elevator Action", hoping I could figure out how it worked. No instructions, but the arrows move left and right; up jumps, and space fires. Fair enough. There's four levels of doorway, and only one platform to walk on; there's a ceiling light floating in the elevator shaft, I can walk into the elevator when the floor is waist-high, and be gently deposited at the bottom of the screen (until I move, then I fall to an untimely death). I can't open any doors, and walking off the right-hand-side of the screen does not make it scroll.

I realise that these are just very basic demonstrations, and that your library is probably much more versatile and impressive than these small demos indicate, but the first impression I got was pretty soul-crushing.

The "Biolab Disaster" game that serves as ImpactJS's demo is a pretty poor game in that it doesn't have any particularly novel mechanics or level-design or interesting systems to manipulate, but it is technically awesome, with great graphics and music and animation, and really shows off what the library lets you do.

EDIT: If your demo game is hurting from lack of artwork, free game graphics are not hard to come by: http://www.lostgarden.com/search/label/free%20game%20graphic...


You know what, I agree. But today after the release of ImpactJS I thought, f* it. Release! On my giant todo list, this is one, I assure you.


Releasing is good! I would like to see a "real world" example of crafty, though.

I have to admit, I got sticker shock from Impact.


Ha me too. Today I am going to make a video tutorial of creating Connect 4. If you want the effects and all that jazz, shoot the lights in elevator action.

Edit: I won't charge you for it either ;)


What's your short term goal for the project? Is there anything on the todo list that a community can help with?

One thing about the documentation that I liked was disqus integration. Well, any basic comment system would do well. If one thing PHP has going for it, it's a community is great documentation on their site.


Very much so. In my tutorials I mention a bunch of times that I encourage developers to write components or extensions and submit them. Just let me write the plugin database first :P


It looked pretty promising to me. I looked at those demos and saw some nice capability. The code was pretty clean.

I actually greatly prefer minimalist demos and so consider this a presentation problem.

It would be better to place the code side-by-side on the demo page with the game. The Elevator Action game is only 263 lines and it would reveal to casual observers that you can shoot the lights.


Seems like there are at least one js engine based on canvas coming out every day.

I have been working on a pirate game based on canvas at http://constantsail.com , and I have to say, it is so simple to work with canvas that there doesn't seem to be a huge reason for these game engines. If you need canvas to do something that it doesn't you just tack on a function.

I guess the thing is, it is so easy to start building a game engine, everyone is starting to do it. I find it is easier to just start with the basics, and when you start to repeat yourself or do anything complicated, just encapsulate it and keep building.

I built a knockoff of atari combat the same way on the iphone (http://robkohr.com/iphone/tank)


Yes it is fairly easy. But my engine is not JUST for canvas. You can switch entities from canvas to DOM in seconds. There are also components that make things a lot easier such as collision detection, audio, sprite maps, click maps, mouse events. As well as lots of performance optimizations such as using a Spatial Hash Map for all the entities and redraw regions on canvas so only segments that change are redrawn.


You know Crafty is also a chess engine right?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: