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

3h 44m 16s logged

I have just made the grid in the background warp, representing the curvature of spacetime!

You will probably notice that the grid is smaller and follows you around if you watch the video. This is because I had to. The grid needs to be about this small, otherwise performance is bad. I could make it bigger by making it more spaced out, only if that’s something people would want though.

This took waaaaaaay too long since I made a very stupid mistake and C++ decided to harshly punish me for it. Well I did promise not to use AI in the next devlog, but I was dealing with a really weird issue with it for like 1.5 hours and I gave up and asked Claude code about it. So you see that screenshot right (you might need to click the next image button)? That was the solution!!!!! Just add = 0 to that line.

So basically in C++, if you don’t initialize a variable to a value, as I did there, the value of that variable will then basically be whatever happens to be at that memory address, which will initially be some random number. But as the function runs again and again, it will use that previous value, and later on I was doing y += ... so the y-coordinates of the grid were continuously increasing.

Visually, it looked like the grid wasn’t being drawn, since the y-value instantly went to a huge number.

Btw that was the only AI help I got for this part, except for the mathematical formula, which I got from Claude as you can see in the background of the screenshot.

0
16

Comments 0

No comments yet. Be the first!