Commit Graph

838 Commits

Author SHA1 Message Date
Collin Smith
02a6cd4b56 Created PacketHandler class to help with decoding fbs packet objects from netty channels 2020-06-17 21:33:34 -07:00
Collin Smith
ef94883dd7 Refactored name scheme 2020-06-17 21:16:04 -07:00
Collin Smith
a2000a6162 Fixed some initialization issues and created reliable ChannelHandler implementations to help deal with UDP reliability 2020-06-17 21:09:56 -07:00
Collin Smith
cad29c7b82 Created Header table in Netty fbs and sample packet 2020-06-16 02:40:39 -07:00
Collin Smith
f5454be03d Created test fbs packets 2020-06-14 20:59:27 -07:00
Collin Smith
cbd55ee164 Replaced StringEscapeUtils from apache commons-lang3 with commons-text
StringEscapeUtils from commons-lang3 was deprecated and should be using version from commons-text
Optimized imports
2020-06-14 12:35:15 -07:00
Collin Smith
dd54d11d9f Transitioned to UDP client/server 2020-06-13 21:13:11 -07:00
Collin Smith
eda10f1da9 Small optimization 2020-06-13 17:45:36 -07:00
Collin Smith
4dcfe2ff00 Created netty module to try implementing UDP servers and move away from the LibGDX networking 2020-06-13 17:42:05 -07:00
Collin Smith
07d98015fd Fixed code formatting and removed fully qualified com.riiablo.codec.COF references 2020-06-13 01:25:19 -07:00
Collin Smith
6be70a3667 Changed parameters for hits ObjectSet -- libgdx changed the parameter check an doesn't allow 1.0f load factor 2020-06-12 22:28:34 -07:00
Collin Smith
eb2d672ac1 Improved accuracy of networking ping calculation #77 2020-06-12 20:08:58 -07:00
Collin Smith
cbfae0f702 Cleaned formatting and alignment 2020-06-12 19:22:50 -07:00
Collin Smith
97b1a3d2d3 Removed static methods and management structs from SystemProfiler
Created ProfilerManager passive system to act as a manager and factory for SystemProfiler instances
Changed SystemProfiler static functions to be a ProfilerManager instance via injection
Fixed some UI bugs within SystemProfiler GUI including incorrect width
Added reference to ProfilerSystem within CursorMovementSystem to block input events when profiler GUI is open
Removed ProfilerSystem#dispose() -- ProfilerManager has it's own dispose method
Reduced visibility of SystemProfiler constructors -- instances should only be created by ProfilerManager
SystemProfiler#initialize() will no longer add the instances to a struct -- automatically added when created by ProfilerManager factory
2020-06-12 17:47:05 -07:00
Collin Smith
8f04cb5c94 Removed dependency on net.mostlyoriginal.artemis-odb:contrib-plugin-profiler
Replaced with com.riiablo.profiler
Copied contrib-plugin-profiler GUI skin to internal assets
2020-06-12 16:04:05 -07:00
Collin Smith
42ff871f38 Removed unneed code 2020-06-12 15:52:43 -07:00
Collin Smith
1c920b461c Created profilers for ping and rtt metrics #77
Implemented averaging of network latency samples via NetworkProfiler
NetworkProfiler handles the interfacing between Profiler plugin and Pinger system
Created IntervalBaseSystem which is a copy of IntervalSystem without dependency on any Aspect
Added support for a PacketListener for Pinger system (receives callbacks for received ping packets)
2020-06-12 15:51:56 -07:00
Collin Smith
2e9e3f2b1f Created a SystemProfiler for CPU and CPU parts of a frame
Created actual SystemProfiler instances for sampling CPU and GPU frame times
CPU and GPU frame times are now graphed with each system (adding them should give total frame time)
Added sample field to SystemProfiler to store value of last call to SystemProfiler#sample(long)
Removed CPU and GPU profiling from ProfilerSystem
2020-06-11 18:39:43 -07:00
Collin Smith
fcd4fa607f Created metrics for tracking CPU and GPU time
Rewrote artemis-odb-contrib/contrib-plugin-profiler
Profiler was too restrictive and privated many useful fields and had static methods, yuk
Profiler plugin will always run and the key will only hide the UI (and set it as GPU system)
Profiler plugin will maybe be modified in the future to be more extensible
Extended profiler plugin to support tagging systems as GPU systems
I'd like to know which systems are slow and track CPU/GPU bottlenecks on mobile
2020-06-11 01:19:49 -07:00
Collin Smith
b1a3411073 Created Metrics class and moved metric fields to it
Metrics will have more metric fields added as we go
2020-06-10 00:32:14 -07:00
Collin Smith
3c08bfbf04 Added RTT field to Pinger 2020-06-09 22:36:48 -07:00
Collin Smith
3390b544a6 Improved accuracy of ping calculation #77 2020-06-07 15:55:28 -07:00
Collin Smith
cdc73e12d6 Added support for Ping packet
Added Ping to Networking fbs
Created Riiablo.ping long to store current ping in ms
Changed Client draw fps to draw Riiablo.ping below fps
Created Pinger system which manages Riiablo.ping and sending and receiving Ping packets
Riiablo.ping is really more like RTT+frame_time and should be ironed out better
Created issue #77 related to the work done in this commit and deficiencies to be addressed
2020-06-07 00:23:00 -07:00
Collin Smith
da152ff5c6 Created constants for Client.Display.DrawFPS values 2020-06-06 22:53:28 -07:00
Collin Smith
da53dabad6 Aggregated Connection and Disconnect fbs into Networking fbs
Removed old individual fbs for Connection and Disconnect
Reordered D2GSData to group Networking packets
2020-06-06 18:17:21 -07:00
Collin Smith
ff34dea994 Created PlayerController flatbuffer spec file
Removed individual fbs for player movement packet definitions
Changed (Walk|Run)ToEntity packets from id to entityId
2020-06-06 18:06:16 -07:00
Collin Smith
d6e973f2f2 Fixed GroundToCursor code to use client-side entity id and pass along server-side entity id 2020-06-05 13:28:38 -07:00
Collin Smith
ae00373f8a Added ServerItemManager which will handle item wrapper entity creation/deletion 2020-06-05 13:25:37 -07:00
Collin Smith
013b22a169 Added local and server entity id to entity debug info 2020-06-05 13:16:58 -07:00
Collin Smith
4bef27052c Disabled optimize imports on the fly for the specified classes
Flatbuffers files were being modified by IntelliJ before committing
2020-06-04 20:16:02 -07:00
Collin Smith
83a95e35fc Removed deprecated DropItem and PickupItem packets and related code 2020-06-04 19:46:42 -07:00
Collin Smith
e472514179 Rolled Deleted component implementation into a Flags component
Removed Deleted component and associated flatbuffers classes
Created Flags component along with added a bitflags field to EntitySync flatbuffers table
It seems plausible more flags will be needed in the future aside from marking an entity as deleted
2020-06-04 19:41:55 -07:00
Collin Smith
7301c483ca Posting Deleted component 2020-06-04 19:24:33 -07:00
Collin Smith
ffda38c9fd Fixed issue where packets might be sent to a disconnected client 2020-06-04 19:14:08 -07:00
Collin Smith
804e8373d5 Improved logging for D2GS packets
Added ability to disable logging for specified packet types (EntitySync was cluttering the log)
2020-06-04 17:05:15 -07:00
Collin Smith
7404ea63a6 First iteration of deleting networked entities
This iteration assumes removing Networked component implies deletion
Deletion is managed as a flag within the EntitySync packet header
2020-06-03 20:58:58 -07:00
Collin Smith
7aa3f448ee Removed extra logging 2020-06-03 20:29:21 -07:00
Collin Smith
faf8743a75 Fixed an issue where picking up networked item wasn't loading assets
ClientEntityFactory#createItem now calls Item#load()
Cursor will run Item#checkLoaded on cursor item and attempt setting cursor when loaded
2020-06-03 17:35:59 -07:00
Collin Smith
907688a1d2 Improved support for picking up and dropping items
ItemController interface changed to be an engine-operable interface
Removed ItemController interface from CharData
Changed ItemController#groundToCursor(Item) to #groundToCursor(int) to pick up an item wrapper entity
ItemManager now handles item entity creation/deletion (may change)
ClientItemManager changed to operate upon Riiablo.charData and is for clients
CursorMovementSystem now uses ItemController instead of handling item drop and packeting directly
Item wrapper entity deletion remains unhandled in multiplayer until support for networking entity deletion is added
2020-06-02 20:55:03 -07:00
Collin Smith
edb6de8df9 Added support to D2GS for a majority of ItemManager functions
Added support to D2GS for a majority of ItemManager functions
GroundToCursor remains unimplemented in this commit due to entity creation
2020-06-02 15:30:18 -07:00
Collin Smith
8f437ab037 Added ItemManager system to D2GS engine 2020-06-01 17:47:37 -07:00
Collin Smith
829eb608a7 Workaround for #75 2020-06-01 17:24:44 -07:00
Collin Smith
970073296c Created NetworkedClientItemManager subclass of ClientItemManager
Changed ClientItemManager to delegate to Riiablo.charData
NetworkedClientItemManager posts item management requests to the client's socket
2020-05-31 23:55:33 -07:00
Collin Smith
be70756aeb Added prototypes for item management packets 2020-05-31 21:30:53 -07:00
Collin Smith
3723e4dc2e Created packets for item management (DropItem and PickupItem are now deprecated and will be removed eventually) 2020-05-31 03:49:00 -07:00
Collin Smith
921fdfd2e2 Changed ClientItemManager to delegate to a certain ItemController 2020-05-31 03:22:39 -07:00
Collin Smith
206875d2a0 Introduced ItemController interface and ClientItemManager
ItemController created to allow swappable interfacing between CharData and ClientItemManager
ClientItemManager engine system added (defers to Riiablo.charData temporarily)
Added dependency injection for ItemController to allow wiring
Changed item management panels to use ItemController injection instead of Riiablo.charData directly
2020-05-31 01:00:46 -07:00
Collin Smith
94e2b379e7 Removed unneeded annotation 2020-05-30 20:36:39 -07:00
Collin Smith
2cecdccdd9 Added additional debug logging for CharData item management calls 2020-05-30 20:21:35 -07:00
Collin Smith
b798645f02 Fixed issue where dropping an item wasn't removing it from ItemData 2020-05-30 20:15:08 -07:00