Git Product home page Git Product logo

Comments (5)

nevyn avatar nevyn commented on August 22, 2024

Actually it's silly to implement the same protocol in Erlang, C# and C (server, client, appliance). Let's make a C library on top of raknet that all three can use instead.

For Erlang I found https://github.com/mhsjlw/ExRakLib, but it's GNU and only supports unreliable, so it's a nogo. Raknet for C# is easy from asset store. But from C there's no work at all, so let's do that, and then foreign-interface it into unity and erlang. It'll be a great mm process in erlang :)

from alloplace.

nevyn avatar nevyn commented on August 22, 2024

okay raknet doesn't even compile anymore, abandoned by oculus four years ago. enet looks intriguing. can't quite make up my mind if I should use enet as-is from C# and elixir, or wrap it in a c library first.

actually, if I'm gonna write an appliance later, it'll definitely need a high level C API anyways. so it still makes sense to write a c library. buut it also makes sense to prototype that c library by making three implementations in three languages, as that will delineate a common api surface. e g I dunno if I should make a blocking or nonblocking api, etc.

from alloplace.

nevyn avatar nevyn commented on August 22, 2024

screw good ideas, I accidentally started working on that stupid C API :P C# bridging looked so easy, and I know how to do Erlang bridges, so.

https://github.com/alloverse/allonet

from alloplace.

nevyn avatar nevyn commented on August 22, 2024

2018-11-12 02_23_33

  • Very rudimentary server and client APIs implemented in C
  • Server is slightly more fleshed out, and its polling-with-clock API is designed for roughly how I think I'd implement it in erlang
  • Client is much more rough, not really designed
  • client actually takes keyboard input and can send rudimentary intents to server
  • server can create avatars and serialize entity list over to connected clients
  • uses both reliable and unreliable channels :) performance should be better than my previous attempts

I might've made a mistake putting so much server logic in C. Maybe it shouldn't know what an entity is, and just send json blobs. I don't mind it like it is now for testing though.

Now, I'll try to bridge this client to unity, and get it working from there. Should be straightforward.

Then, I'll bridge over the server stuff to erlang and replace stuff as it makes sense. This will be a bit harder to get pretty+efficient.

then we'll get to the interesting stuff, like state diffing and RPC.

from alloplace.

nevyn avatar nevyn commented on August 22, 2024

allonet works for both server and client now.

from alloplace.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.