Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current naïve implementation looks like shit when latency got introduced #3

Open
eugene-sy opened this issue Apr 17, 2013 · 7 comments
Assignees

Comments

@eugene-sy
Copy link
Contributor

Use client prediction and other technics.
Good article on topic:
http://buildnewgames.com/real-time-multiplayer/

There is links to other great resources on topic, like Source Multiplayer Networking

@ghost ghost assigned Oregu Apr 17, 2013
@Oregu
Copy link
Contributor

Oregu commented Apr 18, 2013

Most of the work is already done.
Still need to add:

  • client correction if data from server differs.
  • Smooth enemy animation.

@Oregu
Copy link
Contributor

Oregu commented Apr 18, 2013

From TODO file:

  • На сервере дельта времени берётся фиксированная, надо сделать, как у клиента.
  • Синхронизировать время на клиенте и сервере.
  • Аппроксимировать позицию противника
  • Код проверки правильности позиции клиента, сейчас server is not the man. :(

@Oregu
Copy link
Contributor

Oregu commented May 2, 2013

Smoothed ball animation. Now there is a little problem when ball bounces from paddle — it's not moving along with server ball. Green one is server updates and white ball is client predicted.
Just a note to fix it next day.
🍶

@Oregu
Copy link
Contributor

Oregu commented May 2, 2013

And also just found out that client predicted paddle also desyncs with server one. There is still a lot of work to do.
🍶 🈂️

@Oregu
Copy link
Contributor

Oregu commented May 3, 2013

And also just found out that client predicted paddle also desyncs with server one. There is still a lot of work to do.

Ну в этом, кстати, нет ничего удивительного, потому что до сих пор не сделана корректировка позиции, aka "Server is the Man".

@Oregu
Copy link
Contributor

Oregu commented May 4, 2013

I did several commits and problem with ball desync gone…
Looks like this removal in d54b106 did the trick (also introducing diffTime helped)

  • @ball.t = @updateTime

Weird. 🍶

@Oregu
Copy link
Contributor

Oregu commented May 4, 2013

Now it's time to fix gamer's paddle synchronization 🍶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants