r/howdidtheycodeit

Milling Machine Simulator

Milling Machine Simulator

I was working on a project that required real-time mesh changes to simulate cutting etc. I couldn't find a solution at that time. Papers I dug into said it required a lot of compute. Some game devs I talked to said most of it were tricks that gave the appearance (eg animated meshes), and not actual changes.

The best I got was Teardown which simulates object destruction using voxels. It was hailed for technical achievement.

Today I just came across this game. Milling Machine Simulator.

It simulates material removal, cutting and hole creation etc. So it seems like compute is not the issue. Also, given it is basically free-form, it doesn't rely on tricks. And it doesn't seem to be doing what Teardown did.

Any idea how they did it?

u/bwazap — 4 days ago

How do games like Peak, Noita, etc ensure randomly generated levels are completable?

Peak seems to generate 4 random levels each day, but they are always completable. Noita generated a new map for each run, and has the benefit of the player being able to modify terrain, but still needs to ensure the player isn't blocked from progressing downwards.

With Peak especially, being a 3d game with no terrain modification, how do they ensure a map is completable? (No necessary climb too high to progress past)

reddit.com
u/WolfInABox — 9 days ago

How does Unreal call code that doesn't exist yet?

So I've been learning C and I'm actually a bit curious how they implemented it, Unity compiles stuff to CIL because it primarily runs C# scripts and AFAIK is programmed in C#, this makes sense because Microsoft provides tools to do this and it's in a virtual environment in it's runtime, a lot of engines use Lua, which turns into bytecode and is interpreted, this also makes sense because it's being put into essentially a runtime with completely virtual memory like C#. Now Unreal does Blueprint (if you use Blueprints) -> C++ -> Machine code. I have two questions:

- How does it actually look in the source code? Do they call the compiler and it magically gives them a function pointer to the machine code? (obviously isn't this simple but you get what I'm asking)

- How does that look under the hood? How does Unreal know that what it's about to execute won't cause an error in the rest of the program/whatever other user-defined code is running on that thread? Even the best compiler can't account for every possible error

reddit.com
u/Jbolt3737 — 10 days ago