Code edit (4 edits merged)
Please save this source code
User prompt
in handleDragEnd add to cellX and cellY the offset due to currentViewCenter
Code edit (5 edits merged)
Please save this source code
User prompt
add cellW and cellH properties to buildings, constructionYard is 2x2
User prompt
add cellX and cellY propeties to buildings
Code edit (4 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of null (reading 'x')' in or related to this line: 'var deltaX = currentPos.x - dragStart.x;' Line Number: 280
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of null (reading 'playerId')' in or related to this line: 'return player1.playerId === id ? player1.tint : player2.tint;' Line Number: 205
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: global is not defined' in or related to this line: 'global.updateActionBoard = function () {' Line Number: 284
User prompt
Add a global function to handle the action board update
Code edit (1 edits merged)
Please save this source code
User prompt
I don't see the log : console.log("Building selected", self); when 1 click on a building
Code edit (1 edits merged)
Please save this source code
User prompt
when an empty cell of the map is clicked currentSelection is set back to null
User prompt
Now can you handle the UI system ? set a currentSelection global variable, when a building is clicked, set this variable
Code edit (18 edits merged)
Please save this source code
User prompt
Do you have a more 'royal' font for player1SpiceText ?
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
add anchors to player1SpiceText
Code edit (6 edits merged)
Please save this source code
User prompt
add a black text at the top right with player1 spice level
User prompt
This game is Dune 2, so the objective is to harvest spice. add a 'spice' property to Player class with a value of 1000
===================================================================
--- original.js
+++ change.js
@@ -258,14 +258,14 @@
game.on('up', handleDragEnd);
// Instantiate CommandPanel
var commandPanel = game.addChild(new CommandPanel());
// Create a Text2 object to display player1's spice level
-var player1SpiceText = new Text2(player1.spice.toString(), {
- size: 50,
+var player1SpiceText = new Text2("$$" + player1.spice.toString() + "$$", {
+ size: 100,
fill: '#000000',
- anchorX: -1.0,
+ anchorX: 20.0,
// Anchor to the right
- anchorY: 0.0 // Anchor to the top
+ anchorY: -20.0 // Anchor to the top
});
// Add the spice level text to the GUI overlay
LK.gui.topRight.addChild(player1SpiceText);
// Game tick
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