Skip to content

Commit

Permalink
Refactor: Move the WorldServer prototype around
Browse files Browse the repository at this point in the history
It doesn't do much, but I'll probably want to research the various game mechanics more in the future. So for the time being, the server can stay, but it should be moved out of the way a little.
  • Loading branch information
rdw-software committed Dec 15, 2023
1 parent 2aa9957 commit 65b172b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion Core/WorldServer.lua → Core/WorldServer/WorldServer.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local ffi = require("ffi")
local uv = require("uv")

local C_ServerHealth = require("Core.World.C_ServerHealth")
local C_ServerHealth = require("Core.WorldServer.C_ServerHealth")

local TARGET_FPS = 50

Expand Down
2 changes: 1 addition & 1 deletion Tests/WorldServer/C_ServerHealth.spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local C_ServerHealth = require("Core.World.C_ServerHealth")
local C_ServerHealth = require("Core.WorldServer.C_ServerHealth")

describe("C_ServerHealth", function()
describe("UpdateWithTickTime", function()
Expand Down
4 changes: 2 additions & 2 deletions Tests/WorldServer/WorldServer.spec.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local console = require("console")
local uv = require("uv")

local WorldServer = require("Core.WorldServer")
local C_ServerHealth = require("Core.World.C_ServerHealth")
local WorldServer = require("Core.WorldServer.WorldServer")
local C_ServerHealth = require("Core.WorldServer.C_ServerHealth")

local function simulateServerTick()
local startTime = uv.hrtime()
Expand Down
6 changes: 1 addition & 5 deletions main.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
package.path = "?.lua"

local WorldServer = require("Core.WorldServer")

WorldServer:Start()
-- Placeholder: For the time being, each app has to be started separately
5 changes: 5 additions & 0 deletions start-server.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package.path = "?.lua"

local WorldServer = require("Core.WorldServer.WorldServer")

WorldServer:Start()

0 comments on commit 65b172b

Please sign in to comment.