Skip to content

mrbid/AstroImpact

Repository files navigation

AstroImpact

Save the planet from inevitable annihilation! Online, with your friends!

We have left some code for "pods" dormant [assets here] and code in the [pre_declutter_main] branch, it was going to be a feature that little escape pods pop out of the planet and that you could pick them up and drop them at a safe zone to evacuate the planet, but we have little interest investing time in that direction now.

Screenshot of the AstroImpact game

How to play

You have to fly around in your UFO, preferably with friends, crashing into approaching asteroids to stop them from hitting the planet surface.

  • First Tier: The longer you can prevent the first hit on the planet.
  • Second Tier: The longer you can prevent the planet from being annihilated!
  • Third Tier: How many asteroids did you and your friends collectively destroy?

Just make sure you all start on the same epoch! The first person to create the epoch sets the number of approaching asteroids in each wave.

Make/Compile

Standalone Binary

sudo apt install libglfw3 libglfw3-dev
git clone https://github.com/mrbid/AstroImpact
cd AstroImpact
make
./bin/fat

Installer (.deb)

sudo apt install libglfw3 libglfw3-dev
git clone https://github.com/mrbid/AstroImpact
cd AstroImpact
make deb
sudo dpkg -i bin/fat.deb

Key/Mouse Mappings

  • Use W,A,S,D,Q,E,SPACE & LEFT SHIFT to move around.
  • L-CTRL / Right Click to Brake.
  • L-ALT / Mouse 3/4 Click to Instant Brake.
  • R = Toggle auto-tilt/roll around planet.
  • Q+E to stop rolling.
  • Escape / Left Click to free mouse focus.
  • F = FPS to console.

Config File

(fat.cfg) or (.config/fat.cfg) or (~/.config/fat.cfg)

NUM_ASTEROIDS 1337
MSAA 16
AUTOROLL 1
CENTER_WINDOW 1
CONTROLS 0
LOOKSENS 10
ROLLSENS 10

The CONTROLS setting in the config file allows you to swap between roll and yaw for mouse x:l=>r.

Hosting a server

Make sure you have Network Time Protocol (NTP) enabled, the game relies on syncing epoches between machines for many aspects of networking.

Make sure you have UDP port 8086 forwarded from your router.

To connect to a custom server the Launcher can be used, but it's probably best to use the deb package which comes bundled with the launcher.

You can also connect to a custom server via the argv parameters when launching the game from the console:

Argv: <start epoch> <server host/ip> <num asteroids> <msaa 0-16> <autoroll 0-1> <center window 0-1> <control-type 0-1> <mouse sensitivity (0.001+)> <roll sensitivity (0.001+)>

e.g: astroimpact 1713589505 192.168.0.1

Attributions

Any assets not attributed here have been created specifically for this project, any assets made for this project automatically share the same license as the project itself. Some textures have been generated using Easy Diffusion.

Planet

https://www.solarsystemscope.com/textures/

Asteroids

UFO

  • https://www.turbosquid.com/3d-models/sci-fi-ufo-2-3d-model/1062607# The UFO 3D asset was provided by the original author James directly over email ([email protected]) and NOT purchased from Turbosquid under the Turbosquid license as the license does not allow use of assets in open-source projects, a custom license was agree'd over email with James that allows the UFO 3D asset to be used in our open-source project and a payment was made to James based on this agreement. This does not give anyone else the right to use the UFO 3D asset (model or textures) without James’ permission or payment and this asset is not licensed under the same GPL license that the source code of this project is.