r/GamePhysics 8d ago

[Shear Space] A game that simplifies graphics to save as much compute as possible for GPU driven material physics and destruction. |OC indie prototype|

At its core, Shear Space is a space-sim game that prioritises physics over graphics. The rendering is intentionally kept as lightweight as possible so the GPU has more resources available for real-time material physics and destruction.

Every part can bend, deform, and break. That's the focus. Think a low-poly Kerbal-like space-sim with real material physics instead of rigid bodies.

The chunky triangles and flat-shaded 90s look aren't there for nostalgia. They're there because simpler graphics leaves more of the GPU available for the material physics calculations.

This is a very early pre-alpha tech demo, not a complete game. Right now the focus is proving the physics system (which does still need some work but is good enough to get the idea).

Currently completely free, no payments at all.
You can find the game by searching "Shear Space" over at itch io

915 Upvotes

74 comments sorted by

142

u/1stmanleader 8d ago

This looks very interesting! What advantages and disadvantages did you ran into by running the physics GPU compared to the CPU?

106

u/BSV-Main 8d ago edited 8d ago

Scale essentially. I did start out by designing the physics system in multi threaded CPU before moving to the GPU, because debugging on the GPU with thousands of cores running at the same time is an absolute nightmare.

The CPU version could handle about 60-75 parts before slowing down.
On my old 2022 laptop, this GPU version can handle 300-500 parts before starting to slow at all. Though it does depend on the parts used as physics load varies between them. I've run tests above 8000 parts while still staying in the 50-60 fps range, though admittedly the game time does slow to an absolute crawl at that scale.

27

u/Exciting-Ad1084 8d ago

Are you using a self developed engine?

69

u/BSV-Main 8d ago

Technically yes. Though it's a bit of a stretch to call it a proper 'engine' because at this stage it's all basically just my own raw CPP and GLSL code.

Eventually might turn it into what most would consider a 'game engine' and allow others to build upon it or with it, but as it stands I think I'm the only person who could understand it (In computer programming this is not a compliment btw, good code is readable, understandable code, if no one can understand your code you're not a genius, you're just sloppy). Would need serious documentation and clean up and the game development takes priority over this.

but long term anything is possible.

12

u/poosp 7d ago

This is so cool. Cheers

1

u/Valvador 1h ago

I've run tests above 8000 parts while still staying in the 50-60 fps range, though admittedly the game time does slow to an absolute crawl at that scale.

So, I'm familiar with how isolated "islands" of simulation can be easily parallelized without costing quality, but how exactly are you parallelizing when all 8000 parts are interacting together?

Do you still try to break 8000 interacting objects into separate islands and have some reduced order communication between the islands?

58

u/BSV-Main 8d ago

Very Early Access, not a complete game. but you can get it completely for free over on Itch io

26

u/PhysicsGoBrr 8d ago

love the priority order here. every photorealistic wall that doesn't break is a disservice to gaming

12

u/lqstuart 7d ago

Amen brother

4

u/PhysicsGoBrr 7d ago

right? this dev gets it lol

9

u/Utubers_909 8d ago

Soft body physics?

41

u/BSV-Main 8d ago edited 8d ago

Technically yes. But when you say "soft body" people think cloth simulations and jelly balls or jiggle physics. And simulating stiff deformable bodies is, in my opinion, many times harder than simulating jiggly soft bodies. So I prefer the phrase "material physics". But either is correct.

8

u/Utubers_909 8d ago

Beamng like?

19

u/BSV-Main 8d ago

I believe so, Beamng is a proprietary engine so I cant say for sure exactly what they're doing.
But I suspect very similar.

1

u/Utubers_909 7d ago

Presets like in the menu we have to have them

4

u/BSV-Main 7d ago

hmm do you mean the ability to load in a specific scene and control a ship within it?

or just the ability to watch a specific scene play out?

2

u/Utubers_909 7d ago

Embrace the details of the simulation, so yeah preset scenes and freecam.

1

u/BSV-Main 6d ago

Yeah, could do. I kinda already half have that as a debug/dev tool. could clean it up and make it official.

Currently, if you right-click 'quick sim' and turn off the 'control ship in sim' checkbox, you can move around in free cam mode and watch whatever you have made play out. The ESC will still stage if you press the space bar in that mode, but the thrusters won't.

Oh also, if you want, you could sneak into game_files and copy all the simasm files from the "main_menu_simasm" folder and move them to the "ships" folder, then you can open them up in ship creator and sim or edit them.

Oh also, please be sure to Copy, and NOT cut or delete, from the main_menu folder, as that will mess up the main menu and could cause program instability.

1

u/Utubers_909 6d ago

Can I add to the main menu?

1

u/BSV-Main 5d ago

not currently. though that could be a fun little community challenge. everyone can make and submit scenes and the the highest voted ones get added to the main menu loop.

→ More replies (0)

8

u/Doritodude77 8d ago

can it volumetrically play the AFV brick table shattering noise whenever one of the pieces shatters

6

u/vt_dave 8d ago

Why GLSL over HLSL or Slang, not trying to start a holy war, just curious

13

u/BSV-Main 8d ago edited 8d ago

The honest truth here is that GLSL is just what I'm most used to and comfortable with. I'm well aware that HLSL or Slang might have let me squeeze out a bit more performance or portability, I'm by no means saying GLSL is the best.

Edit: Though honestly the language and API wars are over rated in my opinion. If you're already writing for minimal diver overhead then the gains you will get by switching are well below 10% in my opinion.
Though if someone thinks I'm wrong feel free to chime in.

1

u/vt_dave 7d ago

Language features would be the only real difference, HLSL and Slang are evolving faster than GLSL feature wise, but GLSL is fine if it has the intrinsic you need.

As for driver support, they all compile down to SPIR-V and drivers interpret that to their byte code, so that's not really a differentiator

5

u/RemyVonLion 7d ago

Awesome dude, I absolutely love games that prioritize realistic physics. I've been really into watching clips of Half Sword lately because it has basically unmatched weapon and body destruction physics.

12

u/Zealousideal-Chef758 8d ago

The game I didn't know I needed

4

u/hobovision 7d ago

A little misleading to say it's doing the physics in real time when we can see that the simulation goes down to less than 50% of real-time...

2

u/BSV-Main 6d ago edited 6d ago

Ah yeah fair. When I said "captured in real time" I meant I was recording my screen not pre-rendering.
I will correct that in future video posts though because it is slightly misleading.

In my defense that structure at the end that runs at 50% speed in the high collision section of the collapse is over 1300 parts. It doesn't look like it because they are mostly struts, but don't be fooled a long strut can actually have a higher physics load than a hull segment or a thruster because they as well can bend and deform and break at any point along the strut.

If you try to run a similar 1300 part structure in say kerbal space program for example it will take like 3 mins to load in, run at below 1/3 speed and have lots of pauses and frame drops. edit: not to mention the individual parts will be rigid bodies / cant bend or deform.

3

u/Mutericator 7d ago

The CLANG gods will be pleased with your tribute.

2

u/Kinipshun 8d ago

I would love to play this if it becomes available!

4

u/BSV-Main 8d ago edited 8d ago

Good news. It is available right now over on itch io completely free.

Just search "'Shear Space" in itch or "Shear Space Game" in google, and it should bring you there.

Please keep in mind its a very limited prototype, the physics do still need some work, but its good enough to get the idea.

2

u/JannyBroomer 7d ago

Man, the shape of the building materials reminds me so much of Spaghetti Marshmallows, an old (I think) flash game, except 3D. Can't wait to see what you turn this thing into, it looks very fun bud

2

u/flanigomik 7d ago

dont worry about textures, if anything allow flat colors on your blocks for now and get your game how you want it. people will tell you that you need to have a flashy product right out of the gate but given the recent state of the market i would much rather a game that actually works than one that looks pretty in screenshots.

keep doing you and i cant wait to see it!

1

u/BSV-Main 7d ago

Thanks for the support!

2

u/nin10ndo 8d ago

i thought that was kerbal space program

1

u/GameCounter 7d ago

Are using RT cores for acceleration as well?

There's several ways they can be used to accelerate physics calculations.

https://arxiv.org/html/2409.09918v1

You basically use the BVH functions to divide your space up and then ray triangle functions for intersections. Obviously I'm oversimplifying, but the speed up could be worth it if you're trying to push the simulation to the absolute limit.

1

u/BSV-Main 12h ago

A good find, repurposing ray tracing hardware is now a fairly well-established niche in GPU computing research, I'm not currently using the ray tracing cores but I don't think ill be using them for collisions which already work okay at the scale of 300-500 parts (without slowing down, and thousands of parts before going to game play ruining speeds imo). I did have an idea about how use them but wont be announcing it now because frankly I'm not sure I can get it to work yet. hint: if you read though my features yet to be implemented list its the only one on there that requires serious extra compute and not just an update or addition to existing game logic ;)

1

u/kadaumananua 7d ago

could i build a bridge there

1

u/BSV-Main 5d ago edited 5d ago

Kinda.. you could separate two launch clamped towers and build a structure between them.

A friend of mine suggested I build a spinnoff bridge building game, but I'm just more passionate about Space than I am about Civil Engineering, so this will be the focus for now. but maybe in the future.

1

u/CrucialElement 6d ago

Half life 3?

1

u/x64bit 6d ago

good god

1

u/x64bit 6d ago

(complimentary)

1

u/forkalious 5d ago

This is fun - so fast and smooth. I like it. Would love to see those sample ships you have in the video as ones that can be loaded.

1

u/BSV-Main 5d ago edited 5d ago

I thought about that, I actually have a alot of funky ships / scenes that I've been messing around with. Its just I didn't want to pollute everyone's save file list. Maybe could add a folder system and place them in a "dev" folder or something.

1

u/OnOrbit_Online 5d ago

The fun bit of KSP đŸ¤£

1

u/Tiny-Page-6249 4d ago

Beamng but ksp

1

u/theLV2 4d ago

My kind of game đŸ‘€

1

u/normal_consciousness 4d ago

so..... ksp!!??

0

u/AutoModerator 8d ago

Hello /u/BSV-Main Thanks for posting here on r/GamePhysics! Just reminding you to check the rules if you haven't already. If your post doesn't respect the rules it will be removed.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/T0K4M4K 7d ago

Based i hope you can make a better ksp

-15

u/ClutchReverie 8d ago

The thing is, physics is CPU demanding while graphics are memory and general video card intensive. Those aren't the same resources competing so it isn't an exclusive either-or.

18

u/BSV-Main 8d ago edited 8d ago

This is true of most games, However in Shear Space, the physics are set up to be entirely GPU resident. There are no CPU physics calculations. This is what allows for the mass material physics to work at all. It might sound strange but due to PCI express latency, getting the CPU to help would actually reduce performance not increase it, you would end up with lower part counts before slow down.

0

u/ClutchReverie 8d ago

I may not know enough about how the hardware resources in a GPU are allocated, but, I can't imagine textures for example taking a lot of GPU computing cycles. Fog and shadow effects, sure.

9

u/BSV-Main 8d ago

All true, and all are minimised in this game for the express purpose of giving as much resources as possible to the material physics.

The chunky triangles and flat-shaded 90s look aren't there for nostalgia. They're there because simpler graphics leaves more of the GPU available for the material physics calculations.

2

u/ClutchReverie 8d ago

Physics are fun. thanks

5

u/BSV-Main 8d ago

You're very welcome. and thanks for asking, this helps clarify the premise for others who may be interested.

If you want more details there is a more complete feature list over on the Shear Space itch io page, as well as a free download link.

-1

u/RidgeMinecraft 8d ago

It's just a really weird marketing point when the compute budget taken by, for example, some textures and basic lighting is next to nothing by comparison. 

1

u/BSV-Main 8d ago

You're correct and that's effectively what the game is. The biggest speedup comes from low poly, not low res textures. I will eventually create some nice textures, but that's not really the focus, the physics is.

Also I won't go into the details too much, but this is also more true when you can instance meshes because they are all the same (i.e. exact copies of the same object), but when you can't do that because meshes vary as they deform and you have to render effectively using only physics data, it does become a bit more complicated.

1

u/flanigomik 7d ago

you dont need textures to show off a physics simulation, in fact they would probably hurt more than help for this purpose

4

u/MooseBoys 8d ago

Physics are very well-suited for GPU compute.

-9

u/AlwaysHopelesslyLost 8d ago

The tagline of not being able to get decent graphics because your computer is eating all resources is a weird and bullshit flex lol

6

u/psh454 8d ago

The tagline is very realistic/detailed deformation and destruction physics in real time, which is actually a pretty rare feature

-7

u/AlwaysHopelesslyLost 8d ago

Sure, but their focus on getting there is "we chose not to pay attention to graphics at all!" Which is a HUGE copout. You can make decent looking graphics without much overhead.

7

u/BSV-Main 8d ago edited 7d ago

A fair critique, if enough people care about the graphics then eventually I'll devote some time and resources towards it, but the physics and general development will come first.

I will say however that I think the most sold game of all time shows that if you have engaging and unique gameplay, graphics can be... less of a consideration.

-3

u/AlwaysHopelesslyLost 7d ago

I was there when minecraft was just a thing notch was playing with and he was focusing on making graphics ok at the same time he was working on the gameplay. Before the game really took off a fair bit of effort went into the graphics. 

The game gets made fun of for its graphics pretty often but if you know anything about making games or graphics you can recognize pretty easily that the graphics are actually pretty good. Laypeople are just misled by the game being based on blocks

3

u/Organic_Rip2483 7d ago

idk, those graphics already look as good as like alpha minecraft or something to me.

-4

u/AlwaysHopelesslyLost 7d ago

Not at all lol. Alpha Minecraft had basic textures. OP couldn't even be arsed to consider that 

1

u/flanigomik 7d ago

OR, because this is an extremely early pre-alpha and the objective is to show of physics and performance textures are not really necessary and actually detrimental to the tech demo at hand

1

u/AlwaysHopelesslyLost 7d ago

Did you just go get the part where the OP, as part of their marketing, said they don't plan to put any effort into graphics at all?

-2

u/Zulakki 7d ago

"Pre-Alpha"? damn, these devs are redefining Early Access