Add working debug level with grass and soil tiles

- Created DebugLevel class that bypasses complex TiledLevel loader
- Simple platform with grass tiles (10.gif) on top, soil tiles (10.gif) underneath
- Fixed tile texture paths to work with MAPS_PATH
- Fixed null check in User.js to prevent server crashes
- Working physics collision with Box2D
- Clean test environment for physics engine migration
This commit is contained in:
Karl Pannek 2025-07-16 12:51:31 +02:00
parent e6089687ed
commit 244dc50037
8 changed files with 336 additions and 6 deletions

View file

@ -92,7 +92,13 @@ function (Parent, ProtocolHelper, nc) {
User.prototype.onGameCommand = function(options) {
// repacking for transport via pipe
var message = ProtocolHelper.encodeCommand("gameCommand", options);
this.channelPipe.sendToUser(this.id, message);
// Check if channelPipe exists before trying to send
if (this.channelPipe) {
this.channelPipe.sendToUser(this.id, message);
} else {
console.warn("User " + this.id + " tried to send game command but channelPipe is null");
}
};
User.prototype.onPing = function(timestamp) {