Giter Club home page Giter Club logo

elon-server's People

Contributors

alexmillward avatar aurbano avatar reddyalready avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elon-server's Issues

Render car inputs

Render the inputs that the car is receiving as bars (steering, throttle, braking)

Add displacement points to the track gen

Convex hull works fine, but it needs some displacement points so that there are both right and left turns.

Also, the number of points used for the convex hull should also be random within a range, to produce more variable shapes.

Smooth inner side of the track

Right now the outer side of the track is calculated by "expanding" (buffering) the road line polygon.

It would be nice to also get the outer side by "shrinking" it, so that all edges are curved.

The center line of the track could be preserved in another array of points, as it could make calculating the distance easier (way less points in that one, since it doesn't have curves)

Client commands

The server should initialise a track when starting up, and set up the comm channels.

Commands from the client

  • Init (specifying the number of cars)
  • CarControls (sends the controls for all cars)
  • Reset (stop the sim)

API / Data Structures

Data Structures

Car State

CarControlState:
{
  throttle: float // -1.00 <> 1.00, where -1 = brake, +1 = full throttle
  steering: float // -1.00 <> 1.00, where -1 = full left steering, +1 = full right steering
}
CarState:
{
  position: { 
    x: float, 
    y: float 
  },
  velocity: float,
  sensors: [Sensor]
}

Sensor: 
{
  angle: int, // -90 <> +90, degree deviation from straight ahead
  distance: float   // 0.00 <> x, indicating distance to detected object
}

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.