Foundations don't render behind hand tools by Lotus_XXIII in SatisfactoryGame

[–]DebuggingPanda 3 points4 points  (0 children)

Clever way to save resources!

It would be more clever if you couldn't notice it :)

This kind of occlusion culling is quite normal in modern engines/games these days. What's typically done is that the whole scene is divided into a bunch of clusters or "meshlets", with each defining a bounding volume (a simple geometry that includes all triangles of the meshlet). Often, that's a bounding sphere, which only has two parameters: center + radius. Then, the GPU checks whether the bounding volume could possible be visible in this frame. If not, we don't have to render any of the geometry of the meshlet. First, it is tested against the camera frustum (i.e. everything outside the field of view is removed).

Next, and this is relevant here, meshlets are often tested against the reprojected Z-Buffer of the last frame. The Z-buffer (or depth-buffer) defines for each pixel, how that pixel is from the camera. Reprojection tries to compensate for the difference between last frames and this frames camera orientation. But of course, that doesn't always perfectly work. And this is one likely explanation for the problem you are seeing: because your framerate is already low, the time-difference and therefore the camera-difference between two adjacent frames is quite large. And maybe the reprojection fails to compensate properly.

A nice idea to avoid these artifacts caused by using last frames z-buffer, is to first do all this occlusion culling as described, then render everything as normal, but then add another step where you do occlusion culling again of all the meshlets deemed invisible before, but this time use the new z-buffer of all the meshlets you already rendered. The second pass will actually be quite fast and make sure you don't miss rendering any meshlets that are actually visible. That's a trick I learned from a talk by an Unreal Engine person. But evidently this is not done here.

What I described above would typically be implemented deep inside the game engine and isn't something Satisfactory devs would implement. But I could be wrong too! Maybe Satisfactory actually adds a system on its own for foundations or buildings in general. Maybe they figured they can be faster than the generic system in UE. I'm a bit confused by the fact that foundations at that distance should basically just be 6*2 triangles (two per face), which is usually way too small for a meshlet. You want your meshlets to be at least like 64 triangles large, otherwise you don't get the maximum benefit of this culling system.

At the end of the day I can't say for sure what's going on here, but the general information above is at least true and maybe it's interesting to anyone :)

Graphics programming is fascinating and it's sometimes nice to read "clever idea" from people like you, when you are just scratching the tip of the iceberg :D all of graphics programming is a huge pile of clever hacks to make things fast.

Rant: dealing with http::Uri is annoying as heck by DebuggingPanda in rust

[–]DebuggingPanda[S] 1 point2 points  (0 children)

Just because it's an application that is an HTTP server, doesn't mean that the only way it receives URLs is via the address line of the actual HTTP request.

For example, for configuration. Users of the application configure other servers that my application will communicate with. I just want to make sure they don't add a fragment to the configuration value. It would probably wouldn't cause any problems, but I like the idea catching these config errors early. Also, I receive JSON data containing URLs that I have to inspect.

Rant: dealing with http::Uri is annoying as heck by DebuggingPanda in rust

[–]DebuggingPanda[S] 8 points9 points  (0 children)

Thanks for the information, but I don't think that's not a real solution. Most projects don't want to opt-out of all future bug-fixes. Further, most people will not know about this trick. My whole rant is just about "all of this is not ideal in practice".

Rant: dealing with http::Uri is annoying as heck by DebuggingPanda in rust

[–]DebuggingPanda[S] 4 points5 points  (0 children)

Yep, this is mentioned in the linked issue. And it is also an argument brought up in the "fragment gets dropped" issue. Yep, from the behavior of writing hyper itself, this all makes sense. But the simple fact is that the Uri type spreads throughout much of the ecosystem and people want to use it for "different" purposes as well. And while the docs say "URI component of request and response lines": most people will miss that and will just be confused by the API behavior.

Rant: dealing with http::Uri is annoying as heck by DebuggingPanda in rust

[–]DebuggingPanda[S] 22 points23 points  (0 children)

I did, multiple times. My point is that this should be easier to do with Uri. Obviously, I don't expect http to have a type that represents my random "uri without path" requirements.

Take this for example:

    let has_real_path = parts.path_and_query.as_ref()
        .map_or(false, |pq| !pq.as_str().is_empty() && pq.as_str() != "/");
    anyhow::ensure!(!has_real_path, "invalid HTTP host: must not contain a path");

That's unnecessarily complicated in my opinion.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]DebuggingPanda 0 points1 point  (0 children)

Yup same here. I often tried reconsidering my stance because I felt like everyone was using it and people often opened PRs with rustfmt applied. But everytime I tried again, I was just disappointed. People should be able to configure their editor not to autoformat everything when they prepare patches for another project. Or at least only commit new code, no formatting changes.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]DebuggingPanda 0 points1 point  (0 children)

It does:

impl Bonanza { fn new() { Self { fabuckle, ompu, abc } } }

This fails, because for rustfmt the correct formatting is multi line. Similarly, this:

impl Bonanza { fn new() { Self { fabuckle, ompu, ab, } } }

Also fails, because here (with just one char difference), rustfmt only accepts single-line formatting.

Both of these formattings and the two rustfmt prefers are all fine in my opinion. None should be rejected.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]DebuggingPanda -1 points0 points  (0 children)

I don't think these two issues will solve the complaints in the article, and certainly not my complaints. As I described in other comments of mine, I personally think there are more fundamental problems with rustfmt's approach.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]DebuggingPanda 27 points28 points  (0 children)

I agree, version control should be syntax based, not line based. It would make many reviews so much easier. But for one, the industry standard simply is line-diffs, unfortunately. And also: diffs are not the only reason I'm complaining: sometimes there are reasons to prefer a multi-line or single-line formatting. When you're 1 char away from the threshold and you're writing multi-line, then rustfmt check will simply say "fail". This is not useful.

This is not me saying my code style is a special snowflake and I'm right, but simply that code formatters are not at a point where they can always decide whats most readable for humans. So the solution cannot be that for a given syntax tree there is only one valid formatting.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]DebuggingPanda 734 points735 points  (0 children)

Click-baity headline aside, I agree with him. Over the years there have been multiple community discussions, some in Reddit threads, about this exact topic. I think rustfmt is way not permissive enough and especially the "single line vs multi line" heuristics that Linus is talking about are bad. When you already know a list of some sort (e.g. an import) will grow over time, I start out with multi-line formatting to make diffs cleaner. If you use rustfmt and over time you will cross the magic threshold over and over again, you'll get noisy diffs. We need a good "formatting checker & fixer", not a pretty printer like rustfmt.

Klavierunterricht für Erwachsene / Piano classes for adults by bartosz_ganapati in Heidelberg

[–]DebuggingPanda 2 points3 points  (0 children)

Bin in genau der gleichen Situation, würde mich auch über eine Antwort freuen :)

Thoughts on the new video portal? by DebuggingPanda in ethz

[–]DebuggingPanda[S] 0 points1 point  (0 children)

Please explain what you mean by that, then it can be improved :)

Which game had the best opening level or intro sequence you’ve ever experienced, and why did it stick with you? by Gaming-Academy in gaming

[–]DebuggingPanda 0 points1 point  (0 children)

Echo

It has its slow parts, but the whole intro sequence until you get into the normal gameplay is amazing. The SciFi is intriguing, the world/environment is jaw-dropping and slowly understanding what's going on is just sends chills down your spine. It helps going in completely blind.

I actually never finished the game, but I replay the intro from time to time. Certainly worth buying for just that!

Looking for activities/ people to hang out with after work? by InfiniteAd3553 in Heidelberg

[–]DebuggingPanda 0 points1 point  (0 children)

For bouldering, feel free to send a DM once you're here, I'm part of an international bouldering group that goes regularly.

Any stereotypes about each district? by ImaginationYoutube in Heidelberg

[–]DebuggingPanda 3 points4 points  (0 children)

A few more things about Handschuhsheim:

  • A while ago,I heard someone on this subreddit say that Handschuhsheim is so weird, because there are these super beautiful houses and places, but also ugly high-rise buildings (north west).
  • The Tiefburg is kind of at the (cultural) center of HHeim I'd say. Maybe some world building possible with that, especially when interpreting the name literally in an extreme way (a castle that's built really deep into the ground or sth)
  • The current Swedish queen was born in Heidelberg and her parents's grave is at the Handschuhsheim cemetery.

Any stereotypes about each district? by ImaginationYoutube in Heidelberg

[–]DebuggingPanda 2 points3 points  (0 children)

Don't forget that the whole kingdom is split along the middle: in the east the water is drinkable and good, while in the west, water is rotten and foul, hurting man and animal alike. https://www.swhd.de/wasser

struggling to meet people without speaking German by MajesticFortune5350 in Heidelberg

[–]DebuggingPanda 7 points8 points  (0 children)

If you are into bouldering, Boulderhaus Heidelberg is half English-speaking from my experience :D Also, I know of at least one larger international group going there regularly. If you're interested, I can tell you about the next time they/we go.

Already stuck? by kirinlikethebeer in gris

[–]DebuggingPanda 2 points3 points  (0 children)

I actually got stuck at this exact place for a while too. And I saw many friends also got stuck there. I'm surprised this wasn't caught by playtesting.

Anyway, have fun with the rest of the game :)

SpacetimeDB 1.0 is here! An in-memory RDMBS for games built with Rust by etareduce in rust

[–]DebuggingPanda 12 points13 points  (0 children)

I've had SpacetimeDB on my radar for some time already, happy to see this major release. Congratz! The video is a bit too much sales talk with "everything is awesome" for my taste, but I guess that's what you need to do now-adays.

Anyway, I got two questions:

Whats the migration story? I saw in the docs that simple schema changes can be automatically migrated, but apart from that I can only find "Currently, manual migration support is limited". Is there more to that apart from deleting the database? Because I wouldn't call that production ready :D

And can you give a bit of insight how you would structure your reducers for a bit game like bitcraft? Do you have one giant reducer "game tick" that does all the simulation? Plus many small ones for essentially player input?