Git Product home page Git Product logo

roid-rage-rust's Introduction

Roid Rage!!!

A silly asteroids game.

How to run

Roid Rage runs as two processes, a game process and a pilot process. Generally you'll start the game process first. When you subsequently start pilot processes, they will register with the game process to start receiving requests for commands.

The game process

You can start the game process like this:

cargo run --bin roid-rage

This command will create a new window and you should see 'roids floating around the screen. At this point you won't see a ship on the screen. The ship will get created when you start a pilot process and it registers with the game.

The "manual" pilot

The manual-pilot pilot process lets you actually play the game yourself (i.e. it's not a bot). It accepts keyboard input and uses that to determine how the ship moves. Start it like this:

cargo run --bin manual-pilot

The terminal in which you ran manual-pilot is the program that will take your input for piloting the ship. Focus on that terminal and control the ship as follows:

  • Left arrow - rotate counterclockwise
  • Right arrow - rotate clockwise
  • Up arrow - engage thrusters
  • Space bar - fire cannon
  • S - bring the ship to a stop

Other pilots

One of the goals of Roid Rage is to support development of autopilots, i.e. programs that pilot the ship. We currently have two examples of (very, very stupid) autopilots, driver-pilot and simple-pilot. You can use these instead of manual-pilot like by replacing 'manual-pilot' in the first command above with either 'simple-pilot' or 'driver-pilot', e.g.:

cargo run --bin simple-pilot

or

cargo run --bin driver-pilot

Developing pilots

A pilot is just a program that receives requests from the roid-rage process for commands. The requests include information about the ship, it's location, and the 'roids on the board. It responds with instructions about how to pilot the ship, whether to fire, etc. Communication takes place using grpc.

The pilot-lib module is designed to simplify development of new pilots. In particular, it implements a main() function that most pilots should be able to use.

Currently the best example of how to implement a pilot is manual-pilot. You can use this as a rough guide of how to write a pilot.

Settings

Roid Rage has a number of setting you can modify. These can be controlled via environment variables or a settings file.

TODO: Document these and how to set them.

roid-rage-rust's People

Contributors

abingham avatar

Stargazers

 avatar

Watchers

 avatar  avatar

roid-rage-rust's Issues

Variable angles between bumps for roids

Right now we use a constant angle between "bumps" on roids, and this looks a bit unnatural. Variance in the angle might improve things.

Probably an altogether more sophisticated approach would be best.

Use velocity model

Make the targeting determine velocities rather than reading the component.

Better settings documentation

We should at a minimum document the available a settings and how to set them in a README.

Better would be a way to generate a default settings file (and explain where to put it). And we should be able to generate information on the environment variables.

Use system for rendering

We currently render using the standard ggez approach, but it seems like it should more properly be a system. Try it out .

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.