2 ms·
Bot programming is built in, see the AI page. It runs your JavaScript as a web worker and gives you the world state. It would take a lot of work to write a bot
by BSTRhino 8y ago
Bot programming is built in, see the AI page. It runs your JavaScript as a web worker and gives you the world state.
It would take a lot of work to write a bot on the raw network data because you're missing the simulation code that applies the actions and so won't know the world state.
There are actually specific lines of code for Firefox, Edge and Safari all through the code. Edge can't draw a line if it's width is bigger than its length, so I had to code around that. Safari and Firefox tell you the wrong mouse button on the mousemove event. Firefox performance improved dramatically when I removed all the alphas from the top objects canvas layer. I've tried lots of different ways to stop the scrolling on iOS and Android, and both required different approaches. It's not due to lack of trying. At some point I just had to give up on Firefox for Linux. No one is paying me to make this game!
- exikyut 8y agoOoh wow. I feel stupid for not at least seeing what the AI page was about, haha. That's awesome. I tried using the default AI, and since nobody else was connected I picked "Play vs AI". Apparently the bots also use the same AI... and so they all proceeded to engage in a hilarious (and cute) sped-up standoff dance with each other. And regarding making my own bot, I originally did mean that to mean figuring out/reverse engineering the world state, etc. This is absolutely trivial because this is computed by the clients so there's no server to headscratch about. But the AI system you're using is several levels cooler. The only suggestion I'd make is to include a socket.io+etc bootstrap that lets people run bots using Node. A rainy-day project might be a login system that lets people tie bot instances to specific rooms... I had no idea you'd poked the various browsers. Sorry about joining in the flamewar on that, heh. I (honestly) wonder why FF is so much worse than Chrome :/ I wonder if everyone who had issues was using it on Linux. This is fun, btw. Thanks for building it. :P