From 2ce016cbbc63f3897a8de89a4796ff59eb35d088 Mon Sep 17 00:00:00 2001 From: zakarya Date: Fri, 3 Mar 2023 12:38:54 -0800 Subject: [PATCH] moved the test tree, enabled the sending of server data --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index bd0cbbe..091d9ba 100644 --- a/server.js +++ b/server.js @@ -27,7 +27,7 @@ var game_data = { } } var nodes = new Set(); -nodes.add(new Engine.node(new Engine.vector(10, 10), 0, game_data.world.biome.forest.tree.radius, game_data.world.biome.forest.tree.size, "tree")); +nodes.add(new Engine.node(new Engine.vector(70, 70), 0, game_data.world.biome.forest.tree.radius, game_data.world.biome.forest.tree.size, "tree")); var characters = new Set(); var server_fps = 20; var player_render_distance = 1000; @@ -102,7 +102,7 @@ server.on("connection", function (socket, request) { this_player.id = Engine.create_id(); characters.add(this_player); - //socket.send(JSON.stringify({"type": "server_data", "data": {"fps": server_fps}})); + socket.send(JSON.stringify({"type": "server_data", "data": {"fps": server_fps}})); socket.send(JSON.stringify({"type": "world", "data": Array.from(nodes)})); console.log("a client has connected");