JSBattle
Let's Get Ready to Rumble!
Project Setup For Dev
- After download the code run
npm install
. - Copy all the required libraries using
npm run copy:all
- Start the server using
npm start
- Open a browser and go to http://127.0.0.1:8080/ to see the battle.
Create your own tank
- To start the programing of your tank you can copy/paste any of the sample tanks at
src/tanks
folder with a name like{name}.tank.js
where the{name}
section will be the name that you will use to load your tank into battle. - Read the documentation to understand how the tank work and different ways to program your logic here.
- Start coding!!!
Test your tank
- The list of the tanks in the battle is defined at
index.html
file withconst tanks = ['chicken', 'crawler', 'crazy', 'dodge', 'dummy', 'kamikaze', 'sniper', 'test'];
- To try your own tank just included it in the list with the
{name}
that you use. - You can try it VS all the demo tanks or maybe just list 1 or 2, that's your call!!!
- Restart or refresh the browser to see your tank in action.
Push your tank
- When your tank is ready for battle you can push it to the repo.
- If you don't want that others see your logic very easy feel free to obfuscate your code and pushed a versionof the js file with the obfuscate code, you can use https://obfuscator.io/ to do it.