Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'viewPort.wCellX = Math.max(0, Math.min(mapXSize - viewPort.cellW, rockIlot1Center.x - Math.floor(viewPort.cellW / 2)));' Line Number: 2035
User prompt
ok, but also set the viewport centered on the rockIlot1Center at start
User prompt
currently rockIlot1Center and rockIlot2Center are fixed on top left and bottom down. make them randomly 'rotate' so that players start at one of the corners randomly
Code edit (11 edits merged)
Please save this source code
User prompt
in checkGameEnd(), show popup asset before game over
User prompt
show popup asset before game over
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
under welcomeText, add a help text "how to play..."
Code edit (2 edits merged)
Please save this source code
User prompt
on the popup write the text "Welcome on Dune."
Code edit (1 edits merged)
Please save this source code
User prompt
before game starts, show popup Asset
User prompt
before the game starts display a popup
Code edit (6 edits merged)
Please save this source code
User prompt
how would you handle energy so that low energy level slow down constructions
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'type')' in or related to this line: 'player1.spice += buildableRepository.getBuildableInfo(currentBuildingForPlacement.type).cost;' Line Number: 462
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: unit is not defined' in or related to this line: 'switch (unit.type) {' Line Number: 2176
Code edit (1 edits merged)
Please save this source code
Code edit (14 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -790,10 +790,10 @@
var self = Container.call(this);
self.playerId = playerId;
self.resources = 0;
self.tint = tint;
- self.spice = 9999; //2000; // Initialize spice property with 1000
- self.energy = 0; // Initialize spice property with 1000
+ self.spice = 2000; // Initial player spice
+ self.energy = 0;
// Initialize player-specific properties here
self.buildings = []; // Array to store all the player's buildings
self.units = []; // Array to store all the player's units
self.isCurrentlyBuilding = false;
@@ -1266,9 +1266,10 @@
x: closestSpiceSpot.x,
y: closestSpiceSpot.y
});
if (!path || path.length == 0) {
- console.warn("No path to spot! ", closestSpiceSpot, ". Retry later");
+ console.warn(self.playerId + " - No path to spot! ", " pos:", self.cellX, ",", self.cellY, " Found:", closestSpiceSpot, ". Retry later");
+ console.warn("Destination contains :", gameMap.cells[closestSpiceSpot.x][closestSpiceSpot.y]);
LK.setTimeout(function () {
self.startHarvesting(true);
}, 1000);
return;
@@ -1467,9 +1468,9 @@
var minDistance = Number.MAX_VALUE;
var playerBuildings = unit.playerId === player1.playerId ? player1.buildings : player2.buildings;
//console.log("Player has " + playerBuildings.length + " buildings");
playerBuildings.forEach(function (building) {
- if (building instanceof SpiceRefinery) {
+ if (building instanceof SpiceRefinery && !gameMap.cells[building.cellX][building.cellY].unit) {
//console.log("Found Refinery at " + building.cellX + "," + building.cellY);
var dx = unit.cellX - building.cellX;
var dy = unit.cellY - building.cellY;
var distance = Math.sqrt(dx * dx + dy * dy);
@@ -1554,11 +1555,11 @@
// Determine the required factory type based on the unit type
var requiredFactoryType;
switch (unitType) {
case 'unitQuad':
- case 'unitLightTank':
requiredFactoryType = 'lightFactory';
break;
+ case 'unitLightTank':
case 'unitHeavyTank':
case 'unitHarvester':
requiredFactoryType = 'heavyFactory';
break;
@@ -1981,8 +1982,9 @@
/* ******************************************** GLOBAL GAME VARIABLES ******************************************** */
/* ******************************************** GLOBAL GAME VARIABLES ******************************************** */
/* ******************************************** GLOBAL GAME VARIABLES ******************************************** */
var gameIsRunning = false;
+var gameState = 0; // 0 - Start, 1 - Game running, 2 - Game over
var mapXSize = 20 * 2;
var mapYSize = 21 * 2;
var tileSize = 100;
var mapHeight = game.height * 0.80;
@@ -2050,11 +2052,10 @@
/* ********************************************* AI FUNCTIONS ****************************************** */
/* ***************************************************************************************************** */
var AI_LEVEL = {
EASY: {
- actingDelay: 50000,
- //500, /// TEMP DEBUG !!!
- thinkingDelay: 50000 //500, /// TEMP DEBUG !!!
+ actingDelay: 2000,
+ thinkingDelay: 2000
},
NORMAL: {
actingDelay: 300,
thinkingDelay: 600
@@ -2160,22 +2161,21 @@
function checkAttckWaveUnitNeeds() {
console.log("checkAttckWaveUnitNeeds...Wave ", aiCurrentAttackWave);
var tempNeededUnitList = {};
var aiBaseUnitListPerWave = getUnitNeedsPerWave(aiCurrentAttackWave);
- console.log("Wave requires :", aiBaseUnitListPerWave);
+ //console.log("Wave requires :", aiBaseUnitListPerWave);
// aiThinking : evaluate army needs => list needed units
// Browse aiCurrentArmyUnits and compare with aiBaseUnitListPerWave
var tempNbQuads = 0;
var tempNbLightTanks = 0;
var tempNbHeavyTanks = 0;
console.log("check current ", aiCurrentArmyUnits.length, " army units:", aiCurrentArmyUnits);
for (var i = 0; i < aiCurrentArmyUnits.length; i++) {
- var _aiCurrentArmyUnits$i, _aiCurrentArmyUnits$i2;
- console.log("check army unit:", (_aiCurrentArmyUnits$i = aiCurrentArmyUnits[i]) === null || _aiCurrentArmyUnits$i === void 0 ? void 0 : _aiCurrentArmyUnits$i.type, " h=", (_aiCurrentArmyUnits$i2 = aiCurrentArmyUnits[i]) === null || _aiCurrentArmyUnits$i2 === void 0 ? void 0 : _aiCurrentArmyUnits$i2.health);
+ //console.log("check army unit:", aiCurrentArmyUnits[i]);
if (!aiCurrentArmyUnits[i] || aiCurrentArmyUnits[i].health <= 0) {
continue;
}
- console.log("Take ", aiCurrentArmyUnits[i].type, "#", aiCurrentArmyUnits[i].id, " H=", aiCurrentArmyUnits[i].health);
+ //console.log("Take ", aiCurrentArmyUnits[i].type, "#", aiCurrentArmyUnits[i].id ," H=",aiCurrentArmyUnits[i].health);
switch (aiCurrentArmyUnits[i].type) {
case "unitQuad":
tempNbQuads++;
break;
@@ -2189,9 +2189,9 @@
console.error("unknown army unit type:", aiCurrentArmyUnits[i].type);
break;
}
}
- console.log("=> We have:", tempNbQuads, tempNbLightTanks, tempNbHeavyTanks, " units");
+ //console.log("=> We have:", tempNbQuads, tempNbLightTanks, tempNbHeavyTanks, " units");
for (var j = 0; j < Object.keys(aiBaseUnitListPerWave).length; j++) {
var tempUnitType = Object.keys(aiBaseUnitListPerWave)[j];
if (!aiBaseUnitListPerWave[tempUnitType]) {
continue;
@@ -2215,13 +2215,13 @@
default:
console.error("unknown base unit type:", tempUnitType);
}
}
- console.log("=> We need:", tempNeededUnitList);
+ //console.log("=> We need:", tempNeededUnitList);
return tempNeededUnitList;
}
function getUnitNeedsPerWave(waveIndex) {
- console.log("getUnitNeedsPerWave...", waveIndex);
+ //console.log("getUnitNeedsPerWave...", waveIndex);
/*
Wave 1 : 1 Quad
Wave 2 : 2 Quad
Wave 3 : 2 Quad + 1 LightTank
@@ -2238,10 +2238,10 @@
'unitHeavyTank': tempNbHeavyTanks
};
}
function checkDefenseUnitsRequirements() {
- console.log("checkDefenseUnitsRequirements...");
- console.log("player2 units:", player2.units);
+ //console.log("checkDefenseUnitsRequirements...");
+ //console.log("player2 units:", player2.units);
// 1) Count currently owned units
var aiCurrentUnitList = {
'unitHarvester': 0,
'unitQuad': 0,
@@ -2250,9 +2250,9 @@
};
player2.units.forEach(function (unit) {
aiCurrentUnitList[unit.type] = (aiCurrentUnitList[unit.type] || 0) + 1;
});
- console.log("aiCurrentUnitList:", aiCurrentUnitList);
+ //console.log("aiCurrentUnitList:", aiCurrentUnitList);
// 2) Check if all requirements are met
var tempNeededUnitList = {};
// Compare aiBaseUnitList and aiCurrentUnitList
for (var unit in aiBaseUnitList) {
@@ -2266,16 +2266,16 @@
function aiActing() {
if (LK.ticks % aiCurrentLevel.actingDelay !== 0) {
return;
}
- console.log("aiActing...");
+ //console.log("aiActing...");
// 1) Meet buildings requirements
- console.log("aiNeededBuildingList:", aiNeededBuildingList);
+ //console.log("aiNeededBuildingList:", aiNeededBuildingList);
if (Object.keys(aiNeededBuildingList).length > 0 && !player2.isCurrentlyBuilding) {
aiHandleBuildingConstruction(Object.keys(aiNeededBuildingList)[0]);
}
// 2) Meet units requirements
- console.log("aiNeededUnitsList:", aiNeededDefenseUnitsList);
+ //console.log("aiNeededUnitsList:", aiNeededDefenseUnitsList);
if (Object.keys(aiNeededDefenseUnitsList).length > 0 && !player2.isCurrentlyBuildingUnit) {
var tempUnitToBuild = Object.keys(aiNeededDefenseUnitsList)[0];
var tempSourceFactory = findFactoryForUnit(tempUnitToBuild, player2);
if (tempSourceFactory) {
@@ -2284,50 +2284,50 @@
console.warn("2 - No factory found for unit " + tempUnitToBuild);
}
}
// 3) Meet building defense needs
- console.log("aiBuildingsUnderAttackList:", aiBuildingsUnderAttackList);
+ //console.log("aiBuildingsUnderAttackList:", aiBuildingsUnderAttackList);
if (aiBuildingsUnderAttackList.length > 0) {
aiBuildingsUnderAttackList.forEach(function (building) {
aiHandleBuildingUnderAttack(building);
});
}
// 4) Meet unit defense needs
- console.log("aiUnitsUnderAttackList:", aiUnitsUnderAttackList);
+ //console.log("aiUnitsUnderAttackList:", aiUnitsUnderAttackList);
if (aiUnitsUnderAttackList.length > 0) {
aiUnitsUnderAttackList.forEach(function (unit) {
aiHandleUnitUnderAttack(unit);
});
}
// 5) Meet attack wave needs
if (Object.keys(aiNeededAttackUnitsList).length > 0) {
aiArmyIsReady = false;
- console.log("Army not ready:", aiNeededAttackUnitsList);
+ //console.log("Army not ready:", aiNeededAttackUnitsList);
// Take 1st needed unit
var tempUnitToBuild = Object.keys(aiNeededAttackUnitsList)[0];
var tempSourceFactory = findFactoryForUnit(tempUnitToBuild, player2);
if (tempSourceFactory) {
aiHandleUnitConstruction(tempUnitToBuild, tempSourceFactory, true);
} else {
- console.warn("5 - No factory found for unit " + tempUnitToBuild);
+ //console.warn("5 - No factory found for unit " + tempUnitToBuild);
}
} else {
- console.log("Clean Army...", aiCurrentArmyUnits);
+ //console.log("Clean Army...", aiCurrentArmyUnits);
var tempCleanArmy = aiCurrentArmyUnits.filter(function (unit) {
// keep only units alive
return !unit.isDestroyed;
});
aiCurrentArmyUnits = tempCleanArmy;
if (aiCurrentArmyUnits.length >= aiCurrentAttackWave) {
// ATTENTION !!! Arbitray rue : Nb units == Wave index
- console.log("Army is ready:", aiCurrentArmyUnits);
+ //console.log("Army is ready:", aiCurrentArmyUnits);
aiArmyIsReady = true;
}
}
// 6) Launch attack wave
if (aiArmyIsReady && Date.now() - aiLastAttackWaveTime > aiNextAttackWaveDelayMs) {
aiLastAttackWaveTime = Date.now();
- console.warn("6 - ATTACK !!! Wave " + aiCurrentAttackWave + " at ", new Date().toLocaleTimeString());
+ //console.warn("6 - ATTACK !!! Wave "+aiCurrentAttackWave + " at ", (new Date()).toLocaleTimeString());
aiCurrentAttackWave++;
aiNextAttackWaveDelayMs = Math.min(5 * 60 * 1000, aiCurrentAttackWave * 60 * 1000);
// Find a building to attack
var firstAttaker = null;
@@ -2346,96 +2346,96 @@
}
}
}
function aiHandleBuildingConstruction(buildingToBuild) {
- console.log("aiHandleBuildingConstruction...", buildingToBuild);
+ //console.log("aiHandleBuildingConstruction...", buildingToBuild);
if (player2.isCurrentlyBuilding) {
- console.log("Already building building...");
+ //console.log("Already building building...");
return;
}
player2.isCurrentlyBuilding = true;
enqueueBuildable(buildingToBuild, null, player2);
}
function aiPlaceBuilding(buildable) {
- console.log("aiPlaceBuilding...", buildable);
+ //console.log("aiPlaceBuilding...", buildable);
if (!buildable || !buildable.isBuilding) {
return;
}
var baseBuilding = findClosestConstructionYard(buildable);
if (!baseBuilding) {
- console.warn(buildable.playerId + " - No Construction Yard to place building " + buildable.type + " around");
+ //console.warn(buildable.playerId + " - No Construction Yard to place building " + buildable.type + " around");
return;
}
var freePosition = findEmplacementForBuilding(buildable, baseBuilding.cellX, baseBuilding.cellY);
if (!freePosition) {
- console.warn(buildable.playerId + " - No free space to place building " + buildable.type);
+ //console.warn(buildable.playerId + " - No free space to place building " + buildable.type);
return;
}
var placeX = freePosition.cellX;
var placeY = freePosition.cellY;
handleBuildingPlacement(buildable, placeX, placeY);
}
function aiHandleBuildingUnderAttack(buildingToDefend) {
- console.log("aiHandleBuildingUnderAttack...", buildingToDefend);
+ //console.log("aiHandleBuildingUnderAttack...", buildingToDefend);
// Check if already have defenders
if (buildingToDefend.defenders.length > 1) {
- console.log("already have defenders...", buildingToDefend.defenders);
+ //console.log("already have defenders...", buildingToDefend.defenders);
return;
}
// List all units per distance to building [] = { unit: unit, distance: distance }
var potentialDefenders = orderEntitiesPerDistance(buildingToDefend, player2.units);
// Browse potentialDefenders and add as defenders the ones that can attack & are idle
potentialDefenders.forEach(function (defenderEntry) {
var defender = defenderEntry.entity;
- console.log("potential defender ", defender.id, " attackDamage:", defender.attackDamage, " / moving:", defender.isMoving, " / attackMode:", defender.attackMode);
+ //console.log("potential defender ", defender.id, " attackDamage:", defender.attackDamage, " / moving:", defender.isMoving, " / attackMode:", defender.attackMode);
if (buildingToDefend.defenders.length < 2 && defender.attackDamage && !defender.isMoving && defender.attackMode == 0) {
buildingToDefend.defenders.push(defender);
}
});
if (buildingToDefend.defenders.length > 0) {
- console.log(buildingToDefend.defenders.length + " defenders found");
+ //console.log(buildingToDefend.defenders.length + " defenders found");
// Start attacking the first enemy spotted
buildingToDefend.defenders.forEach(function (defender) {
- console.log("defender ", defender.id, " ", defender.type, " Will attack:", buildingToDefend.lastAttaker);
+ //console.log("defender ", defender.id, " ", defender.type, " Will attack:", buildingToDefend.lastAttaker);
defender.startAttack(buildingToDefend.lastAttaker);
});
} else {
- console.log("No defenders found");
+ //console.log("No defenders found");
}
- console.warn("potentialDefenders:", potentialDefenders);
+ //console.warn("potentialDefenders:", potentialDefenders);
}
function aiHandleUnitUnderAttack(unitToDefend) {
- console.log("aiHandleUnitUnderAttack...", unitToDefend);
+ //console.log("aiHandleUnitUnderAttack...", unitToDefend);
// Check if already have defenders
if (unitToDefend.defenders.length > 1) {
- console.log("unit already have defenders...", unitToDefend.defenders);
+ //console.log("unit already have defenders...", unitToDefend.defenders);
return;
}
// List all units per distance to building [] = { unit: unit, distance: distance }
var potentialDefenders = orderEntitiesPerDistance(unitToDefend, player2.units);
// Browse potentialDefenders and add as defenders the ones that can attack & are idle
potentialDefenders.forEach(function (defenderEntry) {
var defender = defenderEntry.entity;
- console.log("potential defender ", defender.id, " attackDamage:", defender.attackDamage, " / moving:", defender.isMoving, " / attackMode:", defender.attackMode);
+ //console.log("potential defender ", defender.id, " attackDamage:", defender.attackDamage, " / moving:", defender.isMoving, " / attackMode:", defender.attackMode);
if (unitToDefend.defenders.length < 2 && defender.attackDamage && !defender.isMoving && defender.attackMode == 0) {
unitToDefend.defenders.push(defender);
}
});
if (unitToDefend.defenders.length > 0) {
- console.log(unitToDefend.defenders.length + " defenders found");
+ //console.log(unitToDefend.defenders.length + " defenders found");
// Start attacking the first enemy spotted
unitToDefend.defenders.forEach(function (defender) {
- console.log("defender ", defender.id, " ", defender.type, " Will attack:", unitToDefend.lastAttaker);
+ //console.log("defender ", defender.id, " ", defender.type, " Will attack:", unitToDefend.lastAttaker);
defender.startAttack(unitToDefend.lastAttaker);
});
} else {
- console.log("No defenders found");
+ //console.log("No defenders found");
}
}
function aiHandleUnitConstruction(unitToBuild, sourceFactory, forArmy) {
- console.log("aiHandleUnitConstruction...", unitToBuild, sourceFactory, forArmy);
+ //console.log("aiHandleUnitConstruction...", unitToBuild, sourceFactory, forArmy);
if (player2.isCurrentlyBuildingUnit) {
- console.log("Already building unit...");
+ //console.log("Already building unit...");
return;
}
player2.isCurrentlyBuildingUnit = true;
aiCurrentlyBuildingForArmy = !!forArmy; // Flag to add the unit to the army
@@ -2450,9 +2450,9 @@
return null;
}
function aiStartAttack(target) {
var nbUnits = aiCurrentArmyUnits.length;
- console.log("aiStartAttack... nbUnits=", nbUnits, " target=", target);
+ //console.log("aiStartAttack... nbUnits=", nbUnits, " target=", target);
// Send all army around the target
for (var i = 0; i < nbUnits; i++) {
// Find a place for each unit by adding a delta depending on index
var deltaX = -1 + i % 3;
@@ -2474,9 +2474,9 @@
rockIlot1Center = {
x: 8,
y: 10
};
- console.log("rockIlot1Center : ", rockIlot1Center);
+ //console.log("rockIlot1Center : ", rockIlot1Center);
var rockIlot1Radius = 4;
for (var x = rockIlot1Center.x - rockIlot1Radius; x <= rockIlot1Center.x + rockIlot1Radius; x++) {
for (var y = rockIlot1Center.y - rockIlot1Radius; y <= rockIlot1Center.y + rockIlot1Radius; y++) {
if (x >= 0 && x < mapXSize && y >= 0 && y < mapYSize) {
@@ -2510,9 +2510,9 @@
globalTerrain[x][y] = 1;
}
}
}
- console.log("rockIlot2Center at " + rockIlot2Center.x + ',' + rockIlot2Center.y);
+ //console.log("rockIlot2Center at " + rockIlot2Center.x + ',' + rockIlot2Center.y);
var initialConstructionYard2 = new ConstructionYard(rockIlot2Center.x, rockIlot2Center.y, 2);
gameMap.cells[rockIlot2Center.x][rockIlot2Center.y].building = initialConstructionYard2;
applyCellOccupation(rockIlot2Center.x, rockIlot2Center.y);
player2.addBuilding(initialConstructionYard2);
@@ -2573,9 +2573,9 @@
player2.addUnit(harvester1);
game.addChild(harvester1);
gameMap.initTerrain(mapXSize, mapYSize); // Initialize with a 20x20 grid
initSpiceSpots();
- console.log('ConstructionYard1 cell :', gameMap.cells[rockIlot1Center.x][rockIlot1Center.y]);
+ //console.log('ConstructionYard1 cell :', gameMap.cells[rockIlot1Center.x][rockIlot1Center.y]);
selectionMarker = new SelectionMarker();
// Add the map to the game
game.addChild(gameMap);
game.addChild(selectionMarker);
@@ -2616,9 +2616,9 @@
fogOfWar.push({
x: x,
y: y
});
- gameMap.cells[x][y].fog = false; // true; // TEMP DEBUG !!!// TEMP DEBUG !!!// TEMP DEBUG !!!
+ gameMap.cells[x][y].fog = true;
gameMap.cells[x][y].fogAsset = LK.getAsset('fogOfWar', {
x: x * 100,
y: y * 100,
tint: 0x222222
@@ -2626,9 +2626,9 @@
}
}
}
function updateFogOfWar() {
- console.log("updateFogOfWar...");
+ //console.log("updateFogOfWar...");
player1.units.concat(player1.buildings).forEach(function (element) {
for (var dx = -5; dx <= 5; dx++) {
for (var dy = -5; dy <= 5; dy++) {
var x = element.cellX + dx;
@@ -2769,12 +2769,14 @@
updateActionBoard();
}
}
} else if (cell.building && !cell.fog) {
- //console.log("Selected building at " + cellX + ',' + cellY);
- currentSelection = cell.building;
- selectionMarker.setOnElement(currentSelection);
- updateActionBoard();
+ console.log("Selected building at " + cellX + ',' + cellY, " cell:", cell, " units:", player1.units);
+ if (!cell.unit) {
+ currentSelection = cell.building;
+ selectionMarker.setOnElement(currentSelection);
+ updateActionBoard();
+ }
} else if (cell.unit) {
//console.log("Selected cell with unit at " + cellX + ',' + cellY);
//console.log("unit at " + cell.unit.x + ',' + cell.unit.y);
}
@@ -2932,14 +2934,16 @@
var findClosestSpiceSpot = function findClosestSpiceSpot(x, y) {
var closestSpot = null;
var minDistance = Number.MAX_VALUE;
spiceSpots.forEach(function (spot) {
- var dx = x - spot.x;
- var dy = y - spot.y;
- var distance = Math.sqrt(dx * dx + dy * dy);
- if (distance < minDistance) {
- closestSpot = spot;
- minDistance = distance;
+ if (!gameMap.cells[spot.x][spot.y].unit) {
+ var dx = x - spot.x;
+ var dy = y - spot.y;
+ var distance = Math.sqrt(dx * dx + dy * dy);
+ if (distance < minDistance) {
+ closestSpot = spot;
+ minDistance = distance;
+ }
}
});
return closestSpot;
};
@@ -2967,9 +2971,8 @@
var buildableItemIcons = game.children.filter(function (child) {
return child instanceof BuildableItemIcon;
});
buildableItemIcons.forEach(function (icon) {
- //icon.destroy(); // TEMP DEBUG !!!
if (icon.progressDisplay) {
icon.progressDisplay.visible = !resetProgress && !!currentSelection;
}
icon.visible = false;
@@ -3009,10 +3012,8 @@
if (icon.progressDisplay) {
icon.progressDisplay.visible = true;
game.addChild(icon.progressDisplay);
}
- //icon = new BuildableItemIcon(itemType, iconX, iconY, currentSelection); // TEMP DEBUG !!!
- //game.addChild(icon);
iconX += 300; // Increment X position for the next icon
});
}
}
@@ -3184,9 +3185,15 @@
tickCounter++;
});
// Start the game with Player 1 construction yard preselected
LK.setTimeout(function () {
- initGame();
+ // Display a popup before the game starts
+ LK.showPopup("Welcome to Dune 2: The Battle for Arrakis", "Prepare to harvest, build, and conquer! Click OK to start.", function () {
+ initGame();
+ currentSelection = gameMap.cells[rockIlot1Center.x][rockIlot1Center.y].building;
+ selectionMarker.setOnElement(currentSelection);
+ updateActionBoard();
+ });
currentSelection = gameMap.cells[rockIlot1Center.x][rockIlot1Center.y].building;
selectionMarker.setOnElement(currentSelection);
updateActionBoard();
}, 100);
\ No newline at end of file
a tileable sand terrain tile.
A square tileable rock terrain tile WITHOUT BBORDER. Single Game Texture. In-Game asset. 2d. No shadows. No Border
Zenith view of Dune's Wind Trap power facility square fence. Ressembles a bit to Sydney's Opera. Zenith view Directly from above.
grey cancel icon. UI
thin white circle empty.
0x5e86ff
Zenith view of a white rectangular Harvester shape of a garbage truck with a triangular head. Harvesting on sand, with flowing spice in the back. inside a square fence. Zenith view. Directly overhead. Plumb view.
Minimal Ui icon of an right sign aside with an icon of a target. sand background
Minimal icon of a home with direction icon pointing to the home. sand background
3 white flat isometric concentric circles like a target.
Remove background
Gray background
Minimal Ui icon of target sign on a fire icon.. sand background
top view of an explosion effect.
Simple heavy army tank factory buiding a tank with a crane. Square fence... Zenith view Directly overhead. Plumb view.
an empty black popup UI. UI