First Commit

This commit is contained in:
Arne van Iterson 2020-04-20 20:11:45 +02:00
commit 3be13ea934
19 changed files with 4125 additions and 0 deletions

34
.eslintrc.js Normal file
View File

@ -0,0 +1,34 @@
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
}
};

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
node_modules
._*
.DS_Store
dist
release

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# TanksJS
A multiplayer tanks game made in Javascript using asdf framework.

6
css/game.css Normal file
View File

@ -0,0 +1,6 @@
html, body {
margin: 0;
padding: 0;
overflow: hidden;
font-family: sans-serif;
}

15
html/game.html Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/game.css">
<script type="module" src="../src/index.js"></script>
<title>Game</title>
</head>
<body>
<div id="board">
<!-- Renderer will push content here -->
</div>
</body>
</html>

60
main.js Normal file
View File

@ -0,0 +1,60 @@
const { app, BrowserWindow, ipcMain } = require("electron");
const path = require("path");
if (process.env.NODE_ENV === "dev") {
require("electron-reload")(__dirname, {
electron: path.join(__dirname, "node_modules", ".bin", "electron")
});
}
function createWindow () {
// Create the browser window.
const win = new BrowserWindow({
width: 640,
height: 320,
backgroundColor: "#111",
resizable: false,
frame: false,
webPreferences: {
nodeIntegration: true
}
});
ipcMain.on("resize", (_event, window) => {
win.setSize( window.w, window.h);
});
// Remove alt menu
win.removeMenu();
// and load the index.html of the app.
win.loadFile(path.join("html/game.html"));
// Open the DevTools.
if (process.env.NODE_ENV === "dev") win.webContents.openDevTools();
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.whenReady().then(createWindow);
// Quit when all windows are closed.
app.on("window-all-closed", () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== "darwin") {
app.quit();
}
});
app.on("activate", () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

3112
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

40
package.json Normal file
View File

@ -0,0 +1,40 @@
{
"name": "tanksjs",
"version": "1.0.0",
"description": "A multiplayer tanks game made in Javascript using asdf framework.",
"main": "main.js",
"scripts": {
"start": "npm run lint && cross-env NODE_ENV=dev electron .",
"lint": "eslint .",
"build:all": "npm run lint && electron-builder build -mwl",
"build:win": "npm run lint && electron-builder build --windows",
"build:mac": "npm run lint && electron-builder build --mac",
"build:linux": "npm run lint && electron-builder build --linux",
"postinstall": "electron-builder install-app-deps"
},
"repository": {
"type": "git",
"url": "https://gitea.arnweb.nl/arne/TanksJs/"
},
"keywords": [
"asdf",
"tanks",
"javascript"
],
"author": {
"name": "Arne van Iterson",
"email": "arne@arnweb.nl",
"url": "https://arnweb.nl"
},
"license": "ISC",
"dependencies": {
"asdf-games": "^1.1.0"
},
"devDependencies": {
"cross-env": "^7.0.2",
"electron": "^8.2.3",
"electron-builder": "^22.5.1",
"electron-reload": "^1.5.0",
"eslint": "^6.8.0"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -0,0 +1,189 @@
<TextureAtlas imagePath="allSprites_default.png">
<SubTexture name="barrelBlack_side.png" x="513" y="407" width="20" height="28"/>
<SubTexture name="barrelBlack_top.png" x="507" y="515" width="24" height="24"/>
<SubTexture name="barrelGreen_side.png" x="513" y="319" width="20" height="28"/>
<SubTexture name="barrelGreen_top.png" x="507" y="443" width="24" height="24"/>
<SubTexture name="barrelRed_side.png" x="414" y="371" width="20" height="28"/>
<SubTexture name="barrelRed_top.png" x="507" y="491" width="24" height="24"/>
<SubTexture name="barrelRust_side.png" x="512" y="40" width="20" height="28"/>
<SubTexture name="barrelRust_top.png" x="507" y="467" width="24" height="24"/>
<SubTexture name="barricadeMetal.png" x="479" y="499" width="28" height="28"/>
<SubTexture name="barricadeWood.png" x="479" y="527" width="28" height="28"/>
<SubTexture name="bulletBlue1.png" x="356" y="555" width="4" height="10"/>
<SubTexture name="bulletBlue1_outline.png" x="544" y="26" width="8" height="14"/>
<SubTexture name="bulletBlue2.png" x="532" y="48" width="8" height="12"/>
<SubTexture name="bulletBlue2_outline.png" x="438" y="455" width="12" height="16"/>
<SubTexture name="bulletBlue3.png" x="500" y="130" width="4" height="14"/>
<SubTexture name="bulletBlue3_outline.png" x="513" y="202" width="8" height="18"/>
<SubTexture name="bulletDark1.png" x="386" y="393" width="4" height="10"/>
<SubTexture name="bulletDark1_outline.png" x="462" y="455" width="8" height="14"/>
<SubTexture name="bulletDark2.png" x="470" y="455" width="8" height="12"/>
<SubTexture name="bulletDark2_outline.png" x="196" y="544" width="12" height="16"/>
<SubTexture name="bulletDark3.png" x="435" y="231" width="4" height="14"/>
<SubTexture name="bulletDark3_outline.png" x="531" y="517" width="8" height="18"/>
<SubTexture name="bulletGreen1.png" x="435" y="245" width="4" height="10"/>
<SubTexture name="bulletGreen1_outline.png" x="532" y="160" width="8" height="14"/>
<SubTexture name="bulletGreen2.png" x="521" y="202" width="8" height="12"/>
<SubTexture name="bulletGreen2_outline.png" x="172" y="544" width="12" height="16"/>
<SubTexture name="bulletGreen3.png" x="471" y="283" width="4" height="14"/>
<SubTexture name="bulletGreen3_outline.png" x="492" y="130" width="8" height="18"/>
<SubTexture name="bulletRed1.png" x="382" y="393" width="4" height="10"/>
<SubTexture name="bulletRed1_outline.png" x="344" y="551" width="8" height="14"/>
<SubTexture name="bulletRed2.png" x="336" y="551" width="8" height="12"/>
<SubTexture name="bulletRed2_outline.png" x="184" y="544" width="12" height="16"/>
<SubTexture name="bulletRed3.png" x="206" y="528" width="4" height="14"/>
<SubTexture name="bulletRed3_outline.png" x="484" y="130" width="8" height="18"/>
<SubTexture name="bulletSand1.png" x="352" y="555" width="4" height="10"/>
<SubTexture name="bulletSand1_outline.png" x="320" y="551" width="8" height="14"/>
<SubTexture name="bulletSand2.png" x="312" y="551" width="8" height="12"/>
<SubTexture name="bulletSand2_outline.png" x="450" y="455" width="12" height="16"/>
<SubTexture name="bulletSand3.png" x="471" y="297" width="4" height="14"/>
<SubTexture name="bulletSand3_outline.png" x="476" y="130" width="8" height="18"/>
<SubTexture name="crateMetal.png" x="479" y="471" width="28" height="28"/>
<SubTexture name="crateMetal_side.png" x="479" y="443" width="28" height="28"/>
<SubTexture name="crateWood.png" x="480" y="221" width="28" height="28"/>
<SubTexture name="crateWood_side.png" x="480" y="249" width="28" height="28"/>
<SubTexture name="explosion1.png" x="320" y="403" width="60" height="60"/>
<SubTexture name="explosion2.png" x="380" y="471" width="57" height="56"/>
<SubTexture name="explosion3.png" x="0" y="128" width="64" height="63"/>
<SubTexture name="explosion4.png" x="430" y="104" width="46" height="45"/>
<SubTexture name="explosion5.png" x="53" y="512" width="53" height="52"/>
<SubTexture name="explosionSmoke1.png" x="320" y="463" width="60" height="60"/>
<SubTexture name="explosionSmoke2.png" x="382" y="255" width="57" height="56"/>
<SubTexture name="explosionSmoke3.png" x="320" y="192" width="63" height="63"/>
<SubTexture name="explosionSmoke4.png" x="384" y="104" width="46" height="45"/>
<SubTexture name="explosionSmoke5.png" x="0" y="512" width="53" height="52"/>
<SubTexture name="fenceRed.png" x="158" y="528" width="48" height="16"/>
<SubTexture name="fenceYellow.png" x="158" y="512" width="52" height="16"/>
<SubTexture name="oilSpill_large.png" x="262" y="512" width="50" height="50"/>
<SubTexture name="oilSpill_small.png" x="158" y="544" width="14" height="14"/>
<SubTexture name="sandbagBeige.png" x="382" y="371" width="32" height="22"/>
<SubTexture name="sandbagBeige_open.png" x="354" y="527" width="42" height="28"/>
<SubTexture name="sandbagBrown.png" x="439" y="283" width="32" height="22"/>
<SubTexture name="sandbagBrown_open.png" x="312" y="523" width="42" height="28"/>
<SubTexture name="shotLarge.png" x="507" y="539" width="20" height="25"/>
<SubTexture name="shotOrange.png" x="514" y="289" width="16" height="28"/>
<SubTexture name="shotRed.png" x="508" y="221" width="21" height="38"/>
<SubTexture name="shotThin.png" x="546" y="160" width="8" height="26"/>
<SubTexture name="specialBarrel1.png" x="530" y="0" width="14" height="22"/>
<SubTexture name="specialBarrel1_outline.png" x="527" y="539" width="18" height="26"/>
<SubTexture name="specialBarrel2.png" x="544" y="108" width="12" height="24"/>
<SubTexture name="specialBarrel2_outline.png" x="513" y="174" width="16" height="28"/>
<SubTexture name="specialBarrel3.png" x="544" y="132" width="10" height="28"/>
<SubTexture name="specialBarrel3_outline.png" x="530" y="244" width="14" height="32"/>
<SubTexture name="specialBarrel4.png" x="544" y="244" width="10" height="32"/>
<SubTexture name="specialBarrel4_outline.png" x="530" y="276" width="14" height="36"/>
<SubTexture name="specialBarrel5.png" x="531" y="435" width="12" height="26"/>
<SubTexture name="specialBarrel5_outline.png" x="514" y="98" width="16" height="30"/>
<SubTexture name="specialBarrel6.png" x="544" y="276" width="8" height="26"/>
<SubTexture name="specialBarrel6_outline.png" x="533" y="312" width="12" height="30"/>
<SubTexture name="specialBarrel7.png" x="544" y="0" width="8" height="26"/>
<SubTexture name="specialBarrel7_outline.png" x="530" y="68" width="12" height="30"/>
<SubTexture name="tankBlue_barrel1.png" x="531" y="461" width="12" height="26"/>
<SubTexture name="tankBlue_barrel1_outline.png" x="514" y="259" width="16" height="30"/>
<SubTexture name="tankBlue_barrel2.png" x="545" y="302" width="8" height="26"/>
<SubTexture name="tankBlue_barrel2_outline.png" x="542" y="48" width="12" height="30"/>
<SubTexture name="tankBlue_barrel3.png" x="545" y="519" width="8" height="26"/>
<SubTexture name="tankBlue_barrel3_outline.png" x="543" y="459" width="12" height="30"/>
<SubTexture name="tankBody_bigRed.png" x="384" y="56" width="48" height="48"/>
<SubTexture name="tankBody_bigRed_outline.png" x="106" y="512" width="52" height="52"/>
<SubTexture name="tankBody_blue.png" x="396" y="527" width="38" height="38"/>
<SubTexture name="tankBody_blue_outline.png" x="426" y="149" width="42" height="42"/>
<SubTexture name="tankBody_dark.png" x="468" y="149" width="38" height="36"/>
<SubTexture name="tankBody_darkLarge.png" x="384" y="0" width="48" height="56"/>
<SubTexture name="tankBody_darkLarge_outline.png" x="382" y="311" width="52" height="60"/>
<SubTexture name="tankBody_dark_outline.png" x="384" y="149" width="42" height="40"/>
<SubTexture name="tankBody_green.png" x="476" y="283" width="38" height="36"/>
<SubTexture name="tankBody_green_outline.png" x="435" y="191" width="42" height="40"/>
<SubTexture name="tankBody_huge.png" x="380" y="403" width="58" height="68"/>
<SubTexture name="tankBody_huge_outline.png" x="320" y="331" width="62" height="72"/>
<SubTexture name="tankBody_red.png" x="479" y="407" width="34" height="36"/>
<SubTexture name="tankBody_red_outline.png" x="476" y="0" width="38" height="40"/>
<SubTexture name="tankBody_sand.png" x="476" y="94" width="38" height="36"/>
<SubTexture name="tankBody_sand_outline.png" x="437" y="517" width="42" height="40"/>
<SubTexture name="tankDark_barrel1.png" x="543" y="342" width="12" height="26"/>
<SubTexture name="tankDark_barrel1_outline.png" x="514" y="68" width="16" height="30"/>
<SubTexture name="tankDark_barrel2.png" x="545" y="398" width="8" height="26"/>
<SubTexture name="tankDark_barrel2_outline.png" x="531" y="373" width="12" height="30"/>
<SubTexture name="tankDark_barrel3.png" x="553" y="519" width="8" height="26"/>
<SubTexture name="tankDark_barrel3_outline.png" x="543" y="429" width="12" height="30"/>
<SubTexture name="tankGreen_barrel1.png" x="533" y="403" width="12" height="26"/>
<SubTexture name="tankGreen_barrel1_outline.png" x="515" y="377" width="16" height="30"/>
<SubTexture name="tankGreen_barrel2.png" x="553" y="398" width="8" height="26"/>
<SubTexture name="tankGreen_barrel2_outline.png" x="530" y="98" width="12" height="30"/>
<SubTexture name="tankGreen_barrel3.png" x="552" y="276" width="8" height="26"/>
<SubTexture name="tankGreen_barrel3_outline.png" x="531" y="487" width="12" height="30"/>
<SubTexture name="tankRed_barrel1.png" x="531" y="347" width="12" height="26"/>
<SubTexture name="tankRed_barrel1_outline.png" x="514" y="0" width="16" height="30"/>
<SubTexture name="tankRed_barrel2.png" x="546" y="212" width="8" height="26"/>
<SubTexture name="tankRed_barrel2_outline.png" x="543" y="368" width="12" height="30"/>
<SubTexture name="tankRed_barrel3.png" x="553" y="302" width="8" height="26"/>
<SubTexture name="tankRed_barrel3_outline.png" x="532" y="128" width="12" height="30"/>
<SubTexture name="tankSand_barrel1.png" x="532" y="22" width="12" height="26"/>
<SubTexture name="tankSand_barrel1_outline.png" x="515" y="347" width="16" height="30"/>
<SubTexture name="tankSand_barrel2.png" x="546" y="186" width="8" height="26"/>
<SubTexture name="tankSand_barrel2_outline.png" x="542" y="78" width="12" height="30"/>
<SubTexture name="tankSand_barrel3.png" x="552" y="0" width="8" height="26"/>
<SubTexture name="tankSand_barrel3_outline.png" x="543" y="489" width="12" height="30"/>
<SubTexture name="tank_bigRed.png" x="210" y="512" width="52" height="52"/>
<SubTexture name="tank_blue.png" x="432" y="48" width="42" height="46"/>
<SubTexture name="tank_dark.png" x="434" y="311" width="42" height="46"/>
<SubTexture name="tank_darkLarge.png" x="383" y="192" width="52" height="60"/>
<SubTexture name="tank_green.png" x="434" y="357" width="42" height="46"/>
<SubTexture name="tank_huge.png" x="320" y="255" width="62" height="76"/>
<SubTexture name="tank_red.png" x="474" y="48" width="38" height="46"/>
<SubTexture name="tank_sand.png" x="437" y="471" width="42" height="46"/>
<SubTexture name="tileGrass1.png" x="192" y="384" width="64" height="64"/>
<SubTexture name="tileGrass2.png" x="192" y="320" width="64" height="64"/>
<SubTexture name="tileGrass_roadCornerLL.png" x="64" y="320" width="64" height="64"/>
<SubTexture name="tileGrass_roadCornerLR.png" x="64" y="384" width="64" height="64"/>
<SubTexture name="tileGrass_roadCornerUL.png" x="0" y="64" width="64" height="64"/>
<SubTexture name="tileGrass_roadCornerUR.png" x="192" y="256" width="64" height="64"/>
<SubTexture name="tileGrass_roadCrossing.png" x="0" y="319" width="64" height="64"/>
<SubTexture name="tileGrass_roadCrossingRound.png" x="64" y="0" width="64" height="64"/>
<SubTexture name="tileGrass_roadEast.png" x="64" y="128" width="64" height="64"/>
<SubTexture name="tileGrass_roadNorth.png" x="192" y="192" width="64" height="64"/>
<SubTexture name="tileGrass_roadSplitE.png" x="192" y="64" width="64" height="64"/>
<SubTexture name="tileGrass_roadSplitN.png" x="192" y="128" width="64" height="64"/>
<SubTexture name="tileGrass_roadSplitS.png" x="64" y="64" width="64" height="64"/>
<SubTexture name="tileGrass_roadSplitW.png" x="64" y="256" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionE.png" x="192" y="0" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionE_dirt.png" x="320" y="64" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionN.png" x="320" y="0" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionN_dirt.png" x="256" y="448" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionS.png" x="256" y="384" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionS_dirt.png" x="256" y="320" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionW.png" x="256" y="256" width="64" height="64"/>
<SubTexture name="tileGrass_roadTransitionW_dirt.png" x="256" y="192" width="64" height="64"/>
<SubTexture name="tileGrass_transitionE.png" x="256" y="128" width="64" height="64"/>
<SubTexture name="tileGrass_transitionN.png" x="256" y="64" width="64" height="64"/>
<SubTexture name="tileGrass_transitionS.png" x="256" y="0" width="64" height="64"/>
<SubTexture name="tileGrass_transitionW.png" x="192" y="448" width="64" height="64"/>
<SubTexture name="tileSand1.png" x="128" y="0" width="64" height="64"/>
<SubTexture name="tileSand2.png" x="64" y="448" width="64" height="64"/>
<SubTexture name="tileSand_roadCornerLL.png" x="0" y="255" width="64" height="64"/>
<SubTexture name="tileSand_roadCornerLR.png" x="0" y="191" width="64" height="64"/>
<SubTexture name="tileSand_roadCornerUL.png" x="0" y="0" width="64" height="64"/>
<SubTexture name="tileSand_roadCornerUR.png" x="0" y="383" width="64" height="64"/>
<SubTexture name="tileSand_roadCrossing.png" x="320" y="128" width="64" height="64"/>
<SubTexture name="tileSand_roadCrossingRound.png" x="128" y="448" width="64" height="64"/>
<SubTexture name="tileSand_roadEast.png" x="128" y="384" width="64" height="64"/>
<SubTexture name="tileSand_roadNorth.png" x="128" y="320" width="64" height="64"/>
<SubTexture name="tileSand_roadSplitE.png" x="128" y="256" width="64" height="64"/>
<SubTexture name="tileSand_roadSplitN.png" x="128" y="192" width="64" height="64"/>
<SubTexture name="tileSand_roadSplitS.png" x="128" y="128" width="64" height="64"/>
<SubTexture name="tileSand_roadSplitW.png" x="128" y="64" width="64" height="64"/>
<SubTexture name="tracksDouble.png" x="438" y="403" width="41" height="52"/>
<SubTexture name="tracksLarge.png" x="439" y="231" width="41" height="52"/>
<SubTexture name="tracksSmall.png" x="476" y="319" width="37" height="52"/>
<SubTexture name="treeBrown_large.png" x="64" y="192" width="64" height="64"/>
<SubTexture name="treeBrown_leaf.png" x="312" y="512" width="8" height="10"/>
<SubTexture name="treeBrown_small.png" x="479" y="371" width="36" height="36"/>
<SubTexture name="treeBrown_twigs.png" x="506" y="130" width="26" height="22"/>
<SubTexture name="treeGreen_large.png" x="0" y="447" width="64" height="64"/>
<SubTexture name="treeGreen_leaf.png" x="328" y="555" width="8" height="10"/>
<SubTexture name="treeGreen_small.png" x="477" y="185" width="36" height="36"/>
<SubTexture name="treeGreen_twigs.png" x="506" y="152" width="26" height="22"/>
<SubTexture name="wireCrooked.png" x="432" y="0" width="44" height="48"/>
<SubTexture name="wireStraight.png" x="529" y="174" width="17" height="70"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

@ -0,0 +1,189 @@
<TextureAtlas imagePath="allSprites_retina.png">
<SubTexture name="barrelBlack_side.png" x="1016" y="510" width="40" height="56"/>
<SubTexture name="barrelBlack_top.png" x="1014" y="1032" width="48" height="48"/>
<SubTexture name="barrelGreen_side.png" x="1024" y="0" width="40" height="56"/>
<SubTexture name="barrelGreen_top.png" x="1012" y="809" width="48" height="48"/>
<SubTexture name="barrelRed_side.png" x="828" y="740" width="40" height="56"/>
<SubTexture name="barrelRed_top.png" x="1014" y="984" width="48" height="48"/>
<SubTexture name="barrelRust_side.png" x="1016" y="753" width="40" height="56"/>
<SubTexture name="barrelRust_top.png" x="1014" y="936" width="48" height="48"/>
<SubTexture name="barricadeMetal.png" x="958" y="936" width="56" height="56"/>
<SubTexture name="barricadeWood.png" x="958" y="1048" width="56" height="56"/>
<SubTexture name="bulletBlue1.png" x="1006" y="1104" width="8" height="20"/>
<SubTexture name="bulletBlue1_outline.png" x="1106" y="1069" width="16" height="28"/>
<SubTexture name="bulletBlue2.png" x="990" y="1104" width="16" height="24"/>
<SubTexture name="bulletBlue2_outline.png" x="1026" y="705" width="24" height="32"/>
<SubTexture name="bulletBlue3.png" x="870" y="465" width="8" height="28"/>
<SubTexture name="bulletBlue3_outline.png" x="1107" y="240" width="16" height="36"/>
<SubTexture name="bulletDark1.png" x="228" y="1024" width="8" height="20"/>
<SubTexture name="bulletDark1_outline.png" x="1106" y="1097" width="16" height="28"/>
<SubTexture name="bulletDark2.png" x="974" y="1104" width="16" height="24"/>
<SubTexture name="bulletDark2_outline.png" x="1085" y="654" width="24" height="32"/>
<SubTexture name="bulletDark3.png" x="1024" y="158" width="8" height="28"/>
<SubTexture name="bulletDark3_outline.png" x="1106" y="492" width="16" height="36"/>
<SubTexture name="bulletGreen1.png" x="308" y="1104" width="8" height="20"/>
<SubTexture name="bulletGreen1_outline.png" x="1106" y="412" width="16" height="28"/>
<SubTexture name="bulletGreen2.png" x="684" y="1099" width="16" height="24"/>
<SubTexture name="bulletGreen2_outline.png" x="1066" y="1069" width="24" height="32"/>
<SubTexture name="bulletGreen3.png" x="700" y="1099" width="8" height="28"/>
<SubTexture name="bulletGreen3_outline.png" x="1105" y="204" width="16" height="36"/>
<SubTexture name="bulletRed1.png" x="236" y="1024" width="8" height="20"/>
<SubTexture name="bulletRed1_outline.png" x="668" y="1099" width="16" height="28"/>
<SubTexture name="bulletRed2.png" x="958" y="1104" width="16" height="24"/>
<SubTexture name="bulletRed2_outline.png" x="1061" y="654" width="24" height="32"/>
<SubTexture name="bulletRed3.png" x="308" y="1076" width="8" height="28"/>
<SubTexture name="bulletRed3_outline.png" x="1064" y="60" width="16" height="36"/>
<SubTexture name="bulletSand1.png" x="212" y="1108" width="8" height="20"/>
<SubTexture name="bulletSand1_outline.png" x="652" y="1099" width="16" height="28"/>
<SubTexture name="bulletSand2.png" x="1090" y="518" width="16" height="24"/>
<SubTexture name="bulletSand2_outline.png" x="1084" y="120" width="24" height="32"/>
<SubTexture name="bulletSand3.png" x="952" y="753" width="8" height="28"/>
<SubTexture name="bulletSand3_outline.png" x="930" y="569" width="16" height="36"/>
<SubTexture name="crateMetal.png" x="958" y="992" width="56" height="56"/>
<SubTexture name="crateMetal_side.png" x="960" y="434" width="56" height="56"/>
<SubTexture name="crateWood.png" x="960" y="753" width="56" height="56"/>
<SubTexture name="crateWood_side.png" x="960" y="490" width="56" height="56"/>
<SubTexture name="explosion1.png" x="640" y="804" width="120" height="120"/>
<SubTexture name="explosion2.png" x="764" y="508" width="114" height="112"/>
<SubTexture name="explosion3.png" x="640" y="256" width="127" height="126"/>
<SubTexture name="explosion4.png" x="860" y="96" width="92" height="90"/>
<SubTexture name="explosion5.png" x="0" y="1024" width="106" height="104"/>
<SubTexture name="explosionSmoke1.png" x="640" y="924" width="120" height="120"/>
<SubTexture name="explosionSmoke2.png" x="760" y="940" width="114" height="112"/>
<SubTexture name="explosionSmoke3.png" x="640" y="382" width="126" height="126"/>
<SubTexture name="explosionSmoke4.png" x="768" y="96" width="92" height="90"/>
<SubTexture name="explosionSmoke5.png" x="106" y="1024" width="106" height="104"/>
<SubTexture name="fenceRed.png" x="212" y="1076" width="96" height="32"/>
<SubTexture name="fenceYellow.png" x="212" y="1044" width="104" height="32"/>
<SubTexture name="oilSpill_large.png" x="524" y="1024" width="100" height="100"/>
<SubTexture name="oilSpill_small.png" x="624" y="1099" width="28" height="28"/>
<SubTexture name="sandbagBeige.png" x="768" y="186" width="64" height="44"/>
<SubTexture name="sandbagBeige_open.png" x="624" y="1044" width="84" height="55"/>
<SubTexture name="sandbagBrown.png" x="764" y="740" width="64" height="44"/>
<SubTexture name="sandbagBrown_open.png" x="708" y="1052" width="84" height="55"/>
<SubTexture name="shotLarge.png" x="1024" y="56" width="40" height="50"/>
<SubTexture name="shotOrange.png" x="1033" y="214" width="32" height="56"/>
<SubTexture name="shotRed.png" x="1016" y="434" width="42" height="76"/>
<SubTexture name="shotThin.png" x="1106" y="440" width="16" height="52"/>
<SubTexture name="specialBarrel1.png" x="1014" y="1080" width="28" height="44"/>
<SubTexture name="specialBarrel1_outline.png" x="1024" y="106" width="36" height="52"/>
<SubTexture name="specialBarrel2.png" x="1042" y="1080" width="24" height="48"/>
<SubTexture name="specialBarrel2_outline.png" x="1033" y="158" width="32" height="56"/>
<SubTexture name="specialBarrel3.png" x="1088" y="0" width="20" height="56"/>
<SubTexture name="specialBarrel3_outline.png" x="832" y="186" width="28" height="64"/>
<SubTexture name="specialBarrel4.png" x="1088" y="746" width="20" height="64"/>
<SubTexture name="specialBarrel4_outline.png" x="1060" y="765" width="28" height="72"/>
<SubTexture name="specialBarrel5.png" x="1060" y="106" width="24" height="52"/>
<SubTexture name="specialBarrel5_outline.png" x="1058" y="362" width="32" height="60"/>
<SubTexture name="specialBarrel6.png" x="1089" y="152" width="16" height="52"/>
<SubTexture name="specialBarrel6_outline.png" x="1062" y="897" width="24" height="60"/>
<SubTexture name="specialBarrel7.png" x="1106" y="360" width="16" height="52"/>
<SubTexture name="specialBarrel7_outline.png" x="1062" y="1009" width="24" height="60"/>
<SubTexture name="tankBlue_barrel1.png" x="1086" y="957" width="24" height="52"/>
<SubTexture name="tankBlue_barrel1_outline.png" x="1058" y="422" width="32" height="60"/>
<SubTexture name="tankBlue_barrel2.png" x="1090" y="1069" width="16" height="52"/>
<SubTexture name="tankBlue_barrel2_outline.png" x="1060" y="837" width="24" height="60"/>
<SubTexture name="tankBlue_barrel3.png" x="1090" y="466" width="16" height="52"/>
<SubTexture name="tankBlue_barrel3_outline.png" x="1061" y="542" width="24" height="60"/>
<SubTexture name="tankBody_bigRed.png" x="768" y="0" width="96" height="96"/>
<SubTexture name="tankBody_bigRed_outline.png" x="420" y="1024" width="104" height="104"/>
<SubTexture name="tankBody_blue.png" x="792" y="1052" width="76" height="76"/>
<SubTexture name="tankBody_blue_outline.png" x="868" y="620" width="84" height="84"/>
<SubTexture name="tankBody_dark.png" x="876" y="864" width="76" height="72"/>
<SubTexture name="tankBody_darkLarge.png" x="767" y="256" width="96" height="112"/>
<SubTexture name="tankBody_darkLarge_outline.png" x="764" y="620" width="104" height="120"/>
<SubTexture name="tankBody_dark_outline.png" x="868" y="704" width="84" height="80"/>
<SubTexture name="tankBody_green.png" x="947" y="290" width="76" height="72"/>
<SubTexture name="tankBody_green_outline.png" x="874" y="1032" width="84" height="80"/>
<SubTexture name="tankBody_huge.png" x="760" y="804" width="116" height="136"/>
<SubTexture name="tankBody_huge_outline.png" x="640" y="660" width="124" height="144"/>
<SubTexture name="tankBody_red.png" x="1023" y="290" width="68" height="72"/>
<SubTexture name="tankBody_red_outline.png" x="952" y="569" width="76" height="80"/>
<SubTexture name="tankBody_sand.png" x="952" y="864" width="76" height="72"/>
<SubTexture name="tankBody_sand_outline.png" x="876" y="784" width="84" height="80"/>
<SubTexture name="tankDark_barrel1.png" x="1085" y="602" width="24" height="52"/>
<SubTexture name="tankDark_barrel1_outline.png" x="1056" y="705" width="32" height="60"/>
<SubTexture name="tankDark_barrel2.png" x="1091" y="308" width="16" height="52"/>
<SubTexture name="tankDark_barrel2_outline.png" x="1084" y="837" width="24" height="60"/>
<SubTexture name="tankDark_barrel3.png" x="1107" y="276" width="16" height="52"/>
<SubTexture name="tankDark_barrel3_outline.png" x="1065" y="210" width="24" height="60"/>
<SubTexture name="tankGreen_barrel1.png" x="1062" y="957" width="24" height="52"/>
<SubTexture name="tankGreen_barrel1_outline.png" x="1028" y="857" width="32" height="60"/>
<SubTexture name="tankGreen_barrel2.png" x="1108" y="746" width="16" height="52"/>
<SubTexture name="tankGreen_barrel2_outline.png" x="1086" y="897" width="24" height="60"/>
<SubTexture name="tankGreen_barrel3.png" x="1089" y="204" width="16" height="52"/>
<SubTexture name="tankGreen_barrel3_outline.png" x="1086" y="1009" width="24" height="60"/>
<SubTexture name="tankRed_barrel1.png" x="1061" y="602" width="24" height="52"/>
<SubTexture name="tankRed_barrel1_outline.png" x="1026" y="362" width="32" height="60"/>
<SubTexture name="tankRed_barrel2.png" x="1090" y="414" width="16" height="52"/>
<SubTexture name="tankRed_barrel2_outline.png" x="1085" y="542" width="24" height="60"/>
<SubTexture name="tankRed_barrel3.png" x="1090" y="362" width="16" height="52"/>
<SubTexture name="tankRed_barrel3_outline.png" x="1088" y="686" width="24" height="60"/>
<SubTexture name="tankSand_barrel1.png" x="1065" y="158" width="24" height="52"/>
<SubTexture name="tankSand_barrel1_outline.png" x="1058" y="482" width="32" height="60"/>
<SubTexture name="tankSand_barrel2.png" x="1105" y="152" width="16" height="52"/>
<SubTexture name="tankSand_barrel2_outline.png" x="1064" y="0" width="24" height="60"/>
<SubTexture name="tankSand_barrel3.png" x="1091" y="256" width="16" height="52"/>
<SubTexture name="tankSand_barrel3_outline.png" x="1084" y="60" width="24" height="60"/>
<SubTexture name="tank_bigRed.png" x="316" y="1024" width="104" height="104"/>
<SubTexture name="tank_blue.png" x="874" y="940" width="84" height="92"/>
<SubTexture name="tank_dark.png" x="870" y="373" width="84" height="92"/>
<SubTexture name="tank_darkLarge.png" x="766" y="382" width="104" height="120"/>
<SubTexture name="tank_green.png" x="864" y="0" width="84" height="92"/>
<SubTexture name="tank_huge.png" x="640" y="508" width="124" height="152"/>
<SubTexture name="tank_red.png" x="948" y="0" width="76" height="92"/>
<SubTexture name="tank_sand.png" x="863" y="281" width="84" height="92"/>
<SubTexture name="tileGrass1.png" x="384" y="896" width="128" height="128"/>
<SubTexture name="tileGrass2.png" x="384" y="256" width="128" height="128"/>
<SubTexture name="tileGrass_roadCornerLL.png" x="0" y="512" width="128" height="128"/>
<SubTexture name="tileGrass_roadCornerLR.png" x="0" y="640" width="128" height="128"/>
<SubTexture name="tileGrass_roadCornerUL.png" x="128" y="256" width="128" height="128"/>
<SubTexture name="tileGrass_roadCornerUR.png" x="128" y="384" width="128" height="128"/>
<SubTexture name="tileGrass_roadCrossing.png" x="128" y="640" width="128" height="128"/>
<SubTexture name="tileGrass_roadCrossingRound.png" x="384" y="512" width="128" height="128"/>
<SubTexture name="tileGrass_roadEast.png" x="0" y="768" width="128" height="128"/>
<SubTexture name="tileGrass_roadNorth.png" x="128" y="896" width="128" height="128"/>
<SubTexture name="tileGrass_roadSplitE.png" x="128" y="768" width="128" height="128"/>
<SubTexture name="tileGrass_roadSplitN.png" x="384" y="384" width="128" height="128"/>
<SubTexture name="tileGrass_roadSplitS.png" x="384" y="768" width="128" height="128"/>
<SubTexture name="tileGrass_roadSplitW.png" x="512" y="512" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionE.png" x="512" y="640" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionE_dirt.png" x="512" y="768" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionN.png" x="512" y="384" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionN_dirt.png" x="640" y="0" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionS.png" x="512" y="896" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionS_dirt.png" x="0" y="0" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionW.png" x="0" y="256" width="128" height="128"/>
<SubTexture name="tileGrass_roadTransitionW_dirt.png" x="0" y="128" width="128" height="128"/>
<SubTexture name="tileGrass_transitionE.png" x="640" y="128" width="128" height="128"/>
<SubTexture name="tileGrass_transitionN.png" x="512" y="256" width="128" height="128"/>
<SubTexture name="tileGrass_transitionS.png" x="512" y="128" width="128" height="128"/>
<SubTexture name="tileGrass_transitionW.png" x="512" y="0" width="128" height="128"/>
<SubTexture name="tileSand1.png" x="256" y="128" width="128" height="128"/>
<SubTexture name="tileSand2.png" x="256" y="0" width="128" height="128"/>
<SubTexture name="tileSand_roadCornerLL.png" x="384" y="640" width="128" height="128"/>
<SubTexture name="tileSand_roadCornerLR.png" x="0" y="896" width="128" height="128"/>
<SubTexture name="tileSand_roadCornerUL.png" x="128" y="128" width="128" height="128"/>
<SubTexture name="tileSand_roadCornerUR.png" x="0" y="384" width="128" height="128"/>
<SubTexture name="tileSand_roadCrossing.png" x="384" y="128" width="128" height="128"/>
<SubTexture name="tileSand_roadCrossingRound.png" x="384" y="0" width="128" height="128"/>
<SubTexture name="tileSand_roadEast.png" x="256" y="896" width="128" height="128"/>
<SubTexture name="tileSand_roadNorth.png" x="256" y="768" width="128" height="128"/>
<SubTexture name="tileSand_roadSplitE.png" x="256" y="640" width="128" height="128"/>
<SubTexture name="tileSand_roadSplitN.png" x="256" y="512" width="128" height="128"/>
<SubTexture name="tileSand_roadSplitS.png" x="256" y="384" width="128" height="128"/>
<SubTexture name="tileSand_roadSplitW.png" x="256" y="256" width="128" height="128"/>
<SubTexture name="tracksDouble.png" x="951" y="186" width="82" height="104"/>
<SubTexture name="tracksLarge.png" x="878" y="465" width="82" height="104"/>
<SubTexture name="tracksSmall.png" x="952" y="649" width="74" height="104"/>
<SubTexture name="treeBrown_large.png" x="128" y="512" width="128" height="128"/>
<SubTexture name="treeBrown_leaf.png" x="212" y="1024" width="16" height="20"/>
<SubTexture name="treeBrown_small.png" x="952" y="92" width="72" height="72"/>
<SubTexture name="treeBrown_twigs.png" x="878" y="569" width="52" height="44"/>
<SubTexture name="treeGreen_large.png" x="128" y="0" width="128" height="128"/>
<SubTexture name="treeGreen_leaf.png" x="624" y="1024" width="16" height="20"/>
<SubTexture name="treeGreen_small.png" x="954" y="362" width="72" height="72"/>
<SubTexture name="treeGreen_twigs.png" x="960" y="809" width="52" height="44"/>
<SubTexture name="wireCrooked.png" x="863" y="186" width="88" height="95"/>
<SubTexture name="wireStraight.png" x="1028" y="566" width="33" height="139"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,149 @@
<TextureAtlas imagePath="onlyObjects_default.png">
<SubTexture name="barrelBlack_side.png" x="323" y="150" width="20" height="28"/>
<SubTexture name="barrelBlack_top.png" x="299" y="150" width="24" height="24"/>
<SubTexture name="barrelGreen_side.png" x="324" y="359" width="20" height="28"/>
<SubTexture name="barrelGreen_top.png" x="300" y="366" width="24" height="24"/>
<SubTexture name="barrelRed_side.png" x="324" y="206" width="20" height="28"/>
<SubTexture name="barrelRed_top.png" x="300" y="342" width="24" height="24"/>
<SubTexture name="barrelRust_side.png" x="324" y="178" width="20" height="28"/>
<SubTexture name="barrelRust_top.png" x="300" y="318" width="24" height="24"/>
<SubTexture name="barricadeMetal.png" x="296" y="184" width="28" height="28"/>
<SubTexture name="barricadeWood.png" x="298" y="72" width="28" height="28"/>
<SubTexture name="bulletBlue1.png" x="194" y="46" width="4" height="10"/>
<SubTexture name="bulletBlue1_outline.png" x="181" y="106" width="8" height="14"/>
<SubTexture name="bulletBlue2.png" x="173" y="106" width="8" height="12"/>
<SubTexture name="bulletBlue2_outline.png" x="136" y="310" width="12" height="16"/>
<SubTexture name="bulletBlue3.png" x="201" y="106" width="4" height="14"/>
<SubTexture name="bulletBlue3_outline.png" x="370" y="188" width="8" height="18"/>
<SubTexture name="bulletDark1.png" x="189" y="106" width="4" height="10"/>
<SubTexture name="bulletDark1_outline.png" x="80" y="176" width="8" height="14"/>
<SubTexture name="bulletDark2.png" x="370" y="104" width="8" height="12"/>
<SubTexture name="bulletDark2_outline.png" x="148" y="310" width="12" height="16"/>
<SubTexture name="bulletDark3.png" x="197" y="106" width="4" height="14"/>
<SubTexture name="bulletDark3_outline.png" x="370" y="86" width="8" height="18"/>
<SubTexture name="bulletGreen1.png" x="190" y="46" width="4" height="10"/>
<SubTexture name="bulletGreen1_outline.png" x="310" y="22" width="8" height="14"/>
<SubTexture name="bulletGreen2.png" x="112" y="176" width="8" height="12"/>
<SubTexture name="bulletGreen2_outline.png" x="124" y="310" width="12" height="16"/>
<SubTexture name="bulletGreen3.png" x="186" y="46" width="4" height="14"/>
<SubTexture name="bulletGreen3_outline.png" x="370" y="224" width="8" height="18"/>
<SubTexture name="bulletRed1.png" x="120" y="244" width="4" height="10"/>
<SubTexture name="bulletRed1_outline.png" x="96" y="176" width="8" height="14"/>
<SubTexture name="bulletRed2.png" x="88" y="176" width="8" height="12"/>
<SubTexture name="bulletRed2_outline.png" x="160" y="310" width="12" height="16"/>
<SubTexture name="bulletRed3.png" x="182" y="46" width="4" height="14"/>
<SubTexture name="bulletRed3_outline.png" x="206" y="272" width="8" height="18"/>
<SubTexture name="bulletSand1.png" x="198" y="46" width="4" height="10"/>
<SubTexture name="bulletSand1_outline.png" x="72" y="176" width="8" height="14"/>
<SubTexture name="bulletSand2.png" x="64" y="176" width="8" height="12"/>
<SubTexture name="bulletSand2_outline.png" x="359" y="142" width="12" height="16"/>
<SubTexture name="bulletSand3.png" x="193" y="106" width="4" height="14"/>
<SubTexture name="bulletSand3_outline.png" x="370" y="206" width="8" height="18"/>
<SubTexture name="crateMetal.png" x="298" y="100" width="28" height="28"/>
<SubTexture name="crateMetal_side.png" x="298" y="240" width="28" height="28"/>
<SubTexture name="crateWood.png" x="296" y="212" width="28" height="28"/>
<SubTexture name="crateWood_side.png" x="298" y="268" width="28" height="28"/>
<SubTexture name="explosion1.png" x="0" y="326" width="60" height="60"/>
<SubTexture name="explosion2.png" x="64" y="68" width="57" height="56"/>
<SubTexture name="explosion3.png" x="0" y="128" width="64" height="63"/>
<SubTexture name="explosion4.png" x="218" y="350" width="46" height="45"/>
<SubTexture name="explosion5.png" x="64" y="124" width="53" height="52"/>
<SubTexture name="explosionSmoke1.png" x="60" y="330" width="60" height="60"/>
<SubTexture name="explosionSmoke2.png" x="63" y="191" width="57" height="56"/>
<SubTexture name="explosionSmoke3.png" x="0" y="191" width="63" height="63"/>
<SubTexture name="explosionSmoke4.png" x="172" y="350" width="46" height="45"/>
<SubTexture name="explosionSmoke5.png" x="117" y="124" width="53" height="52"/>
<SubTexture name="fenceRed.png" x="124" y="294" width="48" height="16"/>
<SubTexture name="fenceYellow.png" x="120" y="228" width="52" height="16"/>
<SubTexture name="oilSpill_large.png" x="124" y="244" width="50" height="50"/>
<SubTexture name="oilSpill_small.png" x="296" y="22" width="14" height="14"/>
<SubTexture name="sandbagBeige.png" x="174" y="272" width="32" height="22"/>
<SubTexture name="sandbagBeige_open.png" x="172" y="216" width="42" height="28"/>
<SubTexture name="sandbagBrown.png" x="296" y="0" width="32" height="22"/>
<SubTexture name="sandbagBrown_open.png" x="174" y="244" width="42" height="28"/>
<SubTexture name="shotLarge.png" x="324" y="334" width="20" height="25"/>
<SubTexture name="shotOrange.png" x="342" y="234" width="16" height="28"/>
<SubTexture name="shotRed.png" x="324" y="296" width="21" height="38"/>
<SubTexture name="shotThin.png" x="370" y="0" width="8" height="26"/>
<SubTexture name="specialBarrel1.png" x="325" y="128" width="14" height="22"/>
<SubTexture name="specialBarrel1_outline.png" x="326" y="72" width="18" height="26"/>
<SubTexture name="specialBarrel2.png" x="344" y="366" width="12" height="24"/>
<SubTexture name="specialBarrel2_outline.png" x="342" y="262" width="16" height="28"/>
<SubTexture name="specialBarrel3.png" x="370" y="306" width="10" height="28"/>
<SubTexture name="specialBarrel3_outline.png" x="344" y="334" width="14" height="32"/>
<SubTexture name="specialBarrel4.png" x="369" y="274" width="10" height="32"/>
<SubTexture name="specialBarrel4_outline.png" x="344" y="188" width="14" height="36"/>
<SubTexture name="specialBarrel5.png" x="358" y="188" width="12" height="26"/>
<SubTexture name="specialBarrel5_outline.png" x="326" y="234" width="16" height="30"/>
<SubTexture name="specialBarrel6.png" x="370" y="26" width="8" height="26"/>
<SubTexture name="specialBarrel6_outline.png" x="346" y="0" width="12" height="30"/>
<SubTexture name="specialBarrel7.png" x="370" y="242" width="8" height="26"/>
<SubTexture name="specialBarrel7_outline.png" x="345" y="290" width="12" height="30"/>
<SubTexture name="tankBlue_barrel1.png" x="358" y="90" width="12" height="26"/>
<SubTexture name="tankBlue_barrel1_outline.png" x="326" y="264" width="16" height="30"/>
<SubTexture name="tankBlue_barrel2.png" x="372" y="142" width="8" height="26"/>
<SubTexture name="tankBlue_barrel2_outline.png" x="368" y="350" width="12" height="30"/>
<SubTexture name="tankBlue_barrel3.png" x="378" y="220" width="8" height="26"/>
<SubTexture name="tankBlue_barrel3_outline.png" x="360" y="158" width="12" height="30"/>
<SubTexture name="tankBody_bigRed.png" x="170" y="120" width="48" height="48"/>
<SubTexture name="tankBody_bigRed_outline.png" x="121" y="68" width="52" height="52"/>
<SubTexture name="tankBody_blue.png" x="257" y="42" width="38" height="38"/>
<SubTexture name="tankBody_blue_outline.png" x="216" y="0" width="42" height="42"/>
<SubTexture name="tankBody_dark.png" x="218" y="132" width="38" height="36"/>
<SubTexture name="tankBody_darkLarge.png" x="172" y="294" width="48" height="56"/>
<SubTexture name="tankBody_darkLarge_outline.png" x="120" y="330" width="52" height="60"/>
<SubTexture name="tankBody_dark_outline.png" x="216" y="168" width="42" height="40"/>
<SubTexture name="tankBody_green.png" x="258" y="230" width="38" height="36"/>
<SubTexture name="tankBody_green_outline.png" x="216" y="208" width="42" height="40"/>
<SubTexture name="tankBody_huge.png" x="64" y="0" width="58" height="68"/>
<SubTexture name="tankBody_huge_outline.png" x="0" y="254" width="62" height="72"/>
<SubTexture name="tankBody_red.png" x="295" y="36" width="34" height="36"/>
<SubTexture name="tankBody_red_outline.png" x="260" y="80" width="38" height="40"/>
<SubTexture name="tankBody_sand.png" x="258" y="0" width="38" height="36"/>
<SubTexture name="tankBody_sand_outline.png" x="218" y="92" width="42" height="40"/>
<SubTexture name="tankDark_barrel1.png" x="344" y="70" width="12" height="26"/>
<SubTexture name="tankDark_barrel1_outline.png" x="326" y="98" width="16" height="30"/>
<SubTexture name="tankDark_barrel2.png" x="378" y="0" width="8" height="26"/>
<SubTexture name="tankDark_barrel2_outline.png" x="357" y="290" width="12" height="30"/>
<SubTexture name="tankDark_barrel3.png" x="379" y="112" width="8" height="26"/>
<SubTexture name="tankDark_barrel3_outline.png" x="346" y="30" width="12" height="30"/>
<SubTexture name="tankGreen_barrel1.png" x="359" y="116" width="12" height="26"/>
<SubTexture name="tankGreen_barrel1_outline.png" x="344" y="158" width="16" height="30"/>
<SubTexture name="tankGreen_barrel2.png" x="378" y="26" width="8" height="26"/>
<SubTexture name="tankGreen_barrel2_outline.png" x="358" y="214" width="12" height="30"/>
<SubTexture name="tankGreen_barrel3.png" x="378" y="86" width="8" height="26"/>
<SubTexture name="tankGreen_barrel3_outline.png" x="358" y="30" width="12" height="30"/>
<SubTexture name="tankRed_barrel1.png" x="368" y="60" width="12" height="26"/>
<SubTexture name="tankRed_barrel1_outline.png" x="343" y="128" width="16" height="30"/>
<SubTexture name="tankRed_barrel2.png" x="378" y="194" width="8" height="26"/>
<SubTexture name="tankRed_barrel2_outline.png" x="356" y="60" width="12" height="30"/>
<SubTexture name="tankRed_barrel3.png" x="378" y="246" width="8" height="26"/>
<SubTexture name="tankRed_barrel3_outline.png" x="358" y="320" width="12" height="30"/>
<SubTexture name="tankSand_barrel1.png" x="356" y="366" width="12" height="26"/>
<SubTexture name="tankSand_barrel1_outline.png" x="342" y="98" width="16" height="30"/>
<SubTexture name="tankSand_barrel2.png" x="378" y="168" width="8" height="26"/>
<SubTexture name="tankSand_barrel2_outline.png" x="358" y="244" width="12" height="30"/>
<SubTexture name="tankSand_barrel3.png" x="371" y="116" width="8" height="26"/>
<SubTexture name="tankSand_barrel3_outline.png" x="358" y="0" width="12" height="30"/>
<SubTexture name="tank_bigRed.png" x="120" y="176" width="52" height="52"/>
<SubTexture name="tank_blue.png" x="173" y="60" width="42" height="46"/>
<SubTexture name="tank_dark.png" x="174" y="0" width="42" height="46"/>
<SubTexture name="tank_darkLarge.png" x="122" y="0" width="52" height="60"/>
<SubTexture name="tank_green.png" x="215" y="46" width="42" height="46"/>
<SubTexture name="tank_huge.png" x="62" y="254" width="62" height="76"/>
<SubTexture name="tank_red.png" x="258" y="184" width="38" height="46"/>
<SubTexture name="tank_sand.png" x="216" y="248" width="42" height="46"/>
<SubTexture name="tracksDouble.png" x="220" y="294" width="41" height="52"/>
<SubTexture name="tracksLarge.png" x="258" y="132" width="41" height="52"/>
<SubTexture name="tracksSmall.png" x="261" y="266" width="37" height="52"/>
<SubTexture name="treeBrown_large.png" x="0" y="64" width="64" height="64"/>
<SubTexture name="treeBrown_leaf.png" x="174" y="46" width="8" height="10"/>
<SubTexture name="treeBrown_small.png" x="264" y="354" width="36" height="36"/>
<SubTexture name="treeBrown_twigs.png" x="299" y="128" width="26" height="22"/>
<SubTexture name="treeGreen_large.png" x="0" y="0" width="64" height="64"/>
<SubTexture name="treeGreen_leaf.png" x="104" y="176" width="8" height="10"/>
<SubTexture name="treeGreen_small.png" x="264" y="318" width="36" height="36"/>
<SubTexture name="treeGreen_twigs.png" x="298" y="296" width="26" height="22"/>
<SubTexture name="wireCrooked.png" x="172" y="168" width="44" height="48"/>
<SubTexture name="wireStraight.png" x="329" y="0" width="17" height="70"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@ -0,0 +1,149 @@
<TextureAtlas imagePath="onlyObjects_retina.png">
<SubTexture name="barrelBlack_side.png" x="652" y="532" width="40" height="56"/>
<SubTexture name="barrelBlack_top.png" x="645" y="220" width="48" height="48"/>
<SubTexture name="barrelGreen_side.png" x="652" y="476" width="40" height="56"/>
<SubTexture name="barrelGreen_top.png" x="597" y="220" width="48" height="48"/>
<SubTexture name="barrelRed_side.png" x="648" y="420" width="40" height="56"/>
<SubTexture name="barrelRed_top.png" x="645" y="172" width="48" height="48"/>
<SubTexture name="barrelRust_side.png" x="652" y="588" width="40" height="56"/>
<SubTexture name="barrelRust_top.png" x="597" y="172" width="48" height="48"/>
<SubTexture name="barricadeMetal.png" x="596" y="532" width="56" height="56"/>
<SubTexture name="barricadeWood.png" x="596" y="72" width="56" height="56"/>
<SubTexture name="bulletBlue1.png" x="232" y="216" width="8" height="20"/>
<SubTexture name="bulletBlue1_outline.png" x="570" y="584" width="16" height="28"/>
<SubTexture name="bulletBlue2.png" x="323" y="368" width="16" height="24"/>
<SubTexture name="bulletBlue2_outline.png" x="484" y="388" width="24" height="32"/>
<SubTexture name="bulletBlue3.png" x="332" y="624" width="8" height="28"/>
<SubTexture name="bulletBlue3_outline.png" x="576" y="348" width="16" height="36"/>
<SubTexture name="bulletDark1.png" x="372" y="573" width="8" height="20"/>
<SubTexture name="bulletDark1_outline.png" x="560" y="348" width="16" height="28"/>
<SubTexture name="bulletDark2.png" x="291" y="368" width="16" height="24"/>
<SubTexture name="bulletDark2_outline.png" x="696" y="744" width="24" height="32"/>
<SubTexture name="bulletDark3.png" x="423" y="308" width="8" height="28"/>
<SubTexture name="bulletDark3_outline.png" x="544" y="348" width="16" height="36"/>
<SubTexture name="bulletGreen1.png" x="232" y="236" width="8" height="20"/>
<SubTexture name="bulletGreen1_outline.png" x="407" y="308" width="16" height="28"/>
<SubTexture name="bulletGreen2.png" x="259" y="368" width="16" height="24"/>
<SubTexture name="bulletGreen2_outline.png" x="460" y="388" width="24" height="32"/>
<SubTexture name="bulletGreen3.png" x="432" y="518" width="8" height="28"/>
<SubTexture name="bulletGreen3_outline.png" x="538" y="584" width="16" height="36"/>
<SubTexture name="bulletRed1.png" x="380" y="573" width="8" height="20"/>
<SubTexture name="bulletRed1_outline.png" x="391" y="308" width="16" height="28"/>
<SubTexture name="bulletRed2.png" x="275" y="368" width="16" height="24"/>
<SubTexture name="bulletRed2_outline.png" x="436" y="388" width="24" height="32"/>
<SubTexture name="bulletRed3.png" x="332" y="596" width="8" height="28"/>
<SubTexture name="bulletRed3_outline.png" x="522" y="584" width="16" height="36"/>
<SubTexture name="bulletSand1.png" x="364" y="573" width="8" height="20"/>
<SubTexture name="bulletSand1_outline.png" x="375" y="308" width="16" height="28"/>
<SubTexture name="bulletSand2.png" x="243" y="368" width="16" height="24"/>
<SubTexture name="bulletSand2_outline.png" x="520" y="348" width="24" height="32"/>
<SubTexture name="bulletSand3.png" x="508" y="388" width="8" height="28"/>
<SubTexture name="bulletSand3_outline.png" x="554" y="584" width="16" height="36"/>
<SubTexture name="crateMetal.png" x="596" y="588" width="56" height="56"/>
<SubTexture name="crateMetal_side.png" x="596" y="268" width="56" height="56"/>
<SubTexture name="crateWood.png" x="596" y="476" width="56" height="56"/>
<SubTexture name="crateWood_side.png" x="592" y="420" width="56" height="56"/>
<SubTexture name="explosion1.png" x="0" y="652" width="120" height="120"/>
<SubTexture name="explosion2.png" x="128" y="0" width="114" height="112"/>
<SubTexture name="explosion3.png" x="0" y="256" width="127" height="126"/>
<SubTexture name="explosion4.png" x="344" y="336" width="92" height="90"/>
<SubTexture name="explosion5.png" x="128" y="112" width="106" height="104"/>
<SubTexture name="explosionSmoke1.png" x="120" y="660" width="120" height="120"/>
<SubTexture name="explosionSmoke2.png" x="126" y="392" width="114" height="112"/>
<SubTexture name="explosionSmoke3.png" x="0" y="382" width="126" height="126"/>
<SubTexture name="explosionSmoke4.png" x="344" y="692" width="92" height="90"/>
<SubTexture name="explosionSmoke5.png" x="234" y="112" width="106" height="104"/>
<SubTexture name="fenceRed.png" x="243" y="336" width="96" height="32"/>
<SubTexture name="fenceYellow.png" x="128" y="216" width="104" height="32"/>
<SubTexture name="oilSpill_large.png" x="248" y="496" width="100" height="100"/>
<SubTexture name="oilSpill_small.png" x="347" y="308" width="28" height="28"/>
<SubTexture name="sandbagBeige.png" x="436" y="164" width="64" height="44"/>
<SubTexture name="sandbagBeige_open.png" x="348" y="518" width="84" height="55"/>
<SubTexture name="sandbagBrown.png" x="440" y="622" width="64" height="44"/>
<SubTexture name="sandbagBrown_open.png" x="248" y="596" width="84" height="55"/>
<SubTexture name="shotLarge.png" x="648" y="644" width="40" height="50"/>
<SubTexture name="shotOrange.png" x="692" y="584" width="32" height="56"/>
<SubTexture name="shotRed.png" x="652" y="268" width="42" height="76"/>
<SubTexture name="shotThin.png" x="748" y="535" width="16" height="52"/>
<SubTexture name="specialBarrel1.png" x="649" y="128" width="28" height="44"/>
<SubTexture name="specialBarrel1_outline.png" x="652" y="72" width="36" height="52"/>
<SubTexture name="specialBarrel2.png" x="688" y="644" width="24" height="48"/>
<SubTexture name="specialBarrel2_outline.png" x="692" y="344" width="32" height="56"/>
<SubTexture name="specialBarrel3.png" x="746" y="236" width="20" height="56"/>
<SubTexture name="specialBarrel3_outline.png" x="694" y="271" width="28" height="64"/>
<SubTexture name="specialBarrel4.png" x="746" y="172" width="20" height="64"/>
<SubTexture name="specialBarrel4_outline.png" x="694" y="199" width="28" height="72"/>
<SubTexture name="specialBarrel5.png" x="696" y="692" width="24" height="52"/>
<SubTexture name="specialBarrel5_outline.png" x="692" y="464" width="32" height="60"/>
<SubTexture name="specialBarrel6.png" x="764" y="431" width="16" height="52"/>
<SubTexture name="specialBarrel6_outline.png" x="720" y="700" width="24" height="60"/>
<SubTexture name="specialBarrel7.png" x="764" y="292" width="16" height="52"/>
<SubTexture name="specialBarrel7_outline.png" x="721" y="0" width="24" height="60"/>
<SubTexture name="tankBlue_barrel1.png" x="721" y="60" width="24" height="52"/>
<SubTexture name="tankBlue_barrel1_outline.png" x="660" y="344" width="32" height="60"/>
<SubTexture name="tankBlue_barrel2.png" x="749" y="112" width="16" height="52"/>
<SubTexture name="tankBlue_barrel2_outline.png" x="722" y="199" width="24" height="60"/>
<SubTexture name="tankBlue_barrel3.png" x="748" y="431" width="16" height="52"/>
<SubTexture name="tankBlue_barrel3_outline.png" x="722" y="259" width="24" height="60"/>
<SubTexture name="tankBody_bigRed.png" x="344" y="596" width="96" height="96"/>
<SubTexture name="tankBody_bigRed_outline.png" x="242" y="0" width="104" height="104"/>
<SubTexture name="tankBody_blue.png" x="520" y="72" width="76" height="76"/>
<SubTexture name="tankBody_blue_outline.png" x="434" y="0" width="84" height="84"/>
<SubTexture name="tankBody_dark.png" x="518" y="0" width="76" height="72"/>
<SubTexture name="tankBody_darkLarge.png" x="340" y="104" width="96" height="112"/>
<SubTexture name="tankBody_darkLarge_outline.png" x="240" y="660" width="104" height="120"/>
<SubTexture name="tankBody_dark_outline.png" x="436" y="692" width="84" height="80"/>
<SubTexture name="tankBody_green.png" x="520" y="622" width="76" height="72"/>
<SubTexture name="tankBody_green_outline.png" x="436" y="308" width="84" height="80"/>
<SubTexture name="tankBody_huge.png" x="127" y="256" width="116" height="136"/>
<SubTexture name="tankBody_huge_outline.png" x="0" y="508" width="124" height="144"/>
<SubTexture name="tankBody_red.png" x="592" y="348" width="68" height="72"/>
<SubTexture name="tankBody_red_outline.png" x="520" y="268" width="76" height="80"/>
<SubTexture name="tankBody_sand.png" x="594" y="0" width="76" height="72"/>
<SubTexture name="tankBody_sand_outline.png" x="436" y="84" width="84" height="80"/>
<SubTexture name="tankDark_barrel1.png" x="724" y="319" width="24" height="52"/>
<SubTexture name="tankDark_barrel1_outline.png" x="692" y="524" width="32" height="60"/>
<SubTexture name="tankDark_barrel2.png" x="748" y="483" width="16" height="52"/>
<SubTexture name="tankDark_barrel2_outline.png" x="724" y="512" width="24" height="60"/>
<SubTexture name="tankDark_barrel3.png" x="748" y="292" width="16" height="52"/>
<SubTexture name="tankDark_barrel3_outline.png" x="725" y="112" width="24" height="60"/>
<SubTexture name="tankGreen_barrel1.png" x="744" y="632" width="24" height="52"/>
<SubTexture name="tankGreen_barrel1_outline.png" x="693" y="139" width="32" height="60"/>
<SubTexture name="tankGreen_barrel2.png" x="670" y="0" width="16" height="52"/>
<SubTexture name="tankGreen_barrel2_outline.png" x="744" y="684" width="24" height="60"/>
<SubTexture name="tankGreen_barrel3.png" x="504" y="622" width="16" height="52"/>
<SubTexture name="tankGreen_barrel3_outline.png" x="720" y="640" width="24" height="60"/>
<SubTexture name="tankRed_barrel1.png" x="720" y="400" width="24" height="52"/>
<SubTexture name="tankRed_barrel1_outline.png" x="664" y="694" width="32" height="60"/>
<SubTexture name="tankRed_barrel2.png" x="764" y="483" width="16" height="52"/>
<SubTexture name="tankRed_barrel2_outline.png" x="724" y="452" width="24" height="60"/>
<SubTexture name="tankRed_barrel3.png" x="764" y="535" width="16" height="52"/>
<SubTexture name="tankRed_barrel3_outline.png" x="744" y="371" width="24" height="60"/>
<SubTexture name="tankSand_barrel1.png" x="745" y="60" width="24" height="52"/>
<SubTexture name="tankSand_barrel1_outline.png" x="688" y="404" width="32" height="60"/>
<SubTexture name="tankSand_barrel2.png" x="766" y="164" width="16" height="52"/>
<SubTexture name="tankSand_barrel2_outline.png" x="745" y="0" width="24" height="60"/>
<SubTexture name="tankSand_barrel3.png" x="765" y="112" width="16" height="52"/>
<SubTexture name="tankSand_barrel3_outline.png" x="724" y="572" width="24" height="60"/>
<SubTexture name="tank_bigRed.png" x="240" y="392" width="104" height="104"/>
<SubTexture name="tank_blue.png" x="432" y="426" width="84" height="92"/>
<SubTexture name="tank_dark.png" x="348" y="426" width="84" height="92"/>
<SubTexture name="tank_darkLarge.png" x="243" y="216" width="104" height="120"/>
<SubTexture name="tank_green.png" x="431" y="216" width="84" height="92"/>
<SubTexture name="tank_huge.png" x="124" y="508" width="124" height="152"/>
<SubTexture name="tank_red.png" x="516" y="388" width="76" height="92"/>
<SubTexture name="tank_sand.png" x="347" y="216" width="84" height="92"/>
<SubTexture name="tracksDouble.png" x="515" y="164" width="82" height="104"/>
<SubTexture name="tracksLarge.png" x="440" y="518" width="82" height="104"/>
<SubTexture name="tracksSmall.png" x="522" y="480" width="74" height="104"/>
<SubTexture name="treeBrown_large.png" x="0" y="0" width="128" height="128"/>
<SubTexture name="treeBrown_leaf.png" x="348" y="573" width="16" height="20"/>
<SubTexture name="treeBrown_small.png" x="592" y="694" width="72" height="72"/>
<SubTexture name="treeBrown_twigs.png" x="597" y="128" width="52" height="44"/>
<SubTexture name="treeGreen_large.png" x="0" y="128" width="128" height="128"/>
<SubTexture name="treeGreen_leaf.png" x="307" y="368" width="16" height="20"/>
<SubTexture name="treeGreen_small.png" x="520" y="694" width="72" height="72"/>
<SubTexture name="treeGreen_twigs.png" x="596" y="644" width="52" height="44"/>
<SubTexture name="wireCrooked.png" x="346" y="0" width="88" height="95"/>
<SubTexture name="wireStraight.png" x="688" y="0" width="33" height="139"/>
</TextureAtlas>

View File

@ -0,0 +1,93 @@
var asdf = require("asdf-games");
// eslint-disable-next-line no-unused-vars
const { Container, Sprite, TileSpriteXML, Texture, math, SpriteSheetXML, KeyControls, MouseControls } = asdf;
const container = new Container();
class playerBody extends TileSpriteXML {
constructor(keyboard, mouse, tanksTexture, tanksXml) {
super(tanksTexture, tanksXml, tanksXml.findIndex("name", "tankBody_blue.png"));
this.mouse = mouse;
this.keyboard = keyboard;
this.pos = { x: 250, y: 100 };
this.pivot = { x: 17, y: 22 };
this.scale = { x: 1, y: 1 };
this.speed = 1;
this.rotation = 0;
this.rotationSpeed = 0.5;
}
update(dt) {
// Set rotation back to zero if higher than 2 * Pi (same angle)
if (this.rotation >= (2 * Math.PI) || this.rotation <= -(2 * Math.PI)) {
this.rotation = 0;
}
if (this.rotation < 0) {
this.rotation = (2 * Math.PI) - this.rotation;
}
// Rotate clockwise
if (this.keyboard.x == 1) {
this.rotation += dt * 2;
}
// Rotate anti-clockwise
if (this.keyboard.x == -1) {
this.rotation -= dt * 2;
}
// Move
if (this.mouse.isDown) {
console.log(this.rotation);
}
if (this.keyboard.y == 1) {
this.pos.x += this.speed * Math.cos(this.rotation + 0.5 * Math.PI);
this.pos.y += this.speed * Math.sin(this.rotation + 0.5 * Math.PI);
}
if (this.keyboard.y == -1) {
this.pos.x -= this.speed * Math.cos(this.rotation + 0.5 * Math.PI);
this.pos.y -= this.speed * Math.sin(this.rotation + 0.5 * Math.PI);
}
}
}
class playerBarrel extends TileSpriteXML {
constructor(body, mouse, tanksTexture, tanksXml) {
super(tanksTexture, tanksXml, tanksXml.findIndex("name", "tankBlue_barrel2_outline.png"));
this.mouse = mouse;
this.body = body;
this.pos = { x: 0, y: 0 };
this.pivot = { x: 6, y: 24 };
this.scale = { x: 1, y: 1 };
this.rotation = 0;
}
update() {
// Stay on top of tankbody
this.pos.y = this.body.pos.y - 3;
this.pos.x = this.body.pos.x + 11;
// Follow Mouse
var dx = this.pos.x - this.mouse.pos.x;
var dy = this.pos.y - this.mouse.pos.y;
var tan = dy / dx;
var atan = Math.atan(tan);
if (dy > 0 && dx > 0) {
atan += Math.PI;
}
else if (dy < 0 && dx > 0) {
atan -= Math.PI;
}
this.rotation = atan + 0.5 * Math.PI;
}
}
class PlayerTank extends Container {
constructor(keyboard, mouse, texture, xml) {
super(container);
var body = new playerBody(keyboard, mouse, texture, xml);
var barrel = new playerBarrel(body, mouse, texture, xml);
this.add(body);
this.add(barrel);
}
}
module.exports = PlayerTank;

39
src/index.js Normal file
View File

@ -0,0 +1,39 @@
const { ipcRenderer } = require("electron");
var asdf = require("asdf-games");
// eslint-disable-next-line no-unused-vars
const { Game, KeyControls, MouseControls } = asdf;
const
//Logo = require(__dirname + "/../src/screens/logo.js"),
//Title = require(__dirname + "/../src/screens/title.js"),
GameScreen = require(__dirname + "/../src/screens/game.js")
//Gameover = require(__dirname + "/../src/screens/gameover.js")
;
const window = { w: 740, h: 480 };
var game = new Game(window.w, window.h, true);
ipcRenderer.send("resize", window);
const controls = {
keys: new KeyControls(),
mouse: new MouseControls(game.renderer.view)
};
// function titleScreen() {
// game.scene = new Title(game, keys, newGame, tutorial, remote.app.quit);
// }
function gameOver() {
//game.scene = new Gameover(game, keys, titleScreen);
}
function newGame() {
game.scene = new GameScreen(game, controls, gameOver);
}
newGame();
game.run(() => {
});

43
src/screens/game.js Normal file
View File

@ -0,0 +1,43 @@
const asdf = require("asdf-games");
// eslint-disable-next-line no-unused-vars
const { Container, Camera, Texture, SpriteSheetXML, TileMapXML } = asdf;
const texture = new Texture("../res/images/allSprites_default.png");
const xml = new SpriteSheetXML("../res/images/allSprites_default.xml");
const PlayerTank = require("../entities/PlayerTank.js");
class GameScreen extends Container {
constructor(game, controls, onGameOver) {
super();
this.game = game;
this.scene = this;
this.controls = controls;
this.onGameOver = onGameOver;
this.controls.keys.reset();
const level = [
161, 160, 160, 161, 160, 159, 134, 135, 143, 134, 135, 135,
161, 160, 160, 161, 161, 159, 135, 134, 143, 135, 135, 134,
161, 161, 160, 161, 160, 159, 134, 135, 144, 142, 142, 142,
161, 160, 160, 161, 160, 159, 135, 134, 143, 135, 134, 135,
161, 160, 161, 161, 160, 159, 134, 135, 143, 134, 135, 135,
160, 160, 160, 161, 160, 159, 135, 134, 143, 135, 135, 134,
161, 160, 160, 168, 168, 155, 142, 142, 138, 135, 135, 135,
160, 160, 160, 161, 160, 159, 135, 134, 134, 135, 134, 135
];
this.add(new TileMapXML(level, Math.ceil(this.game.w / 64), Math.ceil(this.game.h / 64), texture, xml));
var tank = new PlayerTank(this.controls.keys, this.controls.mouse, texture, xml);
this.add(tank);
}
update(dt, t) {
super.update(dt, t);
}
}
module.exports = GameScreen;