Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
be929c8
Networking: add native ReplicaManager3 entity replication
Segfaultd Jun 1, 2026
b5b8bc5
Networking: dispatch RPCs natively through RPC4
Segfaultd Jun 1, 2026
52be65b
World: turn the engine into a native replication facade
Segfaultd Jun 1, 2026
58929a9
Integrations: adapt server/client to native replication + RPC4
Segfaultd Jun 1, 2026
f8e0882
Networking: send RPCs via typed peer methods, tidy comments
Segfaultd Jun 1, 2026
11b28fe
World: replicate at the configured tick rate
Segfaultd Jun 1, 2026
99de5d6
Networking: expose SignalExcept as the public relay primitive
Segfaultd Jun 1, 2026
21702b8
Scripting: add reusable JS property-registration helpers
Segfaultd Jun 2, 2026
f98369b
Networking: built-in server-authoritative transform forcing
Segfaultd Jun 2, 2026
6ebfe20
Networking: server state override, JS-safe IDs, RPC4 slots
Segfaultd Jun 2, 2026
8512703
Scripting: reusable Entity builtin, accessor-property setters
Segfaultd Jun 2, 2026
6e9c41b
Networking: notify the new owner on ownership change
Segfaultd Jun 2, 2026
db848a0
Framework: drop changelog-style comments
Segfaultd Jun 2, 2026
d2d122e
Chat: hoist chat transport and scripting API to the framework
Segfaultd Jun 2, 2026
da0e344
Networking: route RPC handlers through RPC4 context
Segfaultd Jun 2, 2026
40e88c9
Networking: use native broadcast exclusion, drop dead const_cast
Segfaultd Jun 2, 2026
843a929
Networking: drop const_cast on GetReplicaAtIndex
Segfaultd Jun 2, 2026
1a7955e
Networking: serialize ChatMessage via native std::string
Segfaultd Jun 2, 2026
fb22bfd
Networking: Remove unused properties
Segfaultd Jun 2, 2026
250a232
Networking: adopt native VirtualWorld dimension scoping
Segfaultd Jun 3, 2026
31baea2
Framework: remove flecs from the core
Segfaultd Jun 3, 2026
5dd4c66
Framework: drop the world Engine facade, use ReplicationManager directly
Segfaultd Jun 3, 2026
696415e
Framework: drop committed MafiaHubServices.lib build artifact
Segfaultd Jun 3, 2026
71b9b2d
Networking: accept any JS number for integral property setters
Segfaultd Jun 3, 2026
c2fb53a
Networking: drop model identity from NetworkEntity
Segfaultd Jun 3, 2026
6eafa83
Networking: optimize interest queries and own peer teardown
Segfaultd Jun 3, 2026
ff49cb1
Integrations: wire avatar teardown and connect metadata
Segfaultd Jun 3, 2026
d9b7e72
Networking: never cull entities a connection owns
Segfaultd Jun 3, 2026
d8ba1b8
Integrations: drop vestigial ClientInitPlayer round-trip
Segfaultd Jun 3, 2026
65ceb9b
Networking: expose entity ownership predicate on NetworkEntity
Segfaultd Jun 3, 2026
c73d795
Networking: compress NetworkID in ForceState and SetOwner RPCs
Segfaultd Jun 3, 2026
57adc3a
Networking: own server-unassigned entities in IsOwner
Segfaultd Jun 3, 2026
b8d1c48
Networking: correct Serialize doc to broadcast-identically
Segfaultd Jun 3, 2026
4cf349c
Core: assert against double replication registration
Segfaultd Jun 3, 2026
5948623
Integrations: drop unused and duplicate includes
Segfaultd Jun 3, 2026
8fda339
Networking: replace custom handshake with stock plugins
Segfaultd Jun 3, 2026
81d969d
Networking: consume update timestamp for client extrapolation
Segfaultd Jun 3, 2026
8720d70
Scripting: destroy resource-owned entities on stop
Segfaultd Jun 3, 2026
a891778
Networking: keep ServerResources bitstream aligned on overflow
Segfaultd Jun 3, 2026
ebb8f20
Networking: guard against duplicate disconnect callbacks
Segfaultd Jun 3, 2026
87549db
Integrations: send real Discord id in ClientIdentity
Segfaultd Jun 3, 2026
aa4be13
Merge branch 'develop' into feature/mafianet-native-replication
Segfaultd Jun 3, 2026
8eaa19f
Networking: drop legacy IMessage custom-message facility
Segfaultd Jun 3, 2026
0c079a1
Networking: rename messages.h to connection.h
Segfaultd Jun 3, 2026
f3f796a
Networking: bump vendored MafiaNet to v0.8.0
Segfaultd Jun 3, 2026
51d7b05
Networking: carry kick reason natively on disconnect
Segfaultd Jun 3, 2026
61a718b
Scripting: add Player entity with native kick binding
Segfaultd Jun 3, 2026
f4f086e
Networking: gate forced-state RPCs and scale interest queries
Segfaultd Jun 4, 2026
d608d6d
Networking: drop unused hash field from ServerResources
Segfaultd Jun 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ vendors/directxtk/MakeSpriteFont/obj/Debug/MakeSpriteFont.csproj.AssemblyReferen
vendors/directxtk/MakeSpriteFont/obj/Release/MakeSpriteFont.csproj.AssemblyReference.cache
/vendors/directxtk/MakeSpriteFont/obj
/vendors/directxtk/MakeSpriteFont/obj

# MafiaHub Services build outputs
code/framework/src/services/lib/Debug/
code/framework/src/services/lib/Release/
16 changes: 8 additions & 8 deletions code/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ set(FRAMEWORK_SRC

src/external/sentry/wrapper.cpp

src/world/engine.cpp
src/world/server.cpp
src/world/client.cpp
src/world/modules/modules_impl.cpp

src/networking/network_peer.cpp
src/networking/errors.cpp

src/networking/replication/network_entity.cpp
src/networking/replication/entity_factory.cpp
src/networking/replication/replication_manager.cpp
src/networking/replication/replication_connection.cpp

# JavaScript scripting engine base and builtins (used by both client and server)
# Note: node_engine.cpp and v8_engine.cpp are in OBJECT libraries due to special compile flags
src/scripting/engine.cpp
Expand Down Expand Up @@ -174,8 +174,8 @@ macro(link_shared_deps target_name)
${CMAKE_SOURCE_DIR}/vendors/json/include
${CMAKE_SOURCE_DIR}/vendors/spdlog/include
${CMAKE_SOURCE_DIR}/vendors/fmt/include
${CMAKE_SOURCE_DIR}/vendors/fu2 # function2 (used in world/modules/base.hpp)
${CMAKE_SOURCE_DIR}/vendors/mafianet/Source/include # Networking / MafiaNet (used in messages.h)
${CMAKE_SOURCE_DIR}/vendors/fu2 # function2 (used in network_peer.h)
${CMAKE_SOURCE_DIR}/vendors/mafianet/Source/include # Networking / MafiaNet (used in connection.h)
${CMAKE_SOURCE_DIR}/vendors/cxxopts # Command-line parsing (used in integrations)
${CMAKE_SOURCE_DIR}/vendors # flecs, etc.
)
Expand All @@ -201,7 +201,7 @@ macro(link_shared_deps target_name)
endif()

# Global libraries (v8/v8pp excluded - linked explicitly to scripting targets only)
target_link_libraries(${target_name} MafiaNet glm spdlog cppfs nlohmann_json Sentry httplib OpenSSL::SSL OpenSSL::Crypto Curl flecs_static semver Hash ftl)
target_link_libraries(${target_name} MafiaNet glm spdlog cppfs nlohmann_json Sentry httplib OpenSSL::SSL OpenSSL::Crypto Curl semver Hash ftl)

# Required libraries for windows
if(WIN32)
Expand Down
20 changes: 10 additions & 10 deletions code/framework/src/core_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ namespace Framework::Networking {
class NetworkPeer;
} // namespace Framework::Networking

namespace Framework::World {
class Engine;
} // namespace Framework::World
namespace Framework::Networking::Replication {
class ReplicationManager;
} // namespace Framework::Networking::Replication


namespace Framework::GUI {
Expand Down Expand Up @@ -47,7 +47,7 @@ namespace Framework {
public:
static void Reset() noexcept {
_networkPeer = nullptr;
_engine = nullptr;
_replication = nullptr;
_scriptingModule = nullptr;
_webManager = nullptr;
_input = nullptr;
Expand All @@ -59,9 +59,9 @@ namespace Framework {
_networkPeer = peer;
}

static void SetWorldEngine(World::Engine *engine) {
FW_ASSERT_MODULE_REGISTRATION(_engine, engine, "WorldEngine");
_engine = engine;
static void SetReplication(Networking::Replication::ReplicationManager *replication) {
FW_ASSERT_MODULE_REGISTRATION(_replication, replication, "Replication");
_replication = replication;
}

static void SetScriptingModule(Scripting::ScriptingModule *module) {
Expand All @@ -88,8 +88,8 @@ namespace Framework {
return _networkPeer;
}

static World::Engine *GetWorldEngine() noexcept {
return _engine;
static Networking::Replication::ReplicationManager *GetReplication() noexcept {
return _replication;
}

static Scripting::ScriptingModule *GetScriptingModule() noexcept {
Expand All @@ -110,7 +110,7 @@ namespace Framework {

private:
static inline Networking::NetworkPeer *_networkPeer {};
static inline World::Engine *_engine {};
static inline Networking::Replication::ReplicationManager *_replication {};
static inline Scripting::ScriptingModule *_scriptingModule {};
static inline GUI::Manager *_webManager {};
static inline Input::IInput *_input {};
Expand Down
5 changes: 5 additions & 0 deletions code/framework/src/external/discord/wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ namespace Framework::External::Discord {
});
}

std::string Wrapper::GetUserId() const {
const auto id = _user.GetId();
return id ? std::to_string(id) : std::string {};
}

discord::UserManager &Wrapper::GetUserManager() const {
return _instance->UserManager();
}
Expand Down
3 changes: 3 additions & 0 deletions code/framework/src/external/discord/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace Framework::External::Discord {

void SignInWithDiscord(const DiscordLoginProc &proc) const;

// Snowflake of the signed-in user once OnCurrentUserUpdate has fired, empty otherwise.
std::string GetUserId() const;

discord::ActivityManager &GetActivityManager() const;
discord::UserManager &GetUserManager() const;
discord::ImageManager &GetImageManager() const;
Expand Down
Loading
Loading