jdno / auto-traffic-control Goto Github PK
View Code? Open in Web Editor NEWA video game for programmers about safely routing planes to an airport ๐ฌ
Home Page: https://auto-traffic-control.com
License: Apache License 2.0
A video game for programmers about safely routing planes to an airport ๐ฌ
Home Page: https://auto-traffic-control.com
License: Apache License 2.0
I'll admit that using proto files and gRPC is a new concept to me, so I might be doing something wrong here. But here's what I've been able to do...
protoc --proto_path=atc --ruby_out=lib atc/v1/atc.proto
outputs an lib/v1/atc_pb.rb
file successfully.
However, when I run
protoc --proto_path=atc --ruby_out=lib atc/v1/atc.proto atc/v1/airplane.proto
I get...
atc/v1/map.proto: File not found.
atc/v1/tag.proto: File not found.
v1/airplane.proto:5:1: Import "atc/v1/map.proto" was not found or had errors.
v1/airplane.proto:6:1: Import "atc/v1/tag.proto" was not found or had errors.
v1/airplane.proto:10:3: "Point" is not defined.
v1/airplane.proto:11:12: "Node" is not defined.
v1/airplane.proto:12:3: "Tag" is not defined.
v1/airplane.proto:25:12: "Node" is not defined.
And I have confirmed that the map.proto
and tag.proto
file is there. So that file not found error doesn't really make sense. Do you have any idea what might be going on?
This game looks pretty interesting. However, I'm familiar with neither rust nor javascript. It seems there are libraries to generate java source for an ATC client. It would be convenient if ATC offered either a build script to generate these, so potential players needn't learn enough about protoc to compile their own. It would be wonderful if ATC uploaded a jar to a public repository, like maven central, that java proficient players could depend on directly.
I recognize that the current ATC team might not have resources to focus on providing a java sdk and example. So, I've offered a pull request #173 that should provide both. I apologize that I didn't add an issue first, I do know better.
The current game requires pretty good solution to even get a single landed plane. Even though the user might correctly implement Dijkstra algorithm, two planes might collide.
The game could go through multiple scenarios (and becoming harder with each stage):
There could be few more complications (later stages):
I love the idea of the game and having fun implementing my solution.
However, my current solution has a bug in it as two planes crashed into each other:
How does one go about debugging this? It is impossible to know what were the plane ids or what wast their flight plan. I would have to go over the logs of my solution and try to painfully reconstruct the state in order to find where my solution made an error. It is feasible for somebody who has a lot of experience doing that but it is no fun ๐
At the moment UI window just shows the current state. It could be extended to show information like:
The information could be displayed always or only on hovering over the plane. Few mockups:
When the game stops, it would be useful to play with the game and debug it: Be able to rewind the game and see how the planes were moving around. You could inspect planes (their ids and the flight plan at the given time) and see when the flight plan changes were issued.
These changes would make it much easier to debug. The player can focus more time into writing algorithms rather than debugging / building their own debugging tools.
The Game service documentations suggests that sending a start game request while the game is already running, 'nothing will happen'. Doing so ended the simulation. It created a panic with the following message:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: AlreadyInState', game\src\systems\change_app_state.rs:15:47
It looks like the offending line sets the state without checking whether it matches. I would think that a mutable variable could handle being set to the same state, but that does not seem to be the case.
I intend to change the logic such that my client does not try to start the game while it is running. But, it is still appropriate to either change the documentation or resolving the command robustly.
The next version of the game implements a new architecture for the game, which makes it possible to run the simulation in a headless mode without rendering a user interface. Besides being a requested feature, this functionality also enables us to test the new architecture before building the user interface.
We will add a command-line tool to the project that players can use to launch the game.
cargo run -p cli
In version 0.4, the CLI will only run the simulation. Later versions might add more features, at which point we will redesign the commands and arguments of the CLI.
Sometimes I want to play the same game few times over. I might have a bug in my solution and want to debug it. This is much harder if the game keeps changing every single time and it is hard to trigger the weird state.
The user could provide a seed (e.g. uint64) during the start of the game and then the game would use the seed for random number generation. If the user doesn't provide seed, a random one is picked.
When a client sends a NodeToPointRequest
to the MapService
for some Node
, it receives a NodeToPointResponse
with only a Point
. If a client requests this synchronously, it is clear that the response Point y corresponds to Node x that this client just requested. However, it is not clear how to match requests with responses when sending several asynchronously.
I assume this is a queue, rather than a stack, but I can't tell, as nothing seems to call Map.node_to_point()
. I will verify this soon, when my client starts getting node points and estimating where nodes are, so it can approximate airplane moved events to the closest node.
I submit that a response with the point and the node that it goes with constitutes a better message, as it makes the context explicit, rather than implicit. I understand that would be a breaking change to the api.
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.