Conversation
added event bus added lombok
| // Add new & remove old | ||
| entities.applyChanges(); | ||
|
|
||
| synchronized (this.queue) { |
There was a problem hiding this comment.
Locks? I'm trying to get rid of all locks... We still have the gold lock but that too should go.
There was a problem hiding this comment.
maybe we dont need use lock there. Doesnt check thead safe without lock of this code
There was a problem hiding this comment.
Yeah, the ECS system we use is thread safe. And all commands coming from client I planned to enqueue to the main game loop thread. That way we don't need to mess about with locks (the gold lock or any other). I'm unsure though how would this affect the game as there would be a small delay in processing the client commands.
| if ((room.getFlags().contains(Room.RoomFlag.PLACEABLE_ON_WATER)) | ||
| || room.getFlags().contains(Room.RoomFlag.PLACEABLE_ON_LAVA)) { | ||
| instancePlots = new ArrayList<>(mapController.getTerrainBatches(instancePlots, x1, x2, y1, y2)); | ||
| // instancePlots = new ArrayList<>(mapController.getTerrainBatches(instancePlots, x1, x2, y1, y2)); |
There was a problem hiding this comment.
We should just remove the code, not comment it, a bit confusing. Version control is there to manage these.
There was a problem hiding this comment.
we need this code :), but not compatible with new code. This is the reason why the PR is in WIP
| implementation "com.simsilica:sio2:1.8.0" | ||
| implementation "com.simsilica:sim-ethereal:1.8.0" | ||
| implementation "com.google.guava:guava:33.4.8-jre" | ||
| implementation "org.reflections:reflections:0.10.2" |
There was a problem hiding this comment.
I've been removing these (reflections) at work :D For security reasons. Are there any alternatives?
There was a problem hiding this comment.
We need scan package for classes with annotation... I don`t know any other library that can do this
There was a problem hiding this comment.
Well, me neither. I just designed around it at work. It is a bit of a hazard in my opinion to take this in. Is there any alternative to having to scan package classes with annotation? I know what you are trying to solve here, having to manually add the class to be de/serialized. How else we could do it better?
There was a problem hiding this comment.
compile-time annotation preprocessor (like lombok), but it`s rocket science for me :). I work with spring framework. Packages scan - the core of DI container and dynamic connection of the components
|
Generally the idea is fine. Lot of trivial DeepSource issues. Still WIP? |
|
I want to try something lik Command-Query on Event Bus. Each client send query (e.g. i want build room 5x5) to server. Server checks possibility, and send command to client (e.g. build room 5x5) without any checks on client |
No description provided.