r/pygame • • 20h ago

I built a 2D N-body gravitational solar system and accretion disk simulator from scratch in Python

Post image
7 Upvotes

Hey everyone,

I wanted to share a physics simulation project I built using Python and Pygame: a real-time 2D N-body solar system and accretion disk simulator.

Instead of hardcoding circular orbits, the simulation models true gravitational interactions, collision mechanics, and particle accretion between thousands of bodies in real time.

Key features:

  • Real-time N-body gravitational force calculations using Newton's law.
  • Dynamic particle merging and accretion (smaller dust particles clump together into larger asteroids and planetoids while conserving momentum).
  • Procedural nebula generation with randomized orbital speeds and chaos factors around a massive central sun.
  • Lightweight and smooth rendering entirely built from scratch with Python and Pygame.

I'll drop the link to the GitHub repository in the comments below. Let me know what you think or what orbital mechanics features I should add next!


r/pygame • • 6h ago

I'm starting to make a sequel to the game.

4 Upvotes

I made this sketch today. I'll make a post soon as I finish the starting room of location 2.

If anyone hasn't seen the demo, you can find it on Itch, right here: https://ssoh-v1.itch.io/the-dungeon-of-god


r/pygame • • 15h ago

rpg zombie v0.11

Thumbnail reddit.com
1 Upvotes

r/pygame • • 19h ago

A little birthday game

Thumbnail reddit.com
0 Upvotes

I want to make a game for my boyfriend's birthday. Suggest some ai tools and give me some guidance on how and where should I start. I don't know anything about coding and I don't have much time.