r/godot • • 9d ago

help 3d vs 2d isometry performance question

Hi, I'm artist and rough animator, decided to try vibecoding my own game based on my story.
It should be action roguelike bullet hell top down isometry gameplay in Godot engine. Firstly I was sure to draw and paint everything as flat images. But Gemini told me that texture 3d primitives will provide me better performance in bullet hell genre. So I'm here asking experienced people if that's true ar false ?

0 Upvotes

19 comments sorted by

1

u/mister_serikos 9d ago

Sprite2d should be fine

1

u/Yappo_Kakl 9d ago

I'll take this on research,ty

4

u/TripsOverWords Godot Junior 9d ago edited 9d ago

It's not really clear what you're asking. 2d primitives will almost always be more performant than 3d due to fewer operations (less math involved if not using 3d transforms) and less geometry (quad vs arbitrarily complex mesh).

That said, unless you observe a performance issue then you don't have a performance issue, and for small games the difference should be realistically negligible. Experiment, and if you hit a bottleneck reevaluate.

Dev with over 10yoe. Similarly, I've used AI to explore technical areas that were new to me and almost every time it's been a shitshow. AI very often produces something that "looks" right or "sounds" reasonable, yet is fundamentally wrong or will cause major issues later on. Don't believe any LLM at face value, especially the free models. Even for simple questions like facts about a language or framework, it fucks up too often, it'll tell you something while linking to documentation that states the literally opposite.

I'm very curious what the AI said about 3d textures and bullet hell games though because I don't see how "texture 3d primitives" would improve performance for that kind of game.

1

u/Yappo_Kakl 9d ago

Hi, thanks for such detailed response! Basically it said that CPU/GPU would have to do more math with projectiles hitting and Y-sort, since locations will have a lot of fences and thay should appear both in front/behind characters ( and a lot of creeps-enemies). So LLM suggested just paint over transparent 3d primitives in isometric projection. Does in make sense, or it is a bullshit> ?haha

2

u/TripsOverWords Godot Junior 9d ago edited 9d ago

That's a valid technique. Alpha/transparency can be problematic for rendering performance, but that can be mitigated with pre-multiplied alpha (baking textures to blend without alpha at the cost of some color precision), but again unless you're observing performance issues then it's better to get something that works first to verify the idea then refine it.

Y-sort can certainly be a CPU bottleneck if you have many sprites that require Y-sorting, but sprites that don't (default layer 0) shouldn't have a discernable difference as they should be drawn in order without the extra work. I don't know the low level details of how Godot specifically implemented Y-sort, but generally you can think of "Y-sort" values as a layer and it only matters when the layers are different. Since Y-sort should be the outlier compared to Y=0, I would hope they optimized that case. It's also generally rare for sprites to change layers, so hopefully they're memoizing / caching the state rather than computing it every frame.

2

u/KingAggressive1498 9d ago edited 9d ago

one of my first projects, way back in the pentium 4 / OpenGL 1.3 era, was working on a clone of a Win9x game that used Z-sorted sprites and we didn't have any performance problems from it and also didnt remotely know what we were doing.

2

u/Silveruleaf 9d ago

3D has more components, and more check detections. 2D is always way simpler. Going 3D is more of a style choice. There's nothing wrong in going for either. But it's gonna be a lot easier in 2D. Also, don't blindly copy codes or do as ai says. Think for yourself before you ask, and add them yourself. You will get very lazy if you don't do it this way, and you won't understand your own code, so you won't have control over anything and at some point, it's too much for the ai to know wtf is wrong with the game. His just gonna loop around giving you even more convoluted codes. There's also no structure. So it won't have any performance at all cuz it's doing millions of random things, instead of using components it already had

1

u/Yappo_Kakl 9d ago

Hey, I won't have a time at all if I learn gdscrip and the Engine itself, since I only have couple hours per week, and I'm still working on the story as director, artist, illustrator... I've set up an agent and harness via Lm studio, and talking with it ,giving commands. So my plan is building at least some prototype, but then finding a human who works with the Engine

1

u/Silveruleaf 9d ago

Warever gets the job done I guess. If you are going that path, at least keep things very simple. Else they will break and there won't be a fix for it

1

u/Waybook Godot Regular 8d ago

I would say 3D is easier, because it scales better with different resolutions.

1

u/QbieShay 9d ago

If you search for bullet hell on this subreddit you'll see a bunch of posts that share how they made bullet hell with good performance. Depending on how high you want to go with the bullet count you will have to do some batching of draw calls and abandon y-sorting. I suspect you'll be bottlenecked by physics before you'll be bottlenecked by rendering 

1

u/Yappo_Kakl 9d ago

Hey, does it mean same as bottlenecked by Godot possibilities?

1

u/QbieShay 9d ago

I'm not sure I understood the question. 

If you mean "is it possible to make a bullet hell in Godot" then yes, you just have to search this subreddit to see proof. 

1

u/Yappo_Kakl 9d ago

My question was kinda if getting bottlenecked with physics is inevitable in Godot. But thanks, I'll dive more with some people's cases,thanks for advise

1

u/QbieShay 9d ago

I haven't made a bullet hell game myself so I don't feel like giving you specific advice (it would probably be imprecise at best and wrong at worst)

As for getting bottlenecked, I think bullet hell games do push the limits of engines in general, not just Godot. Having thousands of simple objects in screen is not the most common usecase for a general purpose game engine. 

The best you can do is read a bit about the subject, then do some experimenting on your side with 2d vs 3d. 

I have been using Godot for nearly 10 years now and the way I'd approach making a bullet hell game is to go with 2d and see.  For collisions I may try and use a texture-based approach if I get bottlenecked by built-in physics (I remember someone doing it in Godot 3). But that is, IF it happens.

1

u/stolenyourgf 9d ago

for bullet hell the art style barely matters for perf, what kills it is thousands of bullet nodes. flat 2d sprites are totally fine, just pool the bullets or draw them with a multimesh / the server api instead of one node each. id stick with drawing since thats your strength

1

u/cubewakeCompass 9d ago

the thing that decides it for me though is that you're an animator. with flat 2d what you paint is what's on screen. with 3d primitives every asset becomes a texture on a box and you'll spend weeks on uv and lighting instead of animating.

how many bullets are you planning to have on screen at once?

1

u/Waybook Godot Regular 8d ago

A top down game should have good performance anyway unless you do something very wrong. I would not pick based on performance.

I would recommend going 3D, because it scales better to different resolutions and aspect ratios.