diff --git a/Pirate-Ship-Battle-Royal-v1.0/behaviors/GameManager.yaml b/Pirate-Ship-Battle-Royal-v1.0/behaviors/GameManager.yaml
index 80cce1a..b276325 100644
--- a/Pirate-Ship-Battle-Royal-v1.0/behaviors/GameManager.yaml
+++ b/Pirate-Ship-Battle-Royal-v1.0/behaviors/GameManager.yaml
@@ -55,6 +55,8 @@ code: |-
this._restartTimer = 0;
this._prevCount = -1;
this._gracePeriod = 0;
+ this._countdownFadeTimer = null;
+ this._countdownRemoveTimer = null;
var _self = this;
this.game.scene.userData._skipToNextMatch = function() { _self._doRestart(); };
};
@@ -85,24 +87,70 @@ code: |-
this._doRestart();
};
+ this._getSafeArea = function() {
+ if (this.erth && this.erth.viewport && this.erth.viewport.getSafeArea) {
+ return this.erth.viewport.getSafeArea();
+ }
+ if (this.game && this.game.getViewportSafeArea) {
+ return this.game.getViewportSafeArea();
+ }
+ return {
+ left: 0,
+ top: 0,
+ right: window.innerWidth,
+ bottom: window.innerHeight,
+ width: window.innerWidth,
+ height: window.innerHeight,
+ insetLeft: 0,
+ insetTop: 0,
+ insetRight: 0,
+ insetBottom: 0
+ };
+ };
+
+ this._applyOverlaySafeArea = function() {
+ var el = document.getElementById('pirate-overlay');
+ if (!el) return;
+ var safe = this._getSafeArea();
+ var key = [safe.left, safe.top, safe.width, safe.height].join(':');
+ if (el._safeKey === key) return;
+ el._safeKey = key;
+ el.style.left = safe.left + 'px';
+ el.style.top = safe.top + 'px';
+ el.style.width = safe.width + 'px';
+ el.style.height = safe.height + 'px';
+ };
+
+ this._applyCenteredSafeArea = function(el) {
+ if (!el) return;
+ var safe = this._getSafeArea();
+ var key = [safe.left, safe.top, safe.width, safe.height].join(':');
+ if (el._safeKey === key) return;
+ el._safeKey = key;
+ el.style.left = (safe.left + safe.width * 0.5) + 'px';
+ el.style.top = (safe.top + safe.height * 0.5) + 'px';
+ };
+
this._createUI = function() {
window._stemScene = this.game.scene;
+ var safe = this._getSafeArea();
var old = document.getElementById('pirate-overlay');
if (old) old.remove();
var div = document.createElement('div');
div.id = 'pirate-overlay';
div.style.cssText = [
- 'position:fixed', 'top:0', 'left:0', 'width:100%', 'height:100%',
+ 'position:fixed', 'top:' + safe.top + 'px', 'left:' + safe.left + 'px',
+ 'width:' + safe.width + 'px', 'height:' + safe.height + 'px',
'display:flex', 'flex-direction:column', 'align-items:center',
'justify-content:flex-start',
- 'padding-top:max(16px, env(safe-area-inset-top, 16px))',
+ 'padding-top:16px',
'pointer-events:none', 'z-index:9999', 'font-family:serif'
].join(';');
div.innerHTML =
'
' +
+ 'border:2px solid #8b6914;max-width:90%;text-align:center;">' +
'\u2875 Ships Afloat: ' + TOTAL + '
' +
'' +
+ 'max-width:90%;word-break:break-word;">' +
'
';
document.body.appendChild(div);
+ this._applyOverlaySafeArea();
};
- this._doRestart = function() {
- var skipEl = document.getElementById('pirate-skip-btn');
- if (skipEl) skipEl.remove();
- var scene = this.game.scene;
- for (var i = 0; i < ALL_SHIPS.length; i++) {
- var name = ALL_SHIPS[i];
- var ship = scene.getObjectByName(name);
- if (!ship) continue;
- var sp = SHIP_STARTS[name];
- ship.position.set(sp.x, sp.y, sp.z);
- ship.rotation.set(0, sp.ry, 0);
- ship.visible = true;
- var h = ship.userData._shipHealth;
- if (h) {
- if (h._dieTimeout) { clearTimeout(h._dieTimeout); h._dieTimeout = null; }
- h.hp = h.maxHp || 100; h.isDead = false;
- h._flashTimer = -99;
- h._damageLevel = 0;
- h._dmgTimer = 0;
- if (h._originalColors) h._originalColors.forEach(function(e) {
- if (e.m && e.m.color && e.c) e.m.color.copy(e.c);
- });
- }
- ship.userData._cannonCd = 0; ship.userData._cannonCdMax = 3;
+ this._clearCountdownTimers = function() {
+ if (this._countdownFadeTimer) {
+ clearTimeout(this._countdownFadeTimer);
+ this._countdownFadeTimer = null;
+ }
+ if (this._countdownRemoveTimer) {
+ clearTimeout(this._countdownRemoveTimer);
+ this._countdownRemoveTimer = null;
}
+ };
+
+ this._clearTransientSceneObjects = function() {
+ var scene = this.game && this.game.scene;
+ if (!scene || !scene.userData) return;
['_cannonballs','_cannonVFX','_wake'].forEach(function(key) {
var arr = scene.userData[key];
if (!arr) return;
arr.forEach(function(item) {
if (!item) return;
- // Cannonballs are direct meshes
if (item.parent) {
scene.remove(item);
if (item.geometry) item.geometry.dispose();
if (item.material) item.material.dispose();
return;
}
- // Wake entries have a .mesh
if (item.mesh && item.mesh.parent) {
scene.remove(item.mesh);
if (item.mesh.geometry) item.mesh.geometry.dispose();
if (item.mesh.material) item.mesh.material.dispose();
}
- // VFX entries have .parts array
if (item.parts) item.parts.forEach(function(p) {
if (p.mesh && p.mesh.parent) {
scene.remove(p.mesh);
@@ -169,6 +204,42 @@ code: |-
});
scene.userData[key] = [];
});
+ };
+
+ this._destroyUI = function() {
+ this._clearCountdownTimers();
+ var countdownEl = document.getElementById('pirate-countdown');
+ if (countdownEl) countdownEl.remove();
+ var overlayEl = document.getElementById('pirate-overlay');
+ if (overlayEl) overlayEl.remove();
+ };
+
+ this._doRestart = function() {
+ var skipEl = document.getElementById('pirate-skip-btn');
+ if (skipEl) skipEl.remove();
+ var scene = this.game.scene;
+ for (var i = 0; i < ALL_SHIPS.length; i++) {
+ var name = ALL_SHIPS[i];
+ var ship = scene.getObjectByName(name);
+ if (!ship) continue;
+ var sp = SHIP_STARTS[name];
+ ship.position.set(sp.x, sp.y, sp.z);
+ ship.rotation.set(0, sp.ry, 0);
+ ship.visible = true;
+ var h = ship.userData._shipHealth;
+ if (h) {
+ if (h._dieTimeout) { clearTimeout(h._dieTimeout); h._dieTimeout = null; }
+ h.hp = h.maxHp || 100; h.isDead = false;
+ h._flashTimer = -99;
+ h._damageLevel = 0;
+ h._dmgTimer = 0;
+ if (h._originalColors) h._originalColors.forEach(function(e) {
+ if (e.m && e.m.color && e.c) e.m.color.copy(e.c);
+ });
+ }
+ ship.userData._cannonCd = 0; ship.userData._cannonCdMax = 3;
+ }
+ this._clearTransientSceneObjects();
this.gameOver = false; this._restartTimer = 0; this._prevCount = -1; this._gracePeriod = 3.0; this._lastCountNum = -1; this._matchElapsed = 0; this.game.scene.userData._matchStarted = false; this._showCountdown(3);
var winEl = document.getElementById('pirate-winner');
if (winEl) winEl.style.display = 'none';
@@ -205,6 +276,8 @@ code: |-
this.update = function(dt) {
if (!this._shipRefs) { this._shipRefCd -= dt; if (this._shipRefCd <= 0) this._ensureShipRefs(); }
+ this._applyOverlaySafeArea();
+ this._applyCenteredSafeArea(document.getElementById('pirate-countdown'));
if (this._gracePeriod > 0) {
this._gracePeriod -= dt;
var cNum = Math.ceil(this._gracePeriod);
@@ -323,26 +396,41 @@ code: |-
};
this._showCountdown = function(n) {
+ this._clearCountdownTimers();
var el = document.getElementById('pirate-countdown');
if (!el) {
el = document.createElement('div');
el.id = 'pirate-countdown';
- el.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);' +
+ el.style.cssText = 'position:fixed;transform:translate(-50%,-50%);' +
'font-family:Georgia,serif;font-size:clamp(60px,15vw,120px);font-weight:bold;' +
'color:#f5d76e;text-shadow:0 0 30px rgba(245,215,110,0.8);pointer-events:none;' +
'z-index:99999;text-align:center;transition:opacity 0.3s;';
document.body.appendChild(el);
}
+ this._applyCenteredSafeArea(el);
el.style.opacity = '1';
el.textContent = n > 0 ? n : 'GO!';
if (n === 0) {
var _el = el;
- setTimeout(function() { _el.style.opacity = '0'; setTimeout(function(){ _el.remove(); }, 400); }, 600);
+ this._countdownFadeTimer = setTimeout(function() {
+ _el.style.opacity = '0';
+ this._countdownFadeTimer = null;
+ this._countdownRemoveTimer = setTimeout(function() {
+ _el.remove();
+ this._countdownRemoveTimer = null;
+ }.bind(this), 400);
+ }.bind(this), 600);
}
};
this.dispose = function() {
+ this._destroyUI();
+ this._clearTransientSceneObjects();
+ if (this.game && this.game.scene && this.game.scene.userData) {
+ delete this.game.scene.userData._skipToNextMatch;
+ delete this.game.scene.userData._matchStarted;
+ }
+ if (window._stemScene === (this.game && this.game.scene)) window._stemScene = null;
+ this._shipRefs = null;
var skipEl2 = document.getElementById('pirate-skip-btn');
if (skipEl2) skipEl2.remove();
- var el = document.getElementById('pirate-overlay');
- if (el) el.remove();
};
diff --git a/Pirate-Ship-Battle-Royal-v1.0/behaviors/PirateHUD.yaml b/Pirate-Ship-Battle-Royal-v1.0/behaviors/PirateHUD.yaml
index bd8ea98..9212947 100644
--- a/Pirate-Ship-Battle-Royal-v1.0/behaviors/PirateHUD.yaml
+++ b/Pirate-Ship-Battle-Royal-v1.0/behaviors/PirateHUD.yaml
@@ -35,8 +35,58 @@ code: |+
this._createHUD();
};
+ this._getSafeArea = function() {
+ if (this.erth && this.erth.viewport && this.erth.viewport.getSafeArea) {
+ return this.erth.viewport.getSafeArea();
+ }
+ if (this.game && this.game.getViewportSafeArea) {
+ return this.game.getViewportSafeArea();
+ }
+ return {
+ left: 0,
+ top: 0,
+ right: window.innerWidth,
+ bottom: window.innerHeight,
+ width: window.innerWidth,
+ height: window.innerHeight,
+ insetLeft: 0,
+ insetTop: 0,
+ insetRight: 0,
+ insetBottom: 0
+ };
+ };
+
+ this._syncHUDLayout = function() {
+ var safe = this._getSafeArea();
+ var hud = document.getElementById('pirate-hud');
+ if (hud) {
+ var hudKey = [safe.left, safe.width, safe.insetBottom].join(':');
+ if (hud._safeKey !== hudKey) {
+ hud._safeKey = hudKey;
+ hud.style.left = (safe.left + safe.width * 0.5) + 'px';
+ hud.style.bottom = (safe.insetBottom + 18) + 'px';
+ }
+ }
+
+ var wrap = document.getElementById('pirate-sprint-wrap');
+ if (wrap) {
+ var wrapKey = [safe.left, safe.width, safe.insetBottom, safe.insetRight, this._hudIsMobile ? 'm' : 'd'].join(':');
+ if (wrap._safeKey !== wrapKey) {
+ wrap._safeKey = wrapKey;
+ if (this._hudIsMobile) {
+ wrap.style.right = (safe.insetRight + 20) + 'px';
+ wrap.style.bottom = (safe.insetBottom + 234) + 'px';
+ } else {
+ wrap.style.left = (safe.left + safe.width * 0.5) + 'px';
+ wrap.style.bottom = (safe.insetBottom + 50) + 'px';
+ }
+ }
+ }
+ };
+
this._createHUD = function() {
var isMobile = ('ontouchstart' in window) || navigator.maxTouchPoints > 0;
+ this._hudIsMobile = isMobile;
var old = document.getElementById('pirate-hud');
if (old) old.remove();
@@ -88,9 +138,11 @@ code: |+
wrap.appendChild(lbl);
wrap.appendChild(track);
document.body.appendChild(wrap);
+ this._syncHUDLayout();
};
this.update = function(dt) {
+ this._syncHUDLayout();
// Sprint fuel gauge
var sp = this.game.scene.userData._playerSprint;
var bar = document.getElementById('sprint-bar');
@@ -119,7 +171,9 @@ code: |+
var playerUUID = scene.userData._playerShipUUID;
var THREE = window.THREE;
if (camera && THREE && aiShips.length) {
- var w = window.innerWidth, h = window.innerHeight;
+ var safe = this._getSafeArea();
+ var w = safe.width, h = safe.height;
+ if (w <= 0 || h <= 0) return;
var tmpV = this._tmpV;
aiShips.forEach(function(ship) {
if (!ship || ship.uuid === playerUUID) return;
@@ -146,8 +200,8 @@ code: |+
tmpV.copy(ship.position);
tmpV.y += 8;
tmpV.project(camera);
- var sx = (tmpV.x * 0.5 + 0.5) * w;
- var sy = (-tmpV.y * 0.5 + 0.5) * h;
+ var sx = safe.left + (tmpV.x * 0.5 + 0.5) * w;
+ var sy = safe.top + (-tmpV.y * 0.5 + 0.5) * h;
if (tmpV.z > 1) { el.style.display = 'none'; return; }
el.style.display = 'block';
el.style.left = sx + 'px';
diff --git a/Pirate-Ship-Battle-Royal-v1.0/behaviors/ShipController.yaml b/Pirate-Ship-Battle-Royal-v1.0/behaviors/ShipController.yaml
index aba0f66..3359fb4 100644
--- a/Pirate-Ship-Battle-Royal-v1.0/behaviors/ShipController.yaml
+++ b/Pirate-Ship-Battle-Royal-v1.0/behaviors/ShipController.yaml
@@ -121,6 +121,53 @@ code: |+
if (refs.length === AI_NAMES.length) this._aiShipRefs = refs;
};
+ this._getSafeArea = function() {
+ if (this.erth && this.erth.viewport && this.erth.viewport.getSafeArea) {
+ return this.erth.viewport.getSafeArea();
+ }
+ if (this.game && this.game.getViewportSafeArea) {
+ return this.game.getViewportSafeArea();
+ }
+ return {
+ left: 0,
+ top: 0,
+ right: window.innerWidth,
+ bottom: window.innerHeight,
+ width: window.innerWidth,
+ height: window.innerHeight,
+ insetLeft: 0,
+ insetTop: 0,
+ insetRight: 0,
+ insetBottom: 0
+ };
+ };
+
+ this._syncTouchUILayout = function() {
+ if (!this._touchUI || !this._touchUI.length) return;
+ var safe = this._getSafeArea();
+ var key = [safe.insetLeft, safe.insetRight, safe.insetBottom].join(':');
+ if (this._touchLayoutKey === key) return;
+ this._touchLayoutKey = key;
+
+ var base = document.getElementById('pirate-joystick');
+ if (base) {
+ base.style.left = (safe.insetLeft + 20) + 'px';
+ base.style.bottom = (safe.insetBottom + 32) + 'px';
+ }
+
+ var fireBtn = document.getElementById('pirate-fire-btn');
+ if (fireBtn) {
+ fireBtn.style.right = (safe.insetRight + 20) + 'px';
+ fireBtn.style.bottom = (safe.insetBottom + 48) + 'px';
+ }
+
+ var sprintBtn = document.getElementById('pirate-sprint-btn');
+ if (sprintBtn) {
+ sprintBtn.style.right = (safe.insetRight + 20) + 'px';
+ sprintBtn.style.bottom = (safe.insetBottom + 152) + 'px';
+ }
+ };
+
this._createTouchUI = function() {
this._removeTouchUI();
// Also clear any orphaned touch UI from previous sessions
@@ -167,6 +214,8 @@ code: |+
document.body.appendChild(fireBtn);
document.body.appendChild(sprintBtn);
this._touchUI = [base, fireBtn, sprintBtn];
+ this._touchLayoutKey = null;
+ this._syncTouchUILayout();
var MAX = 46; var startX = 0; var startY = 0; var active = false;
base.addEventListener('pointerdown', function(e) {
@@ -235,6 +284,7 @@ code: |+
this.update = function(dt) {
if (!this.target) return;
+ this._syncTouchUILayout();
var health = this.target.userData._shipHealth;
if (health && health.isDead) return;
diff --git a/Pirate-Ship-Battle-Royal-v1.0/pirate-ship-battle-royal-v1.0.stemscript b/Pirate-Ship-Battle-Royal-v1.0/pirate-ship-battle-royal-v1.0.stemscript
index af588eb..62969c2 100644
--- a/Pirate-Ship-Battle-Royal-v1.0/pirate-ship-battle-royal-v1.0.stemscript
+++ b/Pirate-Ship-Battle-Royal-v1.0/pirate-ship-battle-royal-v1.0.stemscript
@@ -152,47 +152,47 @@ update "rocks-sand-a.glb 1" position={"x":-28.466,"y":-0.7,"z":-8.137} objectSet
physics set "rocks-sand-a.glb 1" config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
update palm-straight.glb position={"x":-28.971,"y":1.88,"z":-7.612} objectSettings={"isSelectable":false}
physics set palm-straight.glb config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=GameHost position={"x":0,"y":0,"z":1.62} rotation={"x":0,"y":0,"z":0} scale={"x":0.1,"y":0.1,"z":0.1} color=#000000 objectSettings={"isSelectable":false,"gameVisibility":false}
+add box name=GameHost position={"x":0,"y":0,"z":1.62} rotation={"x":0,"y":0,"z":0} scale={"x":0.1,"y":0.1,"z":0.1} color=#000000 objectSettings={"isSelectable":false,"gameVisibility":true}
physics set GameHost config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=HUDHost position={"x":1,"y":0,"z":0.811} rotation={"x":0,"y":0,"z":0} scale={"x":0.1,"y":0.1,"z":0.1} color=#000000 objectSettings={"isSelectable":false,"gameVisibility":false}
+add box name=HUDHost position={"x":1,"y":0,"z":0.811} rotation={"x":0,"y":0,"z":0} scale={"x":0.1,"y":0.1,"z":0.1} color=#000000 objectSettings={"isSelectable":false,"gameVisibility":true}
physics set HUDHost config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add group name=Group position={"x":0,"y":2,"z":-2.888} rotation={"x":0,"y":0,"z":0} scale={"x":1.698,"y":1.698,"z":1.698} objectSettings={"isSelectable":false,"gameVisibility":false}
+add group name=Group position={"x":0,"y":2,"z":-2.888} rotation={"x":0,"y":0,"z":0} scale={"x":1.698,"y":1.698,"z":1.698} objectSettings={"isSelectable":false,"gameVisibility":true}
physics set Group config={"enabled":false,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_0 position={"x":0,"y":2,"z":160} rotation={"x":0,"y":0,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_0 position={"x":0,"y":2,"z":160} rotation={"x":0,"y":0,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_0 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_1 position={"x":54.72,"y":2,"z":150.35} rotation={"x":0,"y":0.349,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_1 position={"x":54.72,"y":2,"z":150.35} rotation={"x":0,"y":0.349,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_1 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_2 position={"x":102.85,"y":2,"z":122.57} rotation={"x":0,"y":0.698,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_2 position={"x":102.85,"y":2,"z":122.57} rotation={"x":0,"y":0.698,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_2 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_3 position={"x":138.56,"y":2,"z":80} rotation={"x":0,"y":1.047,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_3 position={"x":138.56,"y":2,"z":80} rotation={"x":0,"y":1.047,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_3 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_4 position={"x":157.57,"y":2,"z":27.78} rotation={"x":0,"y":1.396,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_4 position={"x":157.57,"y":2,"z":27.78} rotation={"x":0,"y":1.396,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_4 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_5 position={"x":157.57,"y":2,"z":-27.78} rotation={"x":-3.142,"y":1.397,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_5 position={"x":157.57,"y":2,"z":-27.78} rotation={"x":-3.142,"y":1.397,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_5 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_6 position={"x":138.56,"y":2,"z":-80} rotation={"x":-3.142,"y":1.048,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_6 position={"x":138.56,"y":2,"z":-80} rotation={"x":-3.142,"y":1.048,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_6 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_7 position={"x":102.85,"y":2,"z":-122.57} rotation={"x":-3.142,"y":0.699,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_7 position={"x":102.85,"y":2,"z":-122.57} rotation={"x":-3.142,"y":0.699,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_7 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_8 position={"x":54.72,"y":2,"z":-150.35} rotation={"x":-3.142,"y":0.35,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_8 position={"x":54.72,"y":2,"z":-150.35} rotation={"x":-3.142,"y":0.35,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_8 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_9 position={"x":0,"y":2,"z":-160} rotation={"x":-3.142,"y":0,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_9 position={"x":0,"y":2,"z":-160} rotation={"x":-3.142,"y":0,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_9 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_10 position={"x":-54.72,"y":2,"z":-150.35} rotation={"x":-3.142,"y":-0.349,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_10 position={"x":-54.72,"y":2,"z":-150.35} rotation={"x":-3.142,"y":-0.349,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_10 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_11 position={"x":-102.85,"y":2,"z":-122.57} rotation={"x":-3.142,"y":-0.698,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_11 position={"x":-102.85,"y":2,"z":-122.57} rotation={"x":-3.142,"y":-0.698,"z":-3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_11 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_12 position={"x":-138.56,"y":2,"z":-80} rotation={"x":3.142,"y":-1.047,"z":3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_12 position={"x":-138.56,"y":2,"z":-80} rotation={"x":3.142,"y":-1.047,"z":3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_12 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_13 position={"x":-157.57,"y":2,"z":-27.78} rotation={"x":3.142,"y":-1.396,"z":3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_13 position={"x":-157.57,"y":2,"z":-27.78} rotation={"x":3.142,"y":-1.396,"z":3.142} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_13 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_14 position={"x":-157.57,"y":2,"z":27.78} rotation={"x":0,"y":-1.396,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_14 position={"x":-157.57,"y":2,"z":27.78} rotation={"x":0,"y":-1.396,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_14 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_15 position={"x":-138.56,"y":2,"z":80} rotation={"x":0,"y":-1.047,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_15 position={"x":-138.56,"y":2,"z":80} rotation={"x":0,"y":-1.047,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_15 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_16 position={"x":-102.85,"y":2,"z":122.57} rotation={"x":0,"y":-0.698,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_16 position={"x":-102.85,"y":2,"z":122.57} rotation={"x":0,"y":-0.698,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_16 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-add box name=CircleBoundary_17 position={"x":-54.72,"y":2,"z":150.35} rotation={"x":0,"y":-0.349,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":false}
+add box name=CircleBoundary_17 position={"x":-54.72,"y":2,"z":150.35} rotation={"x":0,"y":-0.349,"z":0} scale={"x":57.6,"y":10,"z":4} color=#5c4232 objectSettings={"isStatic":true,"isSelectable":false,"gameVisibility":true}
physics set CircleBoundary_17 config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
add group name="Group 8" position={"x":85.495,"y":-0.869,"z":-17.918} rotation={"x":0,"y":0,"z":0} scale={"x":1.061,"y":1.199,"z":1.061} objectSettings={"isSelectable":false}
physics set "Group 8" config={"enabled":false,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
@@ -516,7 +516,8 @@ update "ship-small.glb 4" position={"x":-93.6,"y":0.1,"z":-84.1} rotation={"y":1
physics set "ship-small.glb 4" config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Kinematic","enable_preview":false,"collision_material":"Ground","climbable":false}
add plane name=OceanSurface position={"x":1.3,"y":-0.5,"z":0} rotation={"x":0,"y":0,"z":0} scale={"x":317.013,"y":0.525,"z":335.509} color=#90cfe6 objectSettings={"isSelectable":false}
physics set OceanSurface config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-material OceanSurface roughness=100
+material OceanSurface roughness=100 tileAmountX=20 tileAmountY=20
+texture OceanSurface imageAsset=PIR_Water.png
update "ship-wreck.glb 2" position={"x":6.3,"y":-0.2,"z":1.1} rotation={"y":-0.785,"z":-1.571} objectSettings={"isSelectable":false}
physics set "ship-wreck.glb 2" config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
update "rocks-sand-c.glb 1" position={"x":3.2,"y":-0.53,"z":-3.927} scale={"x":1.281,"y":1.281,"z":1.281} objectSettings={"isSelectable":false}
@@ -525,7 +526,7 @@ update "rocks-sand-c.glb 2" position={"x":-4.9,"y":-1.7,"z":2.5} scale={"x":1.91
physics set "rocks-sand-c.glb 2" config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
update "cannon-mobile.glb 2" position={"x":-4.6,"y":2.6,"z":2.5} objectSettings={"isSelectable":false}
physics set "cannon-mobile.glb 2" config={"enabled":true,"shape":"box","shapeExcludesHiddenObjects":false,"mass":0,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Static","enable_preview":false,"collision_material":"Ground","climbable":false}
-update "skybox_day.glb 2" position={"x":2,"y":-20,"z":-9.1} scale={"x":0.5,"y":0.5,"z":0.5} objectSettings={"isSelectable":false,"gameVisibility":false}
+update "skybox_day.glb 2" position={"x":2,"y":-20,"z":-9.1} scale={"x":0.5,"y":0.5,"z":0.5} objectSettings={"isSelectable":false,"gameVisibility":true}
physics set "skybox_day.glb 2" config={"enabled":false,"shape":"box","shapeExcludesHiddenObjects":false,"mass":1,"restitution":0,"friction":0,"rollingFriction":0,"spinningFriction":0,"contactStiffness":0,"contactDamping":0,"ctype":"Dynamic","userShapeOffset":{"x":0,"y":0,"z":0},"userShapeScale":{"y":1,"z":1,"x":1},"enable_preview":false,"collision_material":"Ground","climbable":false}
behavior attach cannon-mobile.glb behaviorId=exported.cannonturret
behavior attach ship-pirate-large.glb behaviorId=exported.shiphealth