~sforman/SpaceGame

One Sunday I was messing around with Godot engine doodling and made a kind of "physics toy" (calling it a game would be too much, although it's a lot of fun.) There's a space ship, some asteroids and a little star. And that's pretty much it. You can fly around and bounce off of things. I didn't implement any collision logic, so everything is indestructable. You can herd asteroids, or bounce off the sun!
Srht supports wikis!
Rearranged a bunch of files.
Minor bits of stuff.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~sforman/SpaceGame
read/write
git@git.sr.ht:~sforman/SpaceGame

You can also use your local clone with git send-email.

Wow!  Such space.  Many physics!

It's...

Space Game!

 ___  ____   __    ___  ____  
/ __)(  _ \ /__\  / __)( ___) 
\__ \ )___//(__)\( (__  )__)  
(___/(__) (__)(__)\___)(____) 
  ___    __    __  __  ____ /\
 / __)  /__\  (  \/  )( ___))(
( (_-. /(__)\  )    (  )__) \/
 \___/(__)(__)(_/\/\_)(____)()

Just noodling around with Godot engine and I seem to ahve made a space
game.  You have a little ship, and you're in a little asteroid belt, and
you can chase them around and bop them with your ship (which is
indestructible, because I don't know how to do damage yet.)

I made this in one rainy Sunday.  "Back to the World of Dreams..."

Controls:

Left, Right, Up, Down, '[', ']', to rotate.  (Auto-damped.)
Space to thrust forward.  Hold 'g' to damp velocity (i.e. brakes.)

Turning does NOT affect velocity!

- - - - 

I'm thinking that your ship represents a forward scout and prep robot
sent by somebody to find and prepare e.g. an asteroid belt around a star.
You have a hold full of microminers and biota to transform raw materials
into some kind of space colony, and a magic gate to activate when you're
done to let your creators teleport to their new colony.  (For the
sequel?)

- - - -


Acknowledgements

It's pretty incredible that you can knock together something this fun and
cool with free tools and free art and assets.  I want to take a moment to
thank the folks that have provided this.  You're beautiful!

Godot Engine
https://godotengine.org/

Font: "Space Age" by Justin Callaghan
https://www.dafont.com/space-age.font

"Bulbhead" for the title above:
http://patorjk.com/software/taag/#p=display&f=Bulbhead&t=Space%0AGame!

Models and particles: Space Kit from Kenney.nl
https://kenney.nl/assets/space-kit

Background Art: Ulukai's Space Skyboxes
https://opengameart.org/content/ulukais-space-skyboxes


I used Udit Parmar's Poisson Disc Sampling add-on for Godot to lay out
the asteroids in several stacked discs.  The sampling is used to generate
x and z and 2D OpenSimplex noise is used to generate the y from them.

https://github.com/udit/poisson-disc-sampling
https://godotengine.org/asset-library/asset/559


- - - -



Each asteroid is given an initial impulse perpendicular to their vector
to the world origin so they start out with "wheel-like" velocity pattern
overall, and then the gravity from the center takes over and keeps them
in orbit.

(I got lucky on the parameters of the orbits: too much gravity and the
asteroids all fall to the center and smash the ship into a wild tumble,
or, if you fly out of there soon enough, you can turn around and watch a
mini-Big Crunch and Big Bang which then repeats; too much sidereal kick
and they fly off into the distance, receding from view.  I left the game
on overnight with the ship in the center and in the morning they were
still orbiting and none had hit the ship!)

I learned how to do the central gravity from here:
https://godotengine.org/qa/13748/how-to-change-gravity-direction-of-physics-object?show=13749#a13749

- - - -



ToDo:

[X] Gravity affects ship too.
[X] A Sun
    [X] Shine!
    [X] Don't let the ship's lights illuminate the sun.
    [ ] Burn up?
    [ ] Glow effect?
    [ ] ...
    [ ] ...
[ ] More HUD
    [ ] Gyro display
    [X] Click to select, with reticule.
    [X] Distance to sun
    [ ] Distance to tracked object
    [ ] Delta-v to tracked object
    [ ] List of known objects
    [ ] Reticule offsides behaviour
    [ ] Unselect (clear reticule)
    [ ] ...
    [ ] ...
[ ] Shib up!
    [X] Roll (Maybe '{' and '}'?)
    [X] Toggle lights.
    [ ] Fuel / Power
        [ ] Reaction mass (vs. energy)
    [ ] Damage & repair
    [ ] Pew pews?  (Lasers, rockets, grappling hooks?)
    [ ] Animation for thrusters
    [ ] Computer
        [ ] Tracking
        [ ] Ranging
        [ ] Autopilot
            [ ] Velocity-matching.
            [ ] Look-at
        [ ] ...
        [ ] ...
        [ ] ...
    [ ] Multiple cameras.
    [ ] ...
    [ ] ...
    [ ] ...
    [ ] ...
    [ ] ...
[ ] Non-identical asteroids.
    [ ] Rocky (various)
    [ ] Metallic (various)
    [ ] Ice (Comets) (+ organics?)
    [ ] Alien Artifact!
    [ ] ...
    [ ] ...
[ ] Something to DO with them.
    [ ] Beacon tags
    [ ] Microminers
    [ ] Stabilize orbits
    [ ] Build stations, etc.
    [ ] ...
    [ ] ...
[ ] Random Encounters
    [ ] Gamma rays
    [ ] High velocity collisions
    [ ] Solar flares
    [ ] No NPCs (yet...)
    [ ] ...
    [ ] ...
[ ] export vars for gravity, initial impulse
[ ] ...
[ ] ...
[ ] ...



- - - -