Activity

NOT_A_ROBOT

Working on adding a system to load state from a TOML file!
Saving is not yet planned, though. This is for easier syncing with NASA Horizons.

Attachment
0
NOT_A_ROBOT

Solved!
Who’d’ve thought the real problem was in the far-away terrain collider handler?

Lol.
Lmao, even.

I’m keeping the Verlet integration tho. Δt⁴ error for the price of two Δt² substeps is hella worth it

1

Comments

sakshisuman25
sakshisuman25 3 days ago

very good

NOT_A_ROBOT

I made a basic implementation of Velocity Verlet to address the inaccuracy. It seemed to work in the integration test, but the orbits in the produced binary still seemed unstable/spiraling. I’ll need to figure out why that happens.

Attachment
0
NOT_A_ROBOT

I’m having this issue where the vessel just flies away instead of staying in a stable orbit. I guess I’ll try to debug it.

0
NOT_A_ROBOT

Working on the logic for formatting the speedometer!
I also refactored the SI prefix to its own enum

Attachment
0
NOT_A_ROBOT

Working on the UI for the speedometer!
Sorry I’ve been taking kinda a break lately. For some reason I’ve been getting distracted by other stuff.
I’ll try to be more active in the future.

Attachment
0
NOT_A_ROBOT

Added keybinds to altimeter for switching modes! Also, improved the control mode UI a bit.

0
NOT_A_ROBOT

Nevermind, a more pressing issue: the altimeter covers too much screen space on mobile!
Now I’m trying to make it more responsive.

1

Comments

NOT_A_ROBOT
NOT_A_ROBOT 9 days ago

100th devlog btw! Woo!

NOT_A_ROBOT

Finished the altimeter!
Next I guess I’ll try to hook it up to the menu control mode.

0
NOT_A_ROBOT

Added display for different selectable reference frames:

  • Above Sea Level
  • Above Ground Level
  • From Planetary Centre
Attachment
0
NOT_A_ROBOT

Working on calculating the altitude!
Getting the distance to the centre of the celestial body and getting the sea-level altitude is easy. Getting the ground-based altitude is not quite easy…

Attachment
0
NOT_A_ROBOT

Finished the altimeter inner formatting logic! Next, I’ll need to make it actually show up in game.

Attachment
0
NOT_A_ROBOT

Improved visibility and fixed some bugs with the overlay!
Next I guess I’ll try an altitude display.

0
NOT_A_ROBOT

The prograde/retrograde overlay now works! I just need to make it clearer and maybe add a needle.

0
NOT_A_ROBOT

Added a basic svg to png processing build.rs pipeline! Now hopefully I can start using regular ImageNode.

Attachment
0
NOT_A_ROBOT

bevy_vello had issues with Z-indexing, so I’m trying out bevy_prototype_lyon now and sadly it doesn’t appear to have a UI version; just a Sprite version that can’t quite be positioned using Node.
I think I’ll have to make a build script to rasterize SVGs into PNGs, then use that for the icons.

Attachment
0
NOT_A_ROBOT

Made the icons work! Not quite visible at the moment though, so I’ll have to figure out a way to improve its visibility.
I used bevy_vello for this, but maybe I should’ve used bevy_svg instead?

0
NOT_A_ROBOT

Working on adding prograde/retrograde markers to the oribar!
Right now I got something scrolling with the oribar. Next I’ll need to actually get the motion of the vessel and use that. Not to mention the SVG icons I need to use for the icons.

0
NOT_A_ROBOT

Switched to JetBrains Mono for the oribar instead of WDXL

Attachment
1

Comments

Tom
Tom 11 days ago

This is a whole game? Woah

NOT_A_ROBOT

Added a needle and indicator to the oribar!
Would be cooler if it used a monospace font, though.

1

Comments

oranger
oranger 11 days ago

so cool

NOT_A_ROBOT

Added a basic rotation indicator that I call the Oribar (Orientation bar)!
It’s based on a similar principle to KSP’s navball but for 2D instead of full 3D.

0
NOT_A_ROBOT

Did a round of small refactors and changed the background of the main menu to Surface instead of pure black.

Attachment
0
NOT_A_ROBOT

Got tab switching working! But it’s a little buggy, so I’ll need to fix some stuff.

0
NOT_A_ROBOT

Improved the look a little bit, but I haven’t quite finished the tab switching handling.

0
NOT_A_ROBOT

I got article loading working! Next up, I have to get tabs working.

0
NOT_A_ROBOT

The main element is now scrollable! Next, time to add some sections and texts.

0
NOT_A_ROBOT

I just needed to use Display::Grid on the root element, and structure things a little differently, and now the aside is looking scrollable and responsive!
Next, I need to make the main element scrollable.

0
NOT_A_ROBOT

Trying to add scrolling, but it seems it doesn’t work yet. I need to figure out how to constrain the text container’s size somehow.

0
NOT_A_ROBOT

Added main and aside parts in the about menu (also responsive)!
The main part is for the texts, and the aside part is for the list of tabs, but I haven’t implemented it; I was focusing on the layout and responsiveness.

0
NOT_A_ROBOT

Apparently I just forgot to add in a camera.
After a bit more cooking, I managed to make a very empty UI layout for the about page!

0
NOT_A_ROBOT

I improved my activation detection (pointer click or enter/space on tab-selected button)!
On a side note, I tried to add an about page but something seems to have gone awry… The window no longer updates when I press it for whatever reason.

0
NOT_A_ROBOT

Rewritten focus changing code!
Now, the focusable data resource is only updated every time one is removed or added.
It also uses a HashMap and Vec combination for fast O(1) lookups, at the cost of O(n) insertions (which is fine because n is often small-ish)

0
NOT_A_ROBOT

Fixed issue in test harness that caused essential systems to not run and tests to fail

Attachment
0
NOT_A_ROBOT

Added an i18n library for better future translations!
Currently, only English is supported, but this will make future translations a lot more feasible.

The library I used is i18n-embed.

Attachment
0
NOT_A_ROBOT

Added tab-navigation + pressing the button using Enter/Space. (Easy to make, but man did it take a while to refactor using a macro)
Also, made the control UI in the game scene use the new fonts since I removed the default font (I’m not gonna use it)

0
NOT_A_ROBOT

Working more on the main menu!
I’m trying to figure out how to vertically centre the text in the button, but still make it light up on hover/press.

Attachment
0
NOT_A_ROBOT

Designing a main menu prototype!
Right now it’s already pretty responsive, but I’ll need to add fonts, functionality, and of course, improve the color scheme

0
NOT_A_ROBOT

Finished the control flow for the main menu (and possibly other scenes), but I haven’t added a proper UI for it.

Here’s me switching back and forth between the main menu and the game scene, note how the state resets every time I go to the game scene
(Saving and loading isn’t implemented yet)

0
NOT_A_ROBOT

Improved terrain colliders a little
rn I’m working on compiling the game to WASM so that’s cool

0
NOT_A_ROBOT

Collisions now work! Mostly!
Just need to add a bit more padding so it’s always underneath the vessel.

1

Comments

NOT_A_ROBOT
NOT_A_ROBOT 20 days ago

Note: Zooming doesn’t scale the physics debug renderer. This is known and it’s a WONTFIX

NOT_A_ROBOT

After a LONG time trying to debug, terrain colliders seem to… acknowledge the intersection and NaN its way out of there. No clue why that is. I’ll have to spend more time debugging.

0
NOT_A_ROBOT

Added two more tests; new logic module now has two functions left untested (which I should get to unit-testing soon enough)

Attachment
0
NOT_A_ROBOT

I can’t just feed Rapier the tens of millions of terrain colliders per planet, of course! I’m experimenting a way to detect the range at which a vessel resides, and only generate the detailed terrain colliders at those ranges. No visuals or anything yet, but the tests are going well, for now.

Attachment
0
NOT_A_ROBOT

Terrain rendering finally works! Now time to implement terrain colliders, I guess.

0
NOT_A_ROBOT

After more debugging and trying things out, I can confirm the problem is likely to do with the update_lod method for whatever reason.

Attachment
0
NOT_A_ROBOT

Wrote a unit test for something and it seems like that could be the issue!

Attachment
0
NOT_A_ROBOT

The terrain system still needs work… Not quite sure what’s happening here.

0
NOT_A_ROBOT

Did quite a bit of work integrating the terrain generator to the mesh.

I haven’t seen its generation yet but all the tests pass. I’ll try to see if the rendering works fine in the actual application. After that I’ll need to somehow handle terrain collisions. (i.e. lithobraking, ha!)

Attachment
0
NOT_A_ROBOT

Worked on the terrain rendering system! Nothing to show yet in terms of render output, but I’ve been making progress on shaping the code for it.

Attachment
0
NOT_A_ROBOT

Refactored the entire terrain code, and the tests still work! (Hooray!)
Okay, NOW I think it’s time to integrate it with the celestial bodies.

Attachment
0
NOT_A_ROBOT

Index buffer seems to work well! Time to hook it up to the rest of the codebase?

Attachment
0
NOT_A_ROBOT

To make the index buffer I’ll need to decide on the primitive topology to be used here.
Although TriangleStrip seems to reduce index length, it seems to increase the number of tris drawn. And also it seems to be more complex overall, so I’m going with TriangleList.

Attachment
0
NOT_A_ROBOT

Implemented the vertex index getter! Time to work on the mesh stitcher!

Attachment
0
NOT_A_ROBOT

I think I’ve figured out all there is for generating the LoD terrain, now I just need to figure out a way to stitch them all into a mesh.
For this I’ll need to figure out how to get the index of the beginning and end of each LoD level somehow. Back to Desmos I go!

Attachment
0
NOT_A_ROBOT

Implemented the Desmos algorithm in Rust!
I just need to figure out how to stitch the LoD parts to a single Mesh.

Attachment
0
NOT_A_ROBOT

Made a prototype of the LoD algo in Desmos! Time to put it to Rust I guess.

0
NOT_A_ROBOT

Currently thinking a lot about terrain generation and LoDs.
I think I’ll make one with 6 levels of LoD, each being 128 vertices and the next LoD being 16× smaller (therefore 16× finer) than the previous one.
This means the highest one will be sized at 1/16777216 of a revolution, and each vert would be spaced out with 1/128 of that.. This is less than a meter for a Jupiter-sized planet.

Attachment
0
NOT_A_ROBOT

I did some refactoring and stuff and plan to add basic camera controls! I’m thinking it should be modal kinda like Vim.

Attachment
0
NOT_A_ROBOT

Tried to hopefully reduce the amount of imprecision that happens with the current rail to sv thing, but it ended up making things worse. Oh well.

Attachment
0
NOT_A_ROBOT

Fixed! Apparently I was applying some position/velocity adjustments twice.

Attachment
0
NOT_A_ROBOT

The test revealed a flaw! I’ll have to find the cause and fix it.

Attachment
0
NOT_A_ROBOT

After a lot of thinking and discussing with gpt I think I’ve managed to formulate a good algorithm to update the state vectors of on-rails objects. I’ll still have to write tests for this, though!

Attachment
0
NOT_A_ROBOT

Still working on implementing on-rails movement propagation.
During which time I found this peculiar issue where since I don’t derive Copy on my Orbit structs, some things are just not possible in constant-time.
For this reason I’m adding a copy feature flag to my keplerian-sim orbit library so that users can opt in to deriving Copy.

Attachment
0
NOT_A_ROBOT

There’s nothing wrong with the friction, it’s just that round objects tend to move like that…
Sometimes I’m reminded how much common sense I’m seemingly missing

Attachment
0
NOT_A_ROBOT

The problem? The celestial body’s too small and too massive. It’s like it was a black hole!

Anyways, I’m now using a celestial body akin to the Earth. It kinda works? But the friction seems too low for whatever reason. I’ll have to figure out why.

0
NOT_A_ROBOT

Tried to implement Newtonian gravity. I guess it’s a little too strong? I’ll have to figure out what went wrong, because the velocities are extremely high for whatever reason..

Attachment
0
NOT_A_ROBOT

I think I’m done for the day. I implemented writing the “on-rails mode” information. Haven’t done anything with that value yet, though. I’ll still need to test it first before adding more stuff on top.

Attachment
0
NOT_A_ROBOT

Working on writing from state vectors into on-rails information! I decided there can be three types on on-rails state:

  1. None: Does nothing
  2. Orbit: Orbits around the parent body
  3. Surface: Attached to the surface

Commit still pending, and tests are also yet to come!

Attachment
0
NOT_A_ROBOT

Currently trying to design how I’d implement on-rails and orbits in general (hence the errors)

Attachment
0
NOT_A_ROBOT

Shipped this project!

Hours: 6.79
Cookies: 🍪 203
Multiplier: 29.91 cookies/hr

It’s a basic countdown project until the end of 32-bit signed Unix time. Handling time and durations is a lot more difficult than I thought, especially because of leap years and irregular month lengths.

NOT_A_ROBOT

Looks like how I handle the mixed mode was quite naïve and not quite correct, because it doesn’t handle leap years correctly. I’m planning to use date-fns (https://date-fns.org/v4.1.0/docs/differenceInYears) instead to correct for this issue, however, integrating Closure Compiler with NPM packages seem a little more complicated than expected, so I’m trying to modify my build script to account for this.

Attachment
0
NOT_A_ROBOT

Worked on JS micro-optimizations, now it’s at 2660 bytes minified from 2713 (~2% improvement). I guess I’m too much of a perfectionist—

Attachment
0
NOT_A_ROBOT

Got the countdown working partially. There are spacing issues and the Unix counter isn’t ticking up yet

Attachment
0
NOT_A_ROBOT

Refactored entity creation using a builder pattern. That way I don’t leave out certain things by accident.
Maybe now I can work on adding Keplerian orbit physics?

Attachment
0
NOT_A_ROBOT

After more bugfixes, rigorous code examination, refactoring, and retesting, all tests on the reference frame logic is now complete! Now I should work on integrating Keplerian orbits with it.

Attachment
0
NOT_A_ROBOT

Found the issue! Just needed to make the celestial body KinematicVelocityBased instead of Fixed.

0
NOT_A_ROBOT

Okay in the test the collisions work kinda fine but in the binary it barely does anything…?

This is really weird

0
NOT_A_ROBOT

After some careful analysis adding dbg! prints and stepping through the code, it seems like it’s got to do with Rapier’s collision detection mechanism. No clue why it’s triggering here, the objects should not have overlapped. In fact, it should never overlap.

Attachment
0
NOT_A_ROBOT

Fixed a bug where rigid-space velocity doesn’t get updated from root-space velocity. Still gotta figure out what’s wrong in this test, though. No clue where it’s getting that number from.

Attachment
0
NOT_A_ROBOT

Fixed that, as well as a bug where root velocity gets applied to the root position but doesn’t use delta-time. Still got more stuff to figure out, though!

Attachment
0
NOT_A_ROBOT

I’ve encountered one of the possibly-many problems I need to solve: I forgot to update/generate the rigidspace position from the root position. Whoops!

Attachment
0
NOT_A_ROBOT

I’ve yet to make the origin-shifting algorithm work, so I’m looking to try to debug it. However, I believe it’d be easier to debug in a more minimal environment, so I’m preparing a custom integration test framework. to step through the simulation and see what’s going on. This is also useful to prevent future regressions. So far, it’s looking great!

Attachment
0
NOT_A_ROBOT

Got a basic window working in Bevy! I’m new to this, so I’m taking my time reading tutorials and whatnot.

Attachment
0
NOT_A_ROBOT

Refactored benchmarks, fixed documentation errors, and added some missing features. Now the Criterion benchmark reports show throughput amount!

Attachment
0
NOT_A_ROBOT

More tests, more subtle bugs. This time, GitHub Copilot found this bug that slipped through testing, and so I added a testcase for it.

Attachment
1

Comments

NOT_A_ROBOT
NOT_A_ROBOT 3 months ago

If you notice the screenshot colors seem washed out, it’s because of KDE’s Night Light feature.

NOT_A_ROBOT

I’m glad I decided to make unit tests. I caught a subtle bug before pushing to crates.io.

Attachment
0
NOT_A_ROBOT

All tests pass! Only the doctests though. I have yet to make new unit tests for the 2D orbit logic.
Next up:

  • Make 2D unit tests
  • Refactor the code
Attachment
0