r/godot • • 4d ago

projects Simulating leaf physics, without breaking the performance

Godot 3.6 with c++ module and modified gles3 shader. The game is called Tenkemo.

4.2k Upvotes

133 comments sorted by

86

u/grrrfreak 4d ago edited 3d ago

Please reply to me. Someone, anyone. ( so I don't forget the game )

Edit ! Thank you for the reminder everyone !

Edit2 : Thank you to you all wonderful bunch, I've been able to add it to my steam account once I got to my personal computer.

50

u/minmidmax 4d ago

You can save posts.

25

u/Xtraordinaire 4d ago

Bookmarks also exist.

10

u/lordcola Godot Regular 4d ago

If you're using the app only for reddit in the UK and you don't want to deal with the nsfw ID laws you may just not be able to access a bunch of the profile features. I think I commented on something or bookmarked something marked nsfw in a random sub at one point and can no longer even view my profile without handing over my ID (which I refuse to do).

11

u/Emerald_Pick 4d ago

I lost the game

3

u/ShapesAndStuff 3d ago

it's been years but now i lost twice in two days. wtf?

2

u/Xtraordinaire 3d ago

It's a viral process. The more people lose the game, the more people start mentioning it, leading to more losses.

2

u/ShapesAndStuff 3d ago

yeah for sure. the first one yesterday wasn't a direct reference but it still reminded me of the game - hence i lost.

to then see a direct reference is pretty fun!

2

u/minecraftchest30 Godot Student 3d ago

This might help. Xkcd.com/391

1

u/Leoxcr 3d ago

f!ck man

2

u/markbernman Godot Student 4d ago

3hrs reminder

2

u/thefellowone 3d ago

Reminder, this game looks cool!

2

u/Chickfas 3d ago

Hello

16

u/MonthFragrant7804 4d ago

Is there reason using Godot 3.x instead of 4.x version?

56

u/ccrroocc 4d ago

that's a veery long story. godot 3.x with gles 2 was working the best on mobile phones, and we kept using 3.x for that reason. gles 3 was 2x slower. and the godot 4 was extremelly slower... however I've just managed to modify the engine shaders and get the gles 3 on godot 3.x run like 10% faster than gles 2 that was already quick. My next plan is bringing that shader into godot 4. will probably make a post here if I managed to sucessfully do that

7

u/KSaboruf 3d ago

> will probably make a post here if I managed to successfully do that

would be very interesting to read!

11

u/Classic-Law1219 Godot Regular 4d ago

Love this detail!

14

u/SatiraTheCentipede 4d ago

Been watching the development behind this project for a bit, do you folks have a social media page or discord I can lurk in? Really interesting tech too, love the graphics a lot.

9

u/Bota_Bota 4d ago

How do the leaves affect performance?

14

u/ccrroocc 4d ago

they don't, unless I add too many... (you can check the last part of the video to see the amount mobile phones can handle at max fps)

7

u/minmidmax 4d ago

If you're not already then you could increase the count by having child leaves that follow their parent.

Say you have 4 leaves plus the parent node, for each leaf instance, then for 500 leaves you're only actually handling 100.

8

u/SweetBabyAlaska 4d ago

the C++ module is for the leaves? Is it just a custom 3D Particle Effect? I'm curious. Cannot wait to play this game

12

u/ccrroocc 4d ago

yes, its a c++ module for the leaves (gotta calculate the physics). with gdscript it was around 25x slower =(

4

u/SweetBabyAlaska 4d ago

Interesting. I think I saw a similar effect in the Ocarina of Time Remake, when you slash a bush with your sword the leaves fly up, but the thing that I noticed that really caught my eye was that they still interacted with physics.

When you would roll or slash you sword around them they would fly around for quite a while after they were cut. Its stuff like that that really make the game feel alive and give it that special sauce. But I wonder how they did it.

It seems like it would be good to batch all that on the GPU and then have "fake" interactions via a shader of some kind and then relay the player input to the shader directly but idk.

2

u/Awfyboy Godot Regular 4d ago

Have you tried MultiMeshRenderer?

9

u/Throwaway-tan 4d ago

The performance issue is physics not rendering, this wouldn't solve anything.

2

u/DommiHD 3d ago

After seeing that it has factory building i had to buy it on kickstarter :3 cant wait to play

2

u/ccrroocc 3d ago

hey! thank you for the support!

1

u/Zehryo 3d ago

I'd change the physics of leaves to that of fluids, where an object passing through generates swirls and turbulences that go to fill the void left behind the moving object (imagine a finger passing through water).

As it is now, it looks more like she's a walking leaf blower.

122

u/Ahfrodisiac 4d ago

Really like the art direction for this.

404

u/Sycopatch 4d ago • Heartwarming

Hide this game from my gf lol
Cause you know for a fact, the second she sees this - WE are playing it

22

u/BrickWiggles 4d ago

Fr, the animations is quite cute!

102

u/DTCreeperMCL6 4d ago

Sounds like you should show her unless you dont want to have fun playing video games with her.

58

u/IdgafAboutUrOpini0n 4d ago

I took it as in they'll never see 'the light of day' of the game rather than what you said. Could be wrong.

4

u/BigBewbsBigAss 1d ago

I agree. My imaginary GF is also into this stuff.

1

u/DearCriticism5747 3d ago

Is there a playable link?

1

u/Miserable-Bite9661 2d ago

Your profile picture checks out

58

u/Visible-Switch-1597 4d ago

Holy graphics!!! one of the best looking Godot games I have EVER seen

1

u/atirutw 1d ago

And 3.6, at that!

53

u/El_human 4d ago

Why do the pine trees drop deciduous leaves?

19

u/ShapesAndStuff 3d ago

unplayable

31

u/ChickyGamesDev 4d ago

Falling pine needles don't look as good

20

u/El_human 4d ago

So why not make the trees deciduous, and give them the autumnal feel?
If they're going for falling leaves, oaks and maples might provide a better aesthetic than pine trees

0

u/TacoCatDX 3d ago

How else would they have only pine needles on them if they were to not drop the deciduous leaves?

17

u/sergen213 4d ago

Wait I remember your game, this was just a prototype, look at this now 🥰🥰🥰

8

u/Giocri 4d ago

Cute fox!

6

u/Zunderunder Godot Senior 4d ago

I am so freaking excited for this game

6

u/roux-de-secours 4d ago

Really nice.

Though conifers don't shed leaves. (they still drop needles sometimes)

5

u/Frequent-Ad-3931 3d ago

look interesting, do you have a link like a itch.Io or a steam page so we can follow the progress ?

4

u/ThaiboxTony 4d ago

I like the style of your perspective and surfaces.

4

u/RetroClassic 4d ago

Love seeing the updates on this project. The direction and vibe are great. Keep it up

1

u/xylem-utopia 4d ago

do you have a steam page or anything for this game?? it looks so cozy

3

u/ccrroocc 4d ago

Yes it's called Tenkemo

1

u/ClueFree8 10h ago

i've seen this around! i cant believe i randomly stumbled upon the creator of Tenkemo on reddit! if i am not wrong, it has a port on nintendo switch, right?

3

u/ander_hominem Godot Junior 4d ago

How do you make terrain? Specifically I'm curious about those rounded corners

3

u/Shintarillo 4d ago

search for "dual grid" tiling, or "double grid" or "oskar stalberg".

the tiles are actually in a second grid with 0.5 offset of the main grid

3

u/ace_lambda 3d ago

Impressive. More so the fact that you have an S7 edge without a line across the screen lol

2

u/gabbygall 4d ago

Love the little fox companion!

2

u/Weary_Cartoonist5739 3d ago

Your game looks gorgerous, woah!
I can't imagine the work to optimize all the stuff on it, especially on cellphone

2

u/Felixfops 3d ago

FOX FOX FOX FOX FOX FOX FOX FOX

1

u/Baragwin2 4d ago

Looks fantastic. The music is lovely too

1

u/The_Silicon_Foxx 4d ago

Hey I use godot 3 too lol! Awesome looking game man!

1

u/ragegames225 4d ago

The graphics are very beautiful

1

u/DoctorWZ 4d ago

Direct follow, this looks so lovely!

1

u/GalaxyKnighter 4d ago

That looks amazing. Very cute

1

u/dizzymad722 4d ago edited 4d ago

por onde eu começo pra aprender a fazer jogos assim?

1

u/aizyncozy 4d ago

I’m such a big fan of this artstyle :’))))

1

u/Aramis909 4d ago

Me: "Oh look, another Ocarine of Time vide- WAIT A MINUTE"

Jokes aside, nice stylization. I like it.

1

u/Hanodev_ 4d ago

I need her...

WAIT WHAT GODOT 3??

1

u/KisakiLab 4d ago

Looks...refreshing

1

u/Rich-Cauliflower117 4d ago

Seriously GORGEOUS art direction. With good marketing this would be a big hit.

1

u/Mesclandre337 4d ago

The visual quality of this game is unbelievable, simply fabulous.

Do you already have a Steam page or something like that?

1

u/ValenHexen 4d ago

I'll be playing this! Her walk cycle is so satisfying

1

u/HolyInquisitionRogue 4d ago

Besides the leafs - this looks amazing.

1

u/HimikoCaffeineAddict 4d ago

What is this game? the fox is so cute

1

u/FlameBlitzz 2d ago

1

u/HimikoCaffeineAddict 1d ago

Thanks! The game looks incredible, keep up the good work

1

u/FlameBlitzz 1d ago

I just gave you the link to it. The creator is this user u/ccrroocc

1

u/HimikoCaffeineAddict 1d ago

What? Oh... Yeah, I mean thanks for the link, and the creator are doing good, sorry for the misunderstanding lol

1

u/godblessgeoff 4d ago

This is beautiful.

1

u/SeraphicWing98 4d ago

Looks sick dude

1

u/Awkward-Vacation-143 4d ago

WTF it's looks so policed how can it be so good 😭

1

u/Mugirito 4d ago

Owww, that's a really gorgeous art direction!! And it's still in godot 3, incredible
!

1

u/luarluta 4d ago

It looks beatyfull!!! Saving for playing it as soon as I get a job :D

1

u/ChaosElixirStudios 4d ago

Yeah man you are on to something, this looks intriguing at first glance. Keep it up!

1

u/winewitheau 3d ago

That looks amazing! Beautiful graphics

1

u/9tobirama 3d ago

I really like the look.

1

u/zornyyyy 3d ago

Nice pokemon look

1

u/Yolwoocle_ 3d ago

I would looooooove a write-up on how this works. Please please please!!

1

u/civilized-engineer 3d ago

While I've been watching your posts pop up every now and then for a while on this subreddit. I have to ask, why are you spending so much on ads already if there's no release date on the horizon?

I've seen ads for this on Reddit and Instagram enough but this game does not seem to be anywhere near ready to be burning a hole in your pockets with advertisements.

1

u/terra2o Godot Regular 3d ago

omg... so good...

1

u/True_But 3d ago

This looks really cool. What does modified gles3 shader mean and what's the benefits?

1

u/MushroomAdvanced4253 3d ago

This looks great. Are you using GPUParticles or MultiMesh for the leaves? And roughly how many can you have on screen before performance starts to drop?

I'm a beginner working on a small 2D farming game and I'd love to add something similar so the crops sway in the wind.

1

u/leigh-Tschammer 3d ago

Do you pre-save the clusters of the flowers somehow once player looks away, or walks away? The only thing that would come to mind in addition, though the atmosphere looks very charming

1

u/Silveruleaf 3d ago

I love the ground. And all the visuals. Very nice

1

u/CondiMesmer Godot Regular 3d ago

Really love the art

1

u/TrickyOstrich 3d ago

Have you ever considered an upgrade to Godot 4+? Would there be any benefits for this project?

1

u/marxinne 3d ago

Such a cute game. Amazing work by both coders and artists!

1

u/madmatt112 3d ago

Homie saw OoT remake leaves and said hold my beer

1

u/slipperysilkworm 3d ago

This is stunning

1

u/ipodko 3d ago

Yooooo this looks amazing! I've been trying to work on my own side project that looks like is similar to yours. Are you accepting DM's? I have some questions about your shaders.

1

u/anonamistartist 2d ago

How do you select the colors you use these are SO PRETTY do you have a palate? I would love to get my hands on your knowledge

1

u/TlosingCag 2d ago

Beautiful. Inspiring.

1

u/Used_Vehicle4659 2d ago

Going deep into the shader rabbit hole might be the best optimization technique I ever learn.

1

u/yonoirishi 2d ago

I know its not the point of the post but its a little jarring seeing the fox start and stop constantly because its walk speed is much faster than the MC

1

u/Amin-Djellab 2d ago

Graphics are so good, the movement of the character is smooth, all you need to add is the Occluder Fade, so when the trees or any object get between the character and the camera get transparent and you are good to go.

1

u/LegalSale5441 2d ago

I am going to be honest, this game looks like what i actually what to play other then minecrfat!

1

u/Over_Internet4 2d ago

Kinda looks like a 3d pokemon level. Nice, I aspire to be this good. 👍🏾

1

u/oskolkov_audio 2d ago

Looks awesome. I'd like to play!

1

u/ConstantinGB 2d ago

God this game looks adorable.

1

u/Ok-Lake1028 2d ago

Very cool ! I love the art style

1

u/hambrita 2d ago

Wow, the characteres are so lovely, I'm looking forword it.

1

u/Aeonitis 1d ago

Wow 😳

Is it a vertical wall with leaf shader and a separate floor for leaves with it's own leaves shader?

Are you able to share even the explanation? Not expecting you to share code

I'm just impressed by the optimization you did

1

u/atirutw 1d ago

Does it have a Steam page or somewhere I can get notified when it comes out?

1

u/miguelinop 1d ago

So cool. All of this with just shaders? I'm pretty noob on the 3D side of Godot so I wanted to know more 🤠

1

u/dwdogman Godot Regular 1d ago

I love seeing people, like yourself, take the time to craft a cozy and immersive environment! Looks great!

1

u/EadweardAcevedo 1d ago

Very pretty art style, character design and everything, its awesome that it is running on a cellphone, very pretty work.

1

u/Interesting_Figure81 1d ago

performatively cozy

1

u/idkaboutpixel 1d ago

the graphics's very good

1

u/ArgentRealms 18h ago

I need giant piles of leaves to dive though now.

0

u/Puzzled-Secret-317 3d ago

What the hell is this and why aren't I playing it?