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

superheroyrr

@superheroyrr

Joined June 18th, 2026

  • 34Devlogs
  • 4Projects
  • 1Ships
  • 15Votes
I do random things that are interesting to me, and also some useful utils here and there. Please vote my projects well so I can get the Framework laptop please 🙏🙏
Open comments for this post

4h 3m 35s logged

So I decided to spend a lot of time refining the velocity changing with the mouse. Also did a smaller refactor to make the code look cleaner.

The main issue I had previously was that it was jittery when the object was far from coordinates (0, 0, 0). It turns out it was another stupid float vs double precision problem in C++. Yes, very similar to what I faced earlier in this project.

I will admit that I did use AI to find these bugs and fix them, but I was supervising it very closely and testing it thoroughly. I am also starting to see the limits of AI. Claude now decided to flag a bug which didn’t exist, and when I asked it to refactor, it made the code look worse ironically. I ended up having to do that part myself.

However, AI was still more of a help than a hindrance, so I will still use it throughout this project. If you are curious, the git commits have more detail about these and they are here.

0
0
10
Open comments for this post

4h 23m 4s logged

So I made it very easy to change the velocity of objects, you can just drag from the cone anywhere now!

Surprisingly, the hardest part about this was just getting the arrow to draw and also tuning how big it is so that it looks good, but once it was there, it was actually pretty easy to just hook up a click detection.

Funnily, this 3D library I’m using (Raylib if you’re curious) doesn’t have a builtin “DrawCone()” function. It turns out that to draw a cone, you are supposed to use the DrawCylinder() function and set one of the radiuses to 0! That was really weird to find out.

0
0
3
Open comments for this post

1h 42m 45s logged

HEEELP!!!! I added a panel to edit the properties of objects, so I decided to add a bunch of mass to Mercury for fun, now the Sun is orbiting Mercury! This is so trippy especially how much it warped spacetime.

0
0
34
Open comments for this post

4h 1m 9s logged

So one of the maintainers left a comment with feedback for what I should do about 2 days ago. Today I finished addressing those issues in code.

The reason it took this long is because I was legit just spending 2 hours or so just wondering what I should do! Basically, the other PR that was about the calendar system I mentioned earlier got merged and made the ICS parsing function take in a C++ std::stop_token, which I was unfamiliar with.

It turns out that it has to do with multi-threading and so I had a dilemma of whether I should make it parse the calendar data in a separate thread or not. I at first decided to make it multi-threaded but then changed my mind when I realized how hard it would be.

There is a lot more to this though, if you are curious you can see more details in my PR comment.

Also here’s a proper video of this feature in action!

0
0
17
Open comments for this post

4h 27m 44s logged

So I fixed some bugs with the warped spacetime grid, and also added a way to add objects to the scene. I haven’t added collision detection yet, so it kind of looks weird but I’ll do that later.

The reason this took so long is because adding objects kind required a lot of refactoring. Basically, I had to write code for when my objects get copied around, because adding an element to a list in C++ might mean copying it around. This was difficult because raylib is a bit too high level for how it handles these GPU textures and models.

Now I will add an edit panel to make the new object changeable.

0
0
17
Open comments for this post

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
0
16
Open comments for this post

1h 31m 37s logged

tbh, I haven’t been working on this a lot over the last few days because of other projects, but now I have.

Here’s what I got done:

  1. A major refactor on the codebase which will make it easier to later add a preset selection screen.
  2. A better selector for celestial objects at the bottom of the screen.

    I’ll be honest, I did write most of the code for these with AI (yeah bummer ik, but really, who likes refactoring code on their own?). Although, I was closely inspecting everything it wrote.

    Now the next thing I will do is make the grid warp with the gravitational field strength to represent space-time getting bent.
0
0
31
Open comments for this post

1h 50m 6s logged

In these ~1.75hrs, I have done 3 things:

  1. Made the GitHub gist upload part of the app a separate command in the command line. Previously it just ran automatically with classroom-sync run if the environment variable was there.
  2. The app uses playwright, a sort of web browser simulator so that you can load websites and extract information from them using code. It only officially supports a few Linux distros (mainly Ubuntu and Fedora based I think), so I added a message to people not on those distros like myself to use a workaround.
  3. Converted the Javascript code to Typescript so that it can be maintained easier.
0
0
3
Open comments for this post

59m logged

Most of the app is done now, just need to fix some crazy edge cases, like right now, it doesn’t work if there is an event that is 2 weeks long, and cross year as well. I also need to test if the Github gist script actually works.

So here’s the flow right now:

One time setup:

  1. You run the save-session.js script, it will open a browser window
  2. Login to your school account
  3. Press enter in the terminal, the script will then save the cookies of the browser session so that it can use that to get calendar data later.

I will put more details about why I chose this methodology later in the Github readme.

To generate the *.ics file:

  1. You run the fetch-ics.js script and wait patiently. If you set the MONTHS_TO_WALK constant in the file to a fairly big number, it can take a while.
  2. The script will go through each page of the “Public URL of the Calendar” (not very public) and webscrape each event that is there. Since it is using your credentials from the One time setup, it will get all of the events, not just the public ones.
  3. Done! Now you have a classroom.ics file that you can do whatever you want with!
0
0
1
Open comments for this post

1h 58m 6s logged

Just finished my second contribution, sorry for not documenting it in more detail if you like that. Basically what I’ve done now is added for iCalendar files (*.ics) to be added to the calendar widget that is builtin.

iCalendar files are a pretty universal way to add event to different calendars, heck the “big 3” (Google Calendar, Apple Calendar, and Microsoft Outlook) of calendar apps all support it. So, it is a fairly important thing to have.

I was motivated to add this because I wanted to add my own *.ics files to the Noctalia calendar, but couldn’t due to this limitation. But not anymore! (that is if they merge my PR)

What’s crazy is that while I was writing my PR, someone else literally made another PR that was also editing the calendar code, what a coincidence! I don’t think that our 2 PR’s will conflict with each other since we were editing different parts of it as well!

0
0
3
Open comments for this post

1h 36m 55s logged

For this update, I have done 3 things:

  • Added a small outline circle to distant objects so that they are more visible.
  • made it so you can click inside of these circles or on the planet to zoom into it
  • Added a trail behind each planet.
2
0
13
Open comments for this post

2h 29m 11s logged

These past ~2.5 hours have been spent on some quality of life features for the app. Mainly these 3:

  1. Made every object 5x bigger than its real life size because it turns out the solar system is such a big place, that you kind of have to. Otherwise everything looks too small.
  2. Made it so when you switch between planet it has a quick transition period.
  3. Added textures to every planet and the sun. This was actually the hardest part, I had to play around with the settings because it would usually apply the texture sideways, or distort it but I got it working anyways.
0
0
2
Open comments for this post

3h 34m 36s logged

So in this devlog I’ve done quite a few things to make the overall experience nicer:

  • Added a way to pin one object to the center of the screen.
  • Added the Moon and the rest of the planets in the solar system
  • Switched from using light minutes to light seconds for distance measurements because the light minutes values were WAY too small

Another annoying bug I had to fix:

So there was this bug where the moon would pretty much always just fly out into the abyss as if there was zero gravity applied to it. It was pretty annoying to find out that it because I was using C++‘s float type instead of double.

What’s the difference? Well basically float gives about 7 decimal points of precision, while double gives about 15. I initially started with float because it is half the memory size of double and in my experience, float gets the job done like 99% of the time.

However, it turns out I did need more than 7 decimal points. This is because the gravitational force experienced by the Moon is very small, like around 10^-12 (thats 0.(eleven zeroes…)1). Since float can’t hold that value, it just rounded it to zero, causing the moon to fly out in a straight line forever. I’ll be honest, it wasn’t me who figured that out, it was Gemini who did, but pretty much everything else in this devlog was made by me.

It’s crazy how such a small difference of like 10^-12 can make on a physics engine like this! I hope I don’t have to then switch to C++‘s long double, which has even more precision, that would be insane if I had to go that extreme. I probably would have had to if I didn’t switch from light minutes to light seconds lol.

0
0
3
Open comments for this post

3h 0m 44s logged

I got gravity simulation working! Now the Earth is spinning around the Sun!

I know you can’t see it in the video I posted, but the Earth is there, it’s just that this simulation is drawn to scale, the Earth would actually barely be visible if you were looking from a spacecraft that far away.

This took quite a while because of this one really stupid bug: basically I store all the distance values in light minutes rather than kilometers or miles because otherwise those values would be too big. However, the physics equations that I’m using expect the values to be in meters, not light minutes.

So basically, I forgot to convert from light minutes to meters when calculating the gravity acceleration, so those values were too small to change the velocity of the Earth, causing it to go in a straight line forever.

But now that that is done, I will start adding the rest of the planets and maybe their moons as well to this simulation, then I can look purely at quality of life improvements to improve the interactivity of it.

This project is turning out to be easier than I expected! Hopefully another challenge doesn’t pop up…

0
0
7
Open comments for this post

31m 7s logged

So I got this cool C library called adjust.h setup for hot code reloading. This means that I can update the code while it’s running, and the changes show up in real time! I know that I am making this a web app, but because the module doesn’t work on web, I will prototype the app on desktop for now.

0
0
3
Open comments for this post

1h 28m 31s logged

So in this devlog, I have set up the project with all of its dependencies, it really can take that long when you’re using C++! Right now I just have a basic testing window, but I will quickly fill it in with a preset of the solar system soon, then I’ll be writing physics code for a while.

0
0
3
Ship

So here’s a summary of what I’ve done:

CoW Calc is a battle calculator for the browser strategy game Call of War. The game involves complex battles between stacks of military units with different stats, doctrines, and HP values. Doing that math by hand mid-game is genuinely painful, sure as you get more experience you start to know automatically, but there will still be times when you aren’t sure. CoW Calc makes it fast and visual.

The biggest challenge was making it approachable for players who’d never seen it before. My friend tried it cold and got completely lost, so I rebuilt the onboarding from scratch into an interactive guided tour that walks you through your first calculation step by step.

I’m most proud of the community response. I posted it to r/CallOfWar and it hit #1 post of the day, and the Discord feedback directly shaped what I built next (mobile support was the #1 request and previously didn’t exist at all).

To test it if you don’t play Call of War: The tutorial will walk you through everything. For a quick demo after the tutorial: imagine you’re attacking with 3 Infantry (level 1, Comintern doctrine, 100% HP) against 2 Artillery (level 1, Allies doctrine, 90% HP). Add those units to each side using the unit list, connect them on the battle map, and hit calculate. The website will show the predicted results, which are usually pretty accurate. You don’t need to know the game — the calculator applies its game knowledge for you.

  • 15 devlogs
  • 16h
  • 18.84x multiplier
  • 302 Stardust
Try project → See source code →
Open comments for this post

57m 19s logged

Flashback to when I said:

At the very least, I feel confident that this project is complete enough to be submitted now…

Yeah clearly that did NOT happen.

So I tried using my own app for its intended purpose on my own, and I ran into a crazy weird bug: sometimes when switching between the main page and connection page, it would duplicate the units that were selected.

What’s weirder is that it seemed to only affect the enemy units and not the your list…

It took me about 2 hours of debugging (unfortunately most of which was on Chrome DevTools debugger, so it didn’t count for stardance 😞) to finally find out the root cause.

The root cause was in how React.js handles refreshing data. So basically, whenever the data in my program changes (ie: the user hits next or start calculation on the connections page), it gets saved to the sessionStorage, after being processed into certain format. It saved the “your” unit lists then the “enemy” unit lists to the sessionStorage.

In the function that saves it to the sessionStorage, it has a local variable that is supposed to have the current data, which is normal. How it works is that the it sort of takes local variable and overrides the specific changes on top of it, then saves the whole thing to sessionStorage.

However, because it was using a React method to get the current data, it doesn’t immediately update itself, only updates when a new frame is drawn to the screen… So when the higher level code then tried to save the your unit list, the local variable was out of date, and applied the changes on top of an out of date data and then saved that to the sessionStorage.

This caused problems when switching between tabs since sessionStorage is the lifeline of the communication between them. I got around this problem by basically saving all of the data in one go instead of saving one part then the next part.

This was very frustrating to debug by myself but it feels rewarding now that I’ve done it. NOW I will submit this. My family is starting a roadtrip tomorrow morning so I won’t be able to code for a few days, I really want to get this off my plate before then.

Here’s my debugging setup I used for this:

0
0
5
Open comments for this post

16m 22s logged

So immediately after deploying the previous change there was a simple type error that made the whole thing fail 🤦‍♂️. This could have been easily avoided if I just ran npm run build before pushing, I think I will do that from now on.

I also added a button on the connections page to go back to the main page, I had to go through 2 deployments for this change as well because on the first attempt, I accidentally put the button underneath the tutorial button on mobile lol.

At the very least, I feel confident that this project is complete enough to be submitted now, I am really excited to move on to another cooler project.

0
0
3
Open comments for this post

36m 16s logged

Ok so now I fixed that bug which the guy from discord was talking about (at least probably). The problem they had was that when switching between the connections page and the main page, it would sometimes clear out all of the entered information.

This problem was not occurring for me or my friend, so I was a bit confused on why this could be. After a bit of research (basically talking to my friend gemini), it turns out that the previous method I was using for this, React.js context, was not designed for this use case and is fairly fragile about the data it holds.

A simple refresh will clear out the data, and sometimes mobile browsers can aggressively do this. The person who reported the bug was also one of the people who asked for mobile support, so they were probably on mobile and it happened. For some reason, my phone wouldn’t cause this to happen so I didn’t catch that bug.

So now, instead of React.js’s context api, I swapped to using the browser’s sessionStorage api, which is supposed to be much more reliable and also keeps the data intact after a fully refresh! I will now ask that guy if the problem is fixed.

0
0
2
Loading more…

Followers

Loading…