Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Tweet at this bot to make games using emojis for scripting (sparklinlabs.com)
36 points by elisee on June 21, 2014 | hide | past | favorite | 8 comments


I tried submitting this bot I made yesterday (https://news.ycombinator.com/item?id=7924323) but didn't realize it was the middle of the night in the US. Trying again in the hopes that it will catch some more attention.


Interesting. But it's a bit hard to tell what the bot does just from this page. Could the sample games show the Tweets that were sent to create them?


Thanks! Yes, I implemented the logging system after those two games were made so they don't have a public log right now but I'm gonna try and build a little game to demonstrate the whole thing. Feel free to follow https://twitter.com/gdevbot for updates.

EDIT: I'm building a little game now, you can see it get build over here - http://gdevbot.sparklinlabs.com/p/starpick/edit


And precisely 60 tweets later... here's a game! Hold mouse down to move, catch the stars, avoid the spikes. http://gdevbot.sparklinlabs.com/p/starpick/edit


Whoa. Reminds me a bit of Logo.


Fantastic stuff. Can you give some more info on how it was created, what libraries it uses etc.?


Sure! (I made the source code public at https://bitbucket.org/sparklinlabs/gdevbot/src btw)

So basically it's a Node.js app built in CoffeeScript. I'm using node-twitter-api to subscribe to the bot's twitter notifications (https://bitbucket.org/sparklinlabs/gdevbot/src/tip/app.coffe...).

Whenever a tweet arrives, I check various stuff (is it a retweet? are multiple people mentioned? more than one hashtag?) to decide whether it's a command or it should just be ignored. If all checks out, I parse the tweet's text (https://bitbucket.org/sparklinlabs/gdevbot/src/tip/app.coffe...) into a command and relay it to the backend for processing (https://bitbucket.org/sparklinlabs/gdevbot/src/tip/lib/backe...).

Images are validated & their size clamped using a node graphics-magick module. Emoji scripts are parsed using a custom parser I cobbled together (https://bitbucket.org/sparklinlabs/gdevbot/src/tip/public/js...) and JavaScript comes out on the other end.

The tiny game engine works with actors (or game objects in Unity3D parlance, it's very similar except 2D-only), they can have components (an image, one or more scripts) on them and can be parented to one another.

I've been building a cooperative game-making platform called CraftStudio (http://craftstud.io/) for the past 2-3 years and @gdevbot was just a kind of crazy "why the hell not" project inspired by all that work that I decided to build a couple weeks ago.


There should be a game jam with this system as the theme




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

Search: