reldens icon indicating copy to clipboard operation
reldens copied to clipboard

lagging when switching rooms

Open dragonballa opened this issue 2 years ago • 1 comments

in the demo when you go through a door or to a new room, the character continues to walk for a few seconds until the screen transitions.

in general the overall demo feels laggy, i can't quite put a finger on it but there is a noticeable delay when the character starts walking and stops from my input.

is it possible to support character moving to a specific coordinate based on a mouse click?

also can reldens be used to support 3d environments?

what is the support/release schedule? when can we expect the rest of the roadmap to finish? would be great if there could be regular updates.

be happy to sub to patreon if it means frequent updates. how much would you need to finish development?

dragonballa avatar Aug 31 '22 23:08 dragonballa

hi @dragonballa , let's tackle each item:

  • I will start with "in general the overall demo feels laggy" because it's actually all related. The main thing to consider is the Reldens project works with full server-authority, this means none-logic (at least until beta.23), is executed on the client, only inputs are sent to the server and it process every movement/logic to send the updates to every client. When you have a bad connection or are far from the server LAG will enter on scene and you will get that bad-experience. Unfortunatelly in multiplayer games LAG is something that can't be avoided, it can be minimized: yes, but never fully avoided (consider that even the greatest games in history had LAG, sometimes because the server, sometimes because of the clients). This is a topic that I could elaborate and explain a lot, but at the end no matter what we do LAG can always be a issue. Just two more notes about it: The demo server is EC2 small instance in Virginia, so depending where you are and your connection is possible you experience some LAG, from Spain and with a good connection I can tell it works like a charm. In the next beta.24 I've did an experimental implemenation for client interpolation, prediction and reconciliation, which are ways to minimize the LAG feeling, but still it almost didn't helped and the amount of time I've had to invest to get reconciliation to work on a very basic and quite bad level, just proved it didn't worth the effort.

  • "the character continues to walk for a few seconds until the screen transitions" > the problem is because you hit a change-room-point and the loading screen is executed after the change-room-point is validated on the server side, the loading is displayed in between the player change rooms. In order to fix this I need to show the pre-loader as soon the player hits the change point on the client side without wait for the server response.

  • "is it possible to support character moving to a specific coordinate based on a mouse click?" > yes, in the demo, the pathfinder works with the right-click on a valid "walkable point", if you righ-click on the grass you should see an array and the player will start moving, if you click on a tree that won't be a valid point and the player wont move.

  • "also can reldens be used to support 3d environments?" > not in the current state, BUT, the idea will be to sopport any physics engine with a driver system I'm creating, so basically we should be able to support engines like cannonjs or so in the future.

  • "what is the support/release schedule? when can we expect the rest of the roadmap to finish? would be great if there could be regular updates." > since I do this as hobby is very difficult to stablish a proper schedule because the time I can put on the development process will depend a lot on my daily work and life. That been said, I alwasy try to put at lease 1h per day, or 2 if possible, and the updates are pushed on the latest beta branch (https://github.com/damian-pastorini/reldens/tree/v4.0.0-beta.24 > you can see commits from a few days ago), or in the side-packages, for example the items one (https://github.com/damian-pastorini/reldens-items/tree/v0.16.0-beta.5). This is the closer I can offer now as regular updates. In regard to the roadmap, that's huge and I include new tasks all the time, normally after release a new beta and push a few new tasks in the roadmap for stuff I want to change or include. I don't think the project itself will ever end because you can always add more stuff to it, but I can say I'm expecting to release a stable version for the version 4 early next year.

  • "be happy to sub to patreon if it means frequent updates. how much would you need to finish development?" > as you can see from my notes above there isn't a fixed value, but if you want to support the project I will really appreciate it, has been pretty hard to get any support on the project.

Hope this answer all your questions, if like feel free to join the project discord server and contact me there for a chat.

damian-pastorini avatar Sep 01 '22 14:09 damian-pastorini