You can try a template model here: http://agentbase.org/model.html?9d54597f7aafc995d227
AgentBase uses:
* HTML canvas, jQuery, etc
* CoffeeScript browser library, for compilation of CoffeeScript
* ACE editor for code editing
* GitHub gists, mini-repositories for storage of models
* NodeJS + Mongo for keeping a list of models
Comments most welcome!
<sarcasm?> Make a game of it, maybe with flock, and you'll be on the front page for days... ;) </sarcasm?>
My friends and I have taken similar shots at putting this functionality online, and turning it into a game is a great idea! Especially a game that helps teach/learn different concepts. For example, we had a previous project that allowed folks to learn Javascript by programming the AI for your different units in a RTS game. Unfortunately, we didn't have enough money/time to support it - hopefully we can bring it back online soon - but you can see more info on this reddit thread: http://www.reddit.com/r/learnprogramming/comments/1alfd9/jav...
Similar to you, we were using HTML5 canvas with a CodeMirror editor so users could modify and republish their own version in real-tim. I think you could do something similar where users had to modify the code (to different extents which could be levels) to get it to flock in certain ways. And then actually give the flock some real world story/context. That would be really cool.
To try: # A more inestable flock http://agentbase.org/model.html?82ef4f46d2a05838dc5f
@population = 55 # agents
@setVision 4 # patches & set patch rect
@minSeparation = 3 # patchesDo save your model as a new one if you want, makes it a one-click experience for visitors.
(in an ideal scenario AgentBase would do this automatically, and for each edit provide a link to that version... gists don't fork, sadly)
@population = 55 # agents
@setVision 4 # patches & set patch rect
@minSeparation = 3 # patchesThe AgentBase library actually was a fork from the AgentScript library. See here for why I forked it (basically to keep it simple and to be able to apply basic minimum coding standards and add automated tests): https://groups.google.com/forum/#!topic/agentbase/4NicEY8B6W...
Happy tinkering!