Commit Graph

910 Commits

Author SHA1 Message Date
Collin Smith
ec63e6806d Added constants for difficulties 2020-01-07 00:46:20 -08:00
Collin Smith
1cb5e160d2 Resolved todo -- replaced static NUM_DIFFS field with pointer to Riiablo.MAX_DIFFS 2020-01-06 17:25:22 -08:00
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
b534fed719 Created engine consts for acts and diffs 2020-01-06 14:09:31 -08:00
Collin Smith
c9a5e50a1c Renamed charClass to classId 2020-01-06 01:35:05 -08:00
Collin Smith
0768b5b8cc Renamed getSkill to getAction 2020-01-04 14:54:48 -08:00
Collin Smith
dc1aff5b4a Fixed log tag error 2020-01-04 02:10:56 -08:00
Collin Smith
a1bca12d62 Defer item inv file finish loading to future frame 2020-01-01 03:20:44 -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
f5179bbaaa Changed CofAlphas packet from float32 to uint8 (fixed point) 2019-12-30 02:39:57 -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
cf180ee496 Updated gif 2019-12-29 21:30: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
75405efe09 Added flatbuffers to readme 2019-12-28 23:30:57 -08:00
Collin Smith
aa332fbb65 Added videos 2019-12-28 23:25:17 -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
03c620d574 Deprecated class type serialization in favor of adding the field to Sync table directly 2019-12-28 17:05:34 -08:00
Collin Smith
6b57dc8813 Added serialization and network synchronization for monster entities
Added serialization and network synchronization for monster entities
Blocked local monster creation when socket is non-null
2019-12-28 16:56:26 -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
788df90239 Added networking support for warps
Created WarpP and WarpSerializer
Created Map.Zone#addWarp(int) to support inserting warp entities to parent zones
Changed implementation of MapManager to insert warp entities using above method
2019-12-27 15:23:12 -08:00
Collin Smith
aba55c5ffa Added cases for other item types 2019-12-27 14:37:17 -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
8c572da389 Added type field to Sync flatbuffer
Added type field to Sync flatbuffer
Replaced findPlayer and findDS1ObjectWrapper with findTable that uses generics
2019-12-26 02:03:47 -08:00
Collin Smith
df14e4c18f Moved D2GS.Packet to separate Packet class 2019-12-25 15:44:06 -08:00
Collin Smith
f285d2666d Replaced int arrays with IntArray 2019-12-25 15:25:50 -08:00
Collin Smith
906839a8c0 Removed MonPreset references from obj.txt and Obj excel
Removed MonPreset references from obj.txt and Obj excel
Removed Type column from obj.txt (all entries are type 2 now)
Made Obj.Entry indexed instead of using Description as primary key
Obj excel is now only used for static object ids
Reduced MonPreset entries to 60
2019-12-25 03:26:32 -08:00
Collin Smith
532ec4f74e Created Excel for MonPreset 2019-12-25 02:56:54 -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
3860283e61 Committing MenuWrapper component and NpcInteractionEvent 2019-12-21 22:42:52 -08:00
Collin Smith
0018ebd500 Added initializer for Riiablo.strings 2019-12-21 22:16:01 -08:00
Collin Smith
fd606b4d18 Decoupled client specific code from AI
Changed ClientEntityFactory reference type to EntityFactory
Removed references to MenuManager and DialogManager in favor of an event-based approach
ClientEntityFactory is now in charge of calling special Npc#createMenu method
2019-12-21 22:12:31 -08:00
Collin Smith
0d88f138d9 Disabled entity creation when socket is non-null 2019-12-21 01:22:11 -08:00
Collin Smith
55fdf47312 Decoupled network sync code from NetworkedGameScreen into ClientNetworkReceiver 2019-12-21 00:43:26 -08:00
Collin Smith
b3f2a223c3 Fixed MapViewer entity generation 2019-12-20 14:22:11 -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
3cd621c4bf Decoupled entity creation from map generation and created MapManager to manage map entity creation instead
This change should help with adding support for server authoritative entity creation
2019-12-20 02:50:37 -08:00
Collin Smith
b537195d7c Created ItemManager to play drop and flippy sounds for dropped item entities 2019-12-19 02:25:01 -08:00
Collin Smith
7c18932b65 Made ClientEntityFactory a subclass of ServerEntityFactory with client-specific components appended 2019-12-19 02:13:22 -08:00
Collin Smith
5cdd7cce1a Reverted previous change in favor of more elegant solution
Added setter method for CofReference
Defined default modes for Class.Type types
Creating CofReference will require setting default mode mentioned above
CofManager will now call initial events when CofReference component is added
ObjectInitializer will automatically initialize when Object component is added
2019-12-18 02:53:07 -08:00
Collin Smith
a44ef4c799 Added setter method for MapWrapper component 2019-12-18 02:17:32 -08:00