jamro / jsbattle

JavaScript Programming Game (inspired by RoboCode)
http://jsbattle.jmrlab.com
MIT License
105 stars 47 forks source link

[Feature Request] Documentation: how to build the tank outside of the gui? #13

Closed jehon closed 6 years ago

jehon commented 6 years ago

I didn't see it in the documentation, so I don't know if it is a doc missing or a feature request...

Is it possible to inject my own tank from either another location (local folder or a github repository)?

How could I share my tank to run somewhere else (at friends) ?

jamro commented 6 years ago

The easiest way is to just copy *.tank.js file to /tanks folder and update of /tanks/index.json file. It is not described in docs but I will add it

jamro commented 6 years ago

documented in https://github.com/jamro/jsbattle/blob/master/docs/dev_guide/adding_bundled_tanks.md

acklenx commented 5 years ago

This doesn't seem to work. My new tank doesn't show up in the list if I refresh the page. And it doesn't even show up if I rebuild. Has something change? Should I open a bug for this?

hesto2 commented 2 years ago

For anyone else who is interested in this, you need to add the tank file to packages/jsbattle-engine/src/tanks, update the index.json file there to include your tank's name, and then run npm run build && npm run start from the root of the project. Lastly, you'll need to clear your browser cache.