clagraff / devoid Goto Github PK
View Code? Open in Web Editor NEWDevoid: a multiplayer-first, real-time roguelike engine & client
License: MIT License
Devoid: a multiplayer-first, real-time roguelike engine & client
License: MIT License
cmd/client/main.go
40: info := network.MakeConnInfo("localhost", 8080, cfg.ClientID, "/home/clagraff/selfsigned.crt", "")
In the [client main][cmd/client/main.go] file, the certificate path is hardcoded. This should be changed to pull from the configuration file.
Now
When a client connects, they will be subscribed to their entity ID and current position; a perceive intent is also immediately created to be processed.
The architectural idea seems to be that a Perceive
intent will be created and consumed each time something affects an entity; yet, this does not impact the subscribers.
The Problem
Since the Perceive
(or any intent) doesn't modify subscribers, it means performing any action has no impact on subscribers, neither adding nor removing.
As an example:
An entity moves to a new location. They immediately perceive their surroundings. But since they have not been subscribed to any of the new Position
s they can now perceive, should a monster/player/etc move into their viewpoint, they would not know until they Perceive
again.
Future
Create a new subscription/mutator system.
Executing an intent should return server mutators, and then a list of (mutators, identifiers) pairs, where we have a list of mutators and a list of identifiers, possibly multiple times.
Maintain a map of identifiers to connected clients (from when tunnels are created or closed). Using that map and the identifiers, ensure that a given mutator is not sent multiple times for a given client.
As an example, a Move mutator may want to be sent by both the Source ID as well as the new position, but that shouldnt generate two mutations of the same data to the same single client.
The current client code could certainly contain copious changes culminating collectively in a better developer experience.
Specifically, segregating rendering code, mutation & state mgmt, and GUI event handling into separate structures. Right now it is all combined and makes for a messy, and convoluted codebase.
^^ see title
The readme should include information about how to download dependencies, build, and run the application.
Add support for an entity which can block player movement when "closed", but becomes passable when "open". Yet, not all are able to have their passability toggled.
We should have a test harness or something for running acceptance tests which send key events to the client, to cause intents sent to server, to result in mutations, etc etc. Maybe contained as a separate package?
Intents should be handled concurrently, withouth locking entities (maybe they get a copy of the structs they need?).
When mutations from intents are created, they should only change 1 entity per mutation.
Then mutations should operate on the pointers of entity structs, concurrently, locking the one struct they need.
This is essentially to revert: https://github.com/clagraff/devoid/pull/4/files#diff-91bbeda7eb98a7adc57b9e47e2cf5c2bR171
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.