Commit Graph

50 Commits

Author SHA1 Message Date
Collin Smith
f78a3a2d08 Moved D2S to com.riiablo.save 2020-01-06 15:26:00 -08:00
Collin Smith
361158a481 Moved some engine consts to Riiablo class 2020-01-06 15:18:28 -08:00
Collin Smith
ff7a27d334 Added support for serializing and synchronizing dropped items
Added support for serializing and synchronizing dropped items
Picking up items not supported yet -- requires API change
Added packet types for DropItem and PickupItem
Added ItemP component table and ItemSerializer
Added EntityFactory#createItem(Item,float,float)
Removed CharStats.BlockFactor from Stat.toblock item property -- should be applied on view stats and base character properties list
2019-12-31 02:46:34 -08:00
Collin Smith
acd6d1691f Changed alphas from float32 to ubyte8 (fixed point) 2019-12-30 02:20:48 -08:00
Collin Smith
ad9a0be434 Increased buffer size to 8192 to accommodate larger d2s streams 2019-12-30 00:48:08 -08:00
Collin Smith
65e58e8bbe Added D2S serialization to Connection packet 2019-12-30 00:14:48 -08:00
Collin Smith
83476f6a65 Changed Sync to EntitySync, SyncData to ComponentP, Sync.data to Sync.component
Changed Sync to EntitySync, SyncData to ComponentP, Sync.data to Sync.component
This should result in cleaner API readability
Adjusted API slightly within NetworkSynchronizer + added note for future change
2019-12-29 15:29:53 -08:00
Collin Smith
5d7ecce6d7 Changed from IteratingSystem to BaseEntitySystem 2019-12-29 01:54:28 -08:00
Collin Smith
25e057c08a Only send connection packets to unconnected players -- prevents flooding until sync packets aggregated 2019-12-28 22:45:42 -08:00
Collin Smith
dd6dbca0f6 Enabled AI stepping with basic velocity adder system
Enabled AI stepping with basic velocity adder system
Created ServerAudio implementation of Audio which ignores Riiablo.audio calls
2019-12-28 01:25:44 -08:00
Collin Smith
a49f73f6c4 Added networking for object entities
Added networking for object entities
Casted cof component in flatbuffers to ensure they are sign extended properly (0xFF was not becoming 0xFFFFFFFF which is a special value)
Added additional check in CofManager#setComponent to ignore change if redundant
Increased output packet queue to 1024 -- will eventually group all sync packets into a single packet
2019-12-27 00:47:26 -08:00
Collin Smith
d3825290ee Changed EntityFactory API to better support networking
EntityFactory API now uses excel entry ids and lookup ids instead of references
Removed huge reliance on passing map references and instead use internal injected map and generated references
Fixed a bug where MapManager was inserting invalid entity ids that were causing a crash when searching through component mappers
2019-12-26 15:00:48 -08:00
Collin Smith
df14e4c18f Moved D2GS.Packet to separate Packet class 2019-12-25 15:44:06 -08:00
Collin Smith
b8a5049adb Added networking support for monster entities
Added networking support for dynamic object entities
Fixed issues with multiple packets in stream by prepending packet size
Fixed connection protocol for clients to wait until response received
Created Box2DDisposer system to destroy box2d bodies when an entity has Box2DBody removed
Created EntitySystemAdapter to simplify systems which are aspect event based (insert, removed, etc)
Removed Entity reference from Connection and changed to entity id instead
Renamed transform and alpha flag variables to tFlags and aFlags to remain consistent with elsewhere
Added DS1ObjectWrapperP to network DS1 objects (DS1 object reference is needed only for server-side/host)
2019-12-24 02:22:50 -08:00
Collin Smith
6b729c4350 Fixed some issues with connecting players -- connection protocol needs to be cleaned up more
ClientNetworkReceiver is disabled until Connection response is received
ClientNetworkSynchronizer will block until Connection response is received and drop other packets
Added ClassSerializer and DS1ObjectWrapperSerializer to transfer entity type and object data
Disabled networking on dynamic entities while I can determine issues with packet transfer
Added fix for AIStepper to make renderer bounds check optional -- will come up with a better solution to remove this client-only code
2019-12-23 03:10:45 -08:00
Collin Smith
ea040c318e Added networking for dynamic objects
Added networking for dynamic objects
Fixed disconnecting players not being removed from player ids table
NetworkSynchronizer conditionally processes based on if any players are connected
Disabled AIStepper when game is connected to a socket
2019-12-22 17:38:16 -08:00
Collin Smith
5d51a1c160 Created packet serializers
Created packet serializers and moved serialization code from NetworkSynchronizer into SerializationManager
2019-12-22 04:24:43 -08:00
Collin Smith
786cd255ee Implemented map generation step along with entity creation 2019-12-22 03:32:35 -08:00
Collin Smith
cbec965eb1 Appended P to sync component tables to remove need to fully qualify packet tables against components 2019-12-22 00:32:45 -08:00
Collin Smith
0018ebd500 Added initializer for Riiablo.strings 2019-12-21 22:16:01 -08:00
Collin Smith
866cdc0504 Added interactor and pathfind support to D2GS
Added interactor and pathfind support to D2GS
Removed some special case code from pathfinder -- was forcing reliance on client code in what should be server-only code
2019-12-20 13:59:43 -08:00
Collin Smith
c677ca415d Added support to set DT1 class to headless loading mode 2019-12-16 05:36:13 -08:00
Collin Smith
3669ffc57b Added support for creating entities for preexisting characters on new client instances 2019-12-15 02:06:35 -08:00
Collin Smith
8c38af053a Added network synchronization for position, velocity and angle 2019-12-15 01:25:26 -08:00
Collin Smith
15687b71c6 Improved D2GS client implementation
D2GS clients are now indexed using a fixed-size array
Connecting clients will now use the first available slot
Disconnecting clients will now have their corresponding entity deleted
Shutting down server will now wait for client threads to end
Removed separate iteration method for broadcast packets -- I don't think this distinction is necessary
Refactored AtomicBoolean with volatile boolean
Debug logging has been significantly been improved to indicate clients / packet types / remote addresses
2019-12-14 03:55:23 -08:00
Collin Smith
34eebb41aa Added disconnect packet and support for entity state synchronization
Disconnecting clients will now have a corresponding disconnect packet
Changing a players items will result in the change also appearing on other players' instances
2019-12-13 15:29:17 -08:00
Collin Smith
d296c6c647 Added support for disconnecting clients and broadcasting entity deletion 2019-12-12 15:22:31 -08:00
Collin Smith
e4df005987 Rewrote engine and replaced Ashley with Artemis
Rewrote engine and replaced Ashley with Artemis
Added basic networking support for D2GS (handshake and sending initial player state to clients)
2019-12-11 02:07:55 -08:00
Collin Smith
b64900c52c Added rudimentary support for BNCS (chat service) 2019-12-02 03:12:44 -08:00
Collin Smith
c009982e13 Changed port for d2gs within TCP/IP screen and implemented render() within d2gs 2019-12-02 02:03:31 -08:00
Collin Smith
c4917021ad Removed old server code and replaced Account with a different implementation 2019-11-30 22:14:07 -08:00
Collin Smith
018cc9767c Fixed passing connect info in JoinGame 2019-11-30 20:16:58 -08:00
Collin Smith
9f5d134eee Added MSI (master slave instancer) to create child D2GS processes
Added MSI (master slave instancer) to create child D2GS processes
This is intended to act as a temp structure for testing until support for actual servers are added where an API can generate proper instances
2019-11-30 20:02:36 -08:00
Collin Smith
115790f51a Added D2GS module build.gradle and main class 2019-11-30 15:56:47 -08:00
Collin Smith
ca94ac5a60 Added support for joining game sessions with MCP
Added support for joining game sessions with MCP
Created MAX_PLAYERS constant in Engine
2019-11-30 15:22:03 -08:00
Collin Smith
4a5a03edbc Added support for creating game sessions with MCP
Added support for creating game sessions with MCP
Forced debug mode for BNLS and MCP for testing purposes
Fixed type with Result#ALREADY_EXISTS constant
Extended GameSession to support builder pattern and CreateGame copy constructor
2019-11-30 02:24:13 -08:00
Collin Smith
ac35310ace Added MCP server module which acts as the server browser
Added MCP server module which acts as the server browser
MCP only supports listing games at this time
Minor changes to LoginScreen to reflect how LobbyScreen was written differently
Added desktop with networking run config which starts up server instances and then a client
Created GameSession class which is used as a cache for mcp GameSession packets
2019-11-30 01:46:56 -08:00
Collin Smith
5e23ac48b0 Moved BNLS to separate module and removed old server module as it's all deprecated now anyways 2019-11-29 22:04:17 -08:00
Collin Smith
7ebf72d231 Added login system and reintegrated realm lobby 2019-11-29 21:33:58 -08:00
Collin Smith
7495aff11d Added support for multiple client connections to BNLS
Added support for multiple client connections to BNLS
Added support for ConnectionClosed packet to politely close connection
2019-09-12 02:23:53 -07:00
Collin Smith
3b24c3a58b Created BNLS (login service) skeleton 2019-08-27 22:37:16 -07:00
Collin Smith
cc2ea8ba00 Removed eclipse stuff from gradle (was giving warnings and completely unused) 2019-06-24 03:25:43 -07:00
Collin Smith
fc5786aa77 Deleted gdx.diablo 2019-03-29 04:00:50 -07:00
Collin Smith
86c4e6d8ef Added functional networking with multiple clients in a server rendered correctly
Fixed bug with Map.find(int) returning actual GridPoint -- now returns a copy
Added workaround for set(String) in Cvar when generic type is String
Transition to entity package with refinements
2019-02-08 20:56:04 -08:00
Collin Smith
49f1058566 Added basic server support (create/join games and chat)
Separated services into ChatServer, DedicatedServer and Sessions
Single player uses same code-base as DedicatedServer with a special loopback socket
Added SelectCharacterScreen2 copy -- will replace later on with more versatile SelectCharacterScreen impl
2019-02-03 02:47:08 -08:00
Collin Smith
a1e735031f Added server browser chat
Some work on in-game chat
Separated Server into multiple systems (will be easier to transition to distributed servers later)
Minor entity changes -- may transition to an ECS soon
2019-01-30 15:40:17 -08:00
Collin Smith
e0ed5b2cda Added tests
Fixed issue where JsonReader was closing socket when reading request packet
2019-01-21 00:11:24 -08:00
Collin Smith
cbaba5c40b Moved sessions to global Array
Added Session.Builder used to create a session
create-session will now add created session to master list
2019-01-17 22:34:55 -08:00
Collin Smith
d75fa8661c Added basic multiplayer lobby support 2019-01-16 20:42:46 -08:00
Collin Smith
015c878c3c Added server module with extremely basic socket support 2019-01-14 01:54:17 -08:00