You are browsing as a guest. Sign up (or log in) to start making projects!

Black Hole sim (Warmup)

  • 3 Devlogs
  • 24 Total hours

Yo this is my first project in a while, so my C#/C++ is pretty rusty. So I had a go at simulating a black hole as its more maths focused than code focused. I used unity, but in hindsight i should have just learned open Gl or whatever. This all runs on the CPU which is a no go for what im planning to build next, so im gonna look into HLSL which should be manageable? IDK. THe method i used is by no means the right one, but i decided to make a ray class. In this they ray is propelled outwards, where i used polar coordinates with the origin set at the center of the black hole. If you want to simulate a blakc hole yourself do not look at this as it is not a good implementation. One issue I encountered alot was rays exploding at the x axis line (div 0 error I think), and you can see i tried to fix that but to limited success. But anyways I hope you think this final render is cool and have a good day!

Ship #1

Hey Yall, this is my first project on stardance and i have learned alot already. Coming into this my background is very much in python, but ive dabbled with unity before, so i wanted to do a quick project to get used to the c#/c++ syntax. There are many things i would like to add, however the project i have planned for next had a much wider scope and I want to get to designing the architecture fast. This is poorly optimised, but ive setup a example render on itch.io. (Be warned if you tab out of the page it seems to stop working?). This was also my first interaction with Github and itch.io and im so happy ive learned how to use these. Ive always steered clear of GitHub and publishing my works online due to the complexity of it, but to my suprise the process is smooth. Like its not 'fun' to do, but its got a nice learning curve.

Ive attached a render from my code below (the green blob is a star, ive checked and i think that that is how it should look witht the lensing of the black hole)

Hope you find this intersting, and have a great Day!

  • 3 devlogs
  • 24h
  • 5.51x multiplier
  • 119 Stardust
Try project → See source code →
Open comments for this post

3h 34m logged

Final Devlog.
Boom its finished, there is so much more i would want to do with this, but I need to move onto my actual main project. The Black hole sim was more of a exisie in my translating maths/ideas to code skills, not ui or speed. And ild day it went pretty well. This is genuinely such a fun project to try and i would recommend you to have a go after this challenge is over (but please don’t use unity, its not built for this and it is not needed)

Im looking forward to seeing you in my devlogs for my next project

0
0
3
Open comments for this post

12h 30m logged

I made my first Unity GitHub Repsository today. TBH I was expecting it to be an absolute nightmare to deal with. But no its downloading a few apps and waiting for a bit whist unity compiles your code. Quick tip for anyone reading this, dont do what i did and do not delete the .git folder, its not a good idea 😭😭. Also I managed to get it onto Itch.io too, which was again much smoother then i was expecting. I Will probably ship the project soon and yall will be able to have a look. (although its pretty slowww), also i dropped one of my renders below (the green blob is a star, I chose a really weird colour for it now i think aobut it)

1
0
4

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…