Search found 12 matches

by nikki93
Fri Nov 16, 2018 11:29 pm
Forum: Libraries and Tools
Topic: sync.lua -- high-level api to make writing multiplayer games easier
Replies: 11
Views: 6505

Re: sync.lua -- high-level api to make writing multiplayer games easier

The Player could just do `client.controller:setData(data)` and the controller could tell the Player object its data to set, right? Just like sending input. The only way to do this in general is to wait for connect and then send info, so this makes sense to me. The controller could just not create a ...
by nikki93
Fri Nov 16, 2018 2:57 am
Forum: Libraries and Tools
Topic: sync.lua -- high-level api to make writing multiplayer games easier
Replies: 11
Views: 6505

Re: sync.lua -- high-level api to make writing multiplayer games easier

Nelvin-- Thanks! :D Excited to see what you may make with it! Yaagher-- There are a couple things you may have meant, I'll cover all of them-- 1. Create a bunch of Players and have them visible when a client joins. One way to do this is after sync.newServer(...) on the server computer, do server:spa...
by nikki93
Wed Nov 14, 2018 1:08 am
Forum: Libraries and Tools
Topic: sync.lua -- high-level api to make writing multiplayer games easier
Replies: 11
Views: 6505

Re: sync.lua -- high-level client-server entity replication api for multiplayer games

Added a couple new features -- ':isRelevant' (for entities) and '.getRelevants' (for types) to filter what entities are sent to each client, and `Client:serverTime()` and `dt` passing to `:willSync` to allow local interpolation based on predicted server time. https://github.com/expo/sync.lua/blob/ma...
by nikki93
Tue Nov 06, 2018 11:08 pm
Forum: Libraries and Tools
Topic: sync.lua -- high-level api to make writing multiplayer games easier
Replies: 11
Views: 6505

Re: sync.lua -- high-level client-server entity replication api for multiplayer games

So to update on my previous answer, 1. How often does position/velocity data for bodies send? if its constant would that not be excessive with MANY bodies? 2. Do you have plans to implement RPC and Command methods too? I updated the tutorial to cover the `:sync` call and the way controller types can...
by nikki93
Tue Nov 06, 2018 3:38 pm
Forum: Libraries and Tools
Topic: Blob.lua - binary serialization library
Replies: 16
Views: 11566

Re: Blob.lua - binary serialization library

Awesome! Will experiment with this myself. Thanks so much for the benchmark example! Will helps a lot.
by nikki93
Tue Nov 06, 2018 5:15 am
Forum: Libraries and Tools
Topic: sync.lua -- high-level api to make writing multiplayer games easier
Replies: 11
Views: 6505

Re: sync.lua -- high-level client-server entity replication api for multiplayer games

Awesome! This is exactly the use case I was hoping for. If you end up using it I could try to make fixes / additions as you need. To answer your questions: 1. You control this explicitly by calling self.__mgr:sync(<the entity>) (update is sent in next :process() call on server). If no entities have ...
by nikki93
Mon Nov 05, 2018 11:46 pm
Forum: Libraries and Tools
Topic: sync.lua -- high-level api to make writing multiplayer games easier
Replies: 11
Views: 6505

sync.lua -- high-level api to make writing multiplayer games easier

https://github.com/expo/sync.lua/raw/master/preview_triangle_warz.gif I've been working on a client-server entity replication API (like the ones in Unity or Unreal) based on lua-enet. You can write your game's code mostly as if you are writing a single-computer game and have automatic synchronizati...
by nikki93
Mon Nov 05, 2018 11:35 pm
Forum: Libraries and Tools
Topic: Blob.lua - binary serialization library
Replies: 16
Views: 11566

Re: Blob.lua - binary serialization library

Nice! How does it compare to bitser https://github.com/gvx/bitser? I am using that along with a slight modification (https://github.com/expo/ghost-multi/compare/e0471667d391774f95a2e5f63d6fa2c4669a4dfc...master#diff-6cd97a3bef29e9560afcabb6a1abe3ee) to handle entity references by id (to deserialize ...
by nikki93
Sun Apr 29, 2018 9:31 am
Forum: Support and Development
Topic: [SOLVED] `pcall(...)` inside `Canvas:renderTo(...)`
Replies: 4
Views: 772

Re: `pcall(...)` inside `Canvas:renderTo(...)`

@zorg: Thanks for the response! I figured it out I think -- it was due to a `love.graphics.push('all')` being unmatched by a `love.graphics.pop()` inside `func`. I'll probs end up using / creating a utility like https://github.com/djfdyuruiry/lua-try-catch-finally to make this all nicer to write.
by nikki93
Sun Apr 29, 2018 7:42 am
Forum: Support and Development
Topic: [SOLVED] `pcall(...)` inside `Canvas:renderTo(...)`
Replies: 4
Views: 772

[SOLVED] `pcall(...)` inside `Canvas:renderTo(...)`

Hey all! I'm trying to do a `pcall(...)` inside a `Canvas:renderTo(...)`, which looks as follows (with the `print(...)` calls added for debugging): function renderTo(func) if canvas then canvas:renderTo(function() print('before') pcall(func) print('after') end) end end The hope here is to allow othe...