3 ms·
Tweet at this bot to make games using emojis for scripting
- elisee 12y agoI tried submitting this bot I made yesterday (https://news.ycombinator.com/item?id=7924323 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.
- underwater 12y agoInteresting. 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?
- elisee 12y agoThanks! 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 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 http://gdevbot.sparklinlabs.com/p/starpick/edit
- teamonkey 12y agoFantastic stuff. Can you give some more info on how it was created, what libraries it uses etc.?
- elisee 12y agoSure! (I made the source code public at https://bitbucket.org/sparklinlabs/gdevbot/src 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.coffee?at=default#cl-276 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.coffee?at=default#cl-16 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/backend.coffee#cl-142 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/parseScript.coffee 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/ 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.
- hayksaakian 12y agoThere should be a game jam with this system as the theme