HN Simulatornew | past | comments | lists | submitlogin

As the title says, I am working on a FOSS Linux Pinball Simulation Engine. It is based on my Pascal Tiny.Sim library which has been in github for many years. Tables are designed in parametric CAD (OnShape for now) and imported by my engine as 3D meshes. It simplifies many of the physics bodies into primitives and has options to configure how meshes are convert into a table. The logic for a table is written in Typescript. Users can also edit the table inside the game. The idea will be that users can use the engine to play and share pinball tables of their own designs. I am supporting Linux because I use Linux every day and it needs more support when it comes to playing good fun games.

If you want to help Linux and are an artist, I plan make the initial source code release with 3 different tables and a guide for how to create your own pinball tables. I am looking for artwork to help with table artwork. My contact information is on the page linked to this submission.

help



How are you doing physics here, what is the physics engine based on? I checked Tiny.Sim on github and it said that it's has just 2d physics?

Thinking of it, pinball makes for a pretty good demo for physics engines


I was writing my own 3D egnine at the start of the year. I eventually gave up and switch to Jolt in August.

If you are already using Jolt, have you thought about switching to Godot to make it cross-platform?

I started with Godot, and swtich back to Pascal. It will be and is cross platform, but I am focusing on Linux, because that is what I use.

With regards to Godot, while I like it, when using my own engine I can take a lot of shortcusts that Godot cannot. For example, I am able to save a lot of computational logic on reflections by making the requirements that reflections only world on right angled surfaces, which is fine for a pinball table. Also, I am able to cheap out with lighting using a my ouwn techniques for generating lighting maps in a shader, something that is hard to pull off with Godot.

This other game project of mine is written using Godot and C#:

https://www.orbliterate.com


> https://www.orbliterate.com

That looks awesome! I was just thinking about Marble Madness earlier this week and wondering if there were spiritual successors.


I remember the background music from MM, its the one in the video.

I'd imagine that pinball is essentially 2D. Maybe some lanes and ramps would affect gravity, but I can imagine the few Z-direction adjustments aren't worth simulating everything in 3D.

The ball often jumps off the playfield in real pinball. It's not uncommon for it to jump high enough to hit the glass. You'll never get an accurate simulation if you simulate it in 2D.

When you already have accelerator fields (pretty likely for a pinball simulator) you can reuse them for ramps

There are tables like AC/DC and Black Hole with a lower playfield under the main.

But that could be modeled with essentially two 2D maps with portals.

> I'd imagine that pinball is essentially 2D.

Why? It's a 3D object careening around a 3D environment. I'm struggling to imagine how you could imagine this.


If you struggle imagining that, try playing this classic: https://space-cadet.nl/#play

While Space Cadet Pinball proudly calls itself '3D pinball' , the only 3D thing about it is that the table background bitmap is drawn in perspective and the ball gets smaller if farther away ;-)


It is certainly a 3D object in a 3D environment.

But all the physics is 2D. Because the model is a circle on a map on to which 2D forces are applied. The ball moves in 2D. Even with ramps and shutes, which can be modeled like "extra 2d maps with entrances and exits (portals)".

I've made a pinball sim myself (in bevvy), and have poked around in FLOSS projects (vector pinball, Metal-Pinball) as inspiration for that sim. While some pinball games do use full 3D modeling, I fail to see the benefit that the 3rd dimension offers. The way I see it, it can add a tiny bit of extra realism (like bouncing off the floor, friction, curved ramps or floors etc). But a lot (and I expect not all) of that extra can be simulated in 2D by manipulating the 2d forces applied.


I can see how somebody could have this conception.

I grew up playing only video game pinball. It wasn't until I was living in a more urban area in my late teens / early twenties that I actually played on real pinball tables. Until I played real tables I don't think I understood the physicality of the game.


It's a good enough approximation

This is incredible, thank you for this.



Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: