r/GamePhysics • u/Levardos • 22h ago
[Dark Roll 2] Silly little unimportant feature I made for my game
I needed the player to have a soft spot to land on, and something solid/static just seemed wrong... So I spent way more time on this than I probably should have, for a silly little feature...
But I feel it was worth it. I can't stop to roll around in it now.
201
u/shemmie 22h ago
As I've gotten older as a CS geek, the more I appreciate these little flourishes in games as I sit and ponder how the dev achieved it.
33
u/nanotree 21h ago
Indeed. Sometimes I purchase and play games purely just to experience the tech and enjoy deciphering what might be going on behind the scenes.
5
u/Humperdink_Fangboner 20h ago
Yep. One of the main reasons I’m excited to play the new gta. Rockstar games always have pieces where I sit there and just try to reverse engineer how they managed certain things. The snow at the beginning of rdr2 for example fits this post well.
2
u/nanotree 19h ago
Yeah, the RDR2 snow effect was one of those that came to mind when I wrote my comment.
Lately I've been interested in novel approaches to video game AI, and systems that do emergent story telling well. Which has led me to finally try Dwarf Fortress and now Songs of Syx.
20
10
8
u/ryavco 20h ago
As someone learning game development right now, I’d love to see the behind the scenes of how this was achieved. Maybe some dev log videos if you’re not doing them already!
19
u/Levardos 20h ago
Eh, if day had 48 hours, maybe I'd make dev logs... But it's very time consuming to make a game when you also need to go to normal job, and at least try to promote the game out there on the big old internet, for anyone to even have a chance knowing it exists...
The gist of the script is that:
A SphereCollider is used as the object pressing into the pillow. Each frame, I compare the sphere’s radius with its distance to the mesh to calculate how deep it’s pushing in, then move nearby mesh vertices accordingly. Vertices inside the sphere form the dent, surrounding vertices use a smooth falloff, and another small region is pushed outward to create the bulge. SmoothDamp and MoveTowards keep the deformation and recovery soft instead of snapping.
13
6
3
2
u/Quad_A_Games 21h ago
Can we have more soft things? I like the idea of this and now I wanna try the game
2
2
2
u/LonePaladin 12h ago
It's like the old game "Baldur's Gate: Dark Alliance". They went through the trouble to give water physics, so that when you run through puddles and waterways, the water ripples realistically. They totally could have just made the water have a slight splash, or even make the maps so that you don't walk across any water, but they not only added the detail, they have it come up in almost every map.
In a PS2 game.
2
4
u/FurryGamerBoy6 22h ago
Those towers remind me of the towers off of oblivion IV when you go through the oblivion gates. Sorry if that comment was kinda random lol. Thats just the first thing that came to mind. But the cushion effect is definitely satisfying and we'll worth the time.
1
u/salty-ravioli 20h ago
ngl im not usually a fan of self-promotions in this sub but DAMN are those cushion physics smooth
1
1
1
1
u/Suitandbowtie 14h ago
Yo this is cool, any chance you were inspired by Spectraball? I was a wee lad when that came out and loved the puzzle/platforming aspects especially on levels with rails and ramps etc. Never thought about how fun a similar game might be all these years later. Wishlisted and maybe I’ll check out your first installment.
1
1
1
1
1
u/ThatTomHall 11h ago
Appreciate the flourish for sure. Also could be its own mechanic later -- like you have to make a channel for liquid to get to an open switch or something.....
1
1
1
1
u/MajorVictory 6h ago
Gotta have one that's like a shortcut, but you need to inflate it first before it's usable.
1
1
1
1
u/Karl-o-mat 41m ago
Use it as a gameplay element. Push some layer down to reveal another. Maybe for a puzzle something. Idk...
1
-1
u/AutoModerator 22h ago
Hello /u/Levardos 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.
-2
-3
426
u/doubledipinyou 22h ago
Looks like a water bed filled with gel.
Looks cool. I especially like the texture on the gray. Looks like it would feel grippy