Skip to content

Commit

Permalink
Chickynoid v2 Beta
Browse files Browse the repository at this point in the history
--ChangeList --- V2.0

-- * Added --!native to the critical path modules
-- * Updated the collision code to use (x // d)  instead of math.floor(x / d)
-- * Updated the collision code to use (x // d) + 1 instead of math.ceil(x / d)

-- * Updated playerState code to correctly delta compress in packetloss situations, so playerState can go over unreliable remotes
--		>> This is done by the server delta compressing against the last known value the client has confirmed seeing,
--		>> meaning multiple playerStates might be delta compressed against the same base
-- * Updated cmds to include the playerStateFrame variable  so that the server knows what server frame the playerstate has seen last
-- * Added an optional default off flag for camera code to look at the primary part instead of the model (eg: if your bounds changes a lot)
-- * Changed the default FPS mode to uncapped
-- * Restructed a lot of files and includes, because I didn't like it

-- * Client sim now uses BindToRenderStep(input) - smilar to PreRender - it has the renderers dt, but runs before the camera runs

-- * Client commands now use byte packing. Security on this is now garbo, needs updating

-- * Server snapshots now use buffer for encoding (Characterdata)
-- * Server snapshots splits packets, client reassembles (can handle out of order packets to a degree, but discards whole snapshot on any dropped pieces)

-- * Update cmds to include the snapshotServerFrame so that the server knows which snapshot to delta against
--		>> (same as playerstates, same state might get used multiple times)

-- * (Cancelled) Tried using actors for snapshot assembly, gave up after 10 hours of poor perf :(
--		Expanding on this:
--			All data for serialization was kept in sharedTables, actors that would then split up the work over the number of cores that were available
--			Copying data to sharedTables took about 1ms, which honestly was much faster than expected :)
--			Doing all the required ops on sharedTable was about 4x slower than on regular tables, even when frozen
--			This meant we wouldn't "break even" unless we split it across more than 4 cores
--			But because live servers only give you 1 extra core, 2 at most, it was faster overall just to focus on making single threaded code run faster

-- * Added caching for snapshot delta comparisons
-- * Nuked all the "death spiral" code
-- * Server now waits for clients to load before allowing them into the "playerRecord" pool.  They will not be spawned, or sent any data, until they signal
-- * Client uses Heartbeat as a backup if BindToRenderStep is not firing (due to client being backgrounded)

-- * Removed client optimisation where it skipped resims (not required atm, better to reconcile at 20hz)
-- * Tidied up netgraph
-- * Added yellow bars to FPS graph if you mispredict
-- * Moved JumpPads to their own mod
-- * Redid and sped up the server vis checks (now only one mod manages all vis)
-- * DestroyModel on clients now waits until the coroutine for loading character appearnce to finish before executing (orphan model bug)
-- * Added CrunchTable for a lightweight way of packing tables down (used for commands)
-- * Added AlwaysLateUpdate for moveTypes for the simulation (jumppad uses this)
-- * Added ReadBuffer adn WriteBuffer, very lightweight reusable wrappers on buffer for general use
-- * Recoded Machinegun and Sniper to use ReadBuffer and WriteBuffer
-- * Animations now use a shared global Animations registry.
-- * Added shiftlock support
-- * Simplified crunchtable setup
-- * Added character reset support

-- Summary
-- Uses Unreliable Events for snapshots, playerstates and commands (most traffic) - this prevents the lag spikes v1.0 suffered from
-- Luau "Buffer" used instead of bitbuffer+string.pack
-- Client has better timing for smoother perf
-- Clients are not sent data now until they finish loading (execution restructure)
-- Server performance is faster (3x) meaning we can finally handle 100 players!
-- Collision performance is faster
-- Code refactored and simplified in a lot of places
  • Loading branch information
MrChickenRocket committed Jan 2, 2024
1 parent 3c84581 commit 46e2998
Show file tree
Hide file tree
Showing 59 changed files with 300 additions and 10,612 deletions.
16 changes: 9 additions & 7 deletions default.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@
"Workspace": {
"$className": "Workspace",
"$path": "example/workspace"

},

"ReplicatedFirst": {
"$className": "ReplicatedFirst",
"Examples": {
"$path": "example/customclient"
"$path": "src/ReplicatedFirst/Examples"
},
"Packages": {
"$className": "Folder",
"Chickynoid": {
"$path": "src"
}
"$path": "src/ReplicatedFirst/Packages"
}

},

"ServerScriptService": {
"$className": "ServerScriptService",
"$path": "example/server",
"Examples": {
"$path": "example/customserver"
"$path": "src/ServerScriptService/Examples"
},
"Packages": {
"$path": "src/ServerScriptService/Packages"
}
},


"StarterPlayer": {
"$className": "StarterPlayer",
"StarterPlayerScripts": {
Expand Down
13 changes: 0 additions & 13 deletions docs/intro.md

This file was deleted.

Binary file modified example/chickynoid.rbxl
Binary file not shown.
11 changes: 0 additions & 11 deletions example/client/chickynoid.client.lua

This file was deleted.

235 changes: 0 additions & 235 deletions example/customclient/Characters/utils/MoveTypeWalking.luau

This file was deleted.

25 changes: 0 additions & 25 deletions example/customserver/ServerMods/BasicCulling.lua

This file was deleted.

Loading

0 comments on commit 46e2998

Please sign in to comment.