Live data from Hacker News

Godot Engine – A decade in retrospective and future

godotengine.org

151–160 of 168 posts

Re: Godot Engine – A decade in retrospective and future

#151
post #124
post #53

Earlier quoted context omitted.

A real draw for me is working with C++ in it, since both Unity and Unreal appear to favour managed languages (C#, some JS variant, some weird Python style thing, etc.) No real reason for preferring C++ except I want to learn it, and my pet project is a little game rather than yet another web app/thing that renders DB records to HTML/thing that takes one JSON blob and turns it to another. I never did computer science…

> yet another web app/thing that renders DB records to HTML/thing that takes one JSON blob and turns it to another Ouch, this is currently my "pet" project. I totally get what you mean though. I'm honestly not sure if it can even considered a pet project anymore, as it works way better than I expected.

It's probably my main source of disappointment as a programmer specialising in web applications. There are a lot of other things I know how to do or like to play with, but the main money is in the boring stuff.

Of course, it's not boring to the newcomers and our new juniors. But the step up for me isn't a more interesting problem to tackle, it's leadership. (Although at my current job I do get a few interesting challenges on top of that.)

Re: Godot Engine – A decade in retrospective and future

#152
post #137
post #135

Earlier quoted context omitted.

How do compilers compile themselves before the first iteration? This always confused me

You compile the next version of the compiler using the previous version. That does mean that the first version of the compiler cannot be written in the target language. Once you've got that working you can write a new compiler in the target language and compile it with the previous compiler. Back in ye olden days the first assembler was written in machine code. The first C compiler was written in assembly, and the fi…

The first C compiler was written in BCPL IIRC, the D compiler was written in C++ up until about 2016-ish

Re: Godot Engine – A decade in retrospective and future

#153
post #148
post #147

Earlier quoted context omitted.

It doesn't matter what they use. We are talking about engines themselves here, like Godot. And they shouldn't be wasting time and resources working around lock-in stupidity. Offering Vulkan for developers is the right thing to do for every platform. I.e. targeting Switch for them aligns well with their current Vulkan work. Targeting PS or Xbox - not really, they'll need to rely on translation (like gfx-rs), if one ev…

Except that isn't what gets spoken about on GDC corridors, rather IP business opportunities.

Engine developers have clear needs that don't depend on what someone discusses in the "GDC corridors".

Re: Godot Engine – A decade in retrospective and future

#154
post #153
post #148

Earlier quoted context omitted.

Except that isn't what gets spoken about on GDC corridors, rather IP business opportunities.

Engine developers have clear needs that don't depend on what someone discusses in the "GDC corridors".

Engine developers do whatever is required to turn the game designers ideas, and publishers, into a commercial IP success.

Re: Godot Engine – A decade in retrospective and future

#155

As a side project to get me back into lower-level programming, I've had the pleasure of working on a personal fork of Godot. The engine's simply fantastic from a programmer's perspective. The code is readable, the architecture is quite intuitive, and with the exception of a few engine components, you don't run into much in the way of incomprehensible spaghetti code. Adding features is more or less trivial, as has bee…

> But among the projects I've seen where performance has been an issue, it's largely been the product of a developer's failure to understand how the engine is processing their content, and by extension their failure to architect their game around that. What are some pitfalls everyone is falling into and what needs to be understood conceptually about how the engine processes scenes? I’ve found a lot of good documentat…

I'll give you a list of pitfalls I've ran into on my current project.

But I'll also caution you not to worry too much about performance until it becomes an issue for you. You want to make something, first and foremost. And a lot of developers just getting into games tend to severely underestimate the amount of work their processors can do before it becomes an issue.

The most easy two to fall into are improper draw call management (requests made to the GPU to draw an item), and not accounting for the engine's lack of native occlusion culling (it ends up drawing items obstructed from view by nearer or larger objects).

The first is an easy fix. The engine draws objects using two object-types: MeshInstance, and MultimeshInstance. For each MeshInstance you have, you're going to have a single draw call to the GPU, and the overhead of that really adds up in more complicated scenes. It's generally a good idea to batch multiple objects with the same display geometry into a MultimeshInstance, which will send a single call to the GPU with a list of transforms to assign to that specific object. This minimizes the communication overhead between the CPU and the GPU.

The problem with this is that the MultimeshInstance has (to my knowledge) no in-editor tool for managing its transforms. It has to be done through a script.

For the time being, I've written a script that enumerates all MeshInstances in my scene that share a material and display geometry, and assigns them to a set of evenly spaced MultimeshInstances based on their position in space (this prevents the GPU from attempting to render too many instance elements that are off-screen).

Occlusion culling is trickier, and outside of manually setting your own visibility lists for objects, and deactivating them via script at runtime when they're out of sight, there's not too much to be done other than to keep overdraw in the back of your mind right now.

Less specific to Godot, there are a number of optimizations you can make that work well in any engine.

- LOD (level of detail) geometry:

Godot doesn't natively support object LODs (different resolution versions of objects displayed at difference distances). This can be rectified fairly trivially by toggling different MeshInstances at different distances from your parent object, and can go a long way to reducing the amount of rendering overhead in your scene.

- Shadow casters are expensive:

If you're got a light that casts a realtime shadow in your scene, you might as well be rendering the scene twice (especially in Godot, since there's no occlusion culling). Even if you don't have a LOD system in place, I recommend using a lower-resolution version of your scene to cast shadows, and even disabling shadow-casting on smaller objects. This can be done by adjusting the visibility mask in your shadow caster.

- Minimize Texture Sampling:

If you're writing your own shaders, keep texture lookups to a minimum, especially on large objects.

- Adjust the physics tick:

The physics simulations in most modern game engines run at a fixed rate, usually somewhere between 30 & 60hz. This is (mostly) decoupled from the game's frame rate. Godot lets you set the update frequency from its project settings, and I recommend you play with that number until you find the minimum value that works for your title.

- Stagger object updates:

If you can get away with running an update less frequently than other elements in your game, do that. A good example is running the decision loop for your AI every nth game tick, or every nth second. Batch your AI into n groups, so you end up doing 1/n amount of the processing you otherwise might have been doing per-frame.

- Try to offload purely visual things to the GPU if at all possible:

I've seen a few people writing scripts to add real simple motions to visual elements that weren't directly related to the game's simulation. A good example would be a quest marker bobbing up/down above a character's head. This is something that could easily be done on the GPU using the vertex function of a shader, and represents an absolute waste of CPU time.

- If you can get away with it, lower the visual fidelity in your project settings:

Pretty self-explanatory. Especially when editing your project, you'll experience a much lower (nearly half) the frame rate you'll see at deployment at runtime. It's to be expected, you're running debug code, and an editor. Disable some of the extra visual features if they're only icing on the cake of your game's aesthetics so you can get a better idea of your title's actual performance.

Re: Godot Engine – A decade in retrospective and future

#156
post #154
post #153

Earlier quoted context omitted.

Engine developers have clear needs that don't depend on what someone discusses in the "GDC corridors".

Engine developers do whatever is required to turn the game designers ideas, and publishers, into a commercial IP success.

The point was explained above, and you get it. Godot case demonstrates it more than clearly that having a common API is good for developers. You simply avoid admitting that lock-in is bad - all this talk about "IP" has no relevance to the issue.

Re: Godot Engine – A decade in retrospective and future

#157
post #156
post #154

Earlier quoted context omitted.

Engine developers do whatever is required to turn the game designers ideas, and publishers, into a commercial IP success.

The point was explained above, and you get it. Godot case demonstrates it more than clearly that having a common API is good for developers. You simply avoid admitting that lock-in is bad - all this talk about "IP" has no relevance to the issue.

So let me put this in another way, neither OpenGL or Vulkan are a common API, beyond the basic step of putting a triangle on the screen.

Any production grade, cross-platform engine, has so many extensions and workarounds for drivers and cards, that each code path ends up looking like a different API is being used.

They are common only on paper, write once, patch everywhere.

In fact, if you want to use OpenGL in a way to avoid such mess, OpenGL 3.3 is probably still the best target to hope for, with all the constraints that it entails as legacy version.

Just like on mobile devices, as Godot was forced to redo their engine, anything beyond OpenGL ES 2.0 is more headache than it is worth.

Google has made Vulkan a required 3D API on Android, because most drivers outside flagship devices are unusable and they hope that via this option to force OEMs to actually provide something that developers can actually make use of.

So much for "portable" APIs.

Re: Godot Engine – A decade in retrospective and future

#158
post #157
post #156

Earlier quoted context omitted.

The point was explained above, and you get it. Godot case demonstrates it more than clearly that having a common API is good for developers. You simply avoid admitting that lock-in is bad - all this talk about "IP" has no relevance to the issue.

So let me put this in another way, neither OpenGL or Vulkan are a common API, beyond the basic step of putting a triangle on the screen. Any production grade, cross-platform engine, has so many extensions and workarounds for drivers and cards, that each code path ends up looking like a different API is being used. They are common only on paper, write once, patch everywhere. In fact, if you want to use OpenGL in a way…

> So let me put this in another way, neither OpenGL or Vulkan are a common API

OpenGL is legacy case, so no point in bringing it. Vulkan is the only common API, there is simply nothing else for that role. With all your talk about how "great" proprietary APIs are, none of them ever can be common, because they all are the total antithesis of it - their goal is lock-in in, not something that helps developers reduce their work duplication by providing the standard.

So so much for "great IP". They are DOA basically in this sense, and exist only because walled garden owners force developers to use them by not providing them a choice.

Your personal advocacy for lock-in is also more than questionable.

Re: Godot Engine – A decade in retrospective and future

#159
post #158
post #157

Earlier quoted context omitted.

So let me put this in another way, neither OpenGL or Vulkan are a common API, beyond the basic step of putting a triangle on the screen. Any production grade, cross-platform engine, has so many extensions and workarounds for drivers and cards, that each code path ends up looking like a different API is being used. They are common only on paper, write once, patch everywhere. In fact, if you want to use OpenGL in a way…

> So let me put this in another way, neither OpenGL or Vulkan are a common API OpenGL is legacy case, so no point in bringing it. Vulkan is the only common API, there is simply nothing else for that role. With all your talk about how "great" proprietary APIs are, none of them ever can be common, because they all are the total antithesis of it - their goal is lock-in in, not something that helps developers reduce thei…

According to Khronos, OpenGL is still the API to go when one doesn't want to deal with Vulkan boilerplate.

Middleware is the common API.

Taking advantage of raw performance from hardware, exposed with SDK tooling that Khronos has never offered.

Basic stuff like math, loading textures, material description formats,...

Instead every newbie has to go through the challenge of creating their own little engine.

My advocacy is based on real experience, having been IGDA member, attending a couple GDCE and Design School meetups, having had the opportunity to visit a couple of well known AAA studios.

So I have enough hours talking with such devs to know what they care about.

Being religious about 3D APIs is usually not on their agendas, rather getting customers, turning game ideas into IP that they can explore across various commercial channels, consulting opportunities porting game engines, how to take advantage of "whales" and such stuff.

Re: Godot Engine – A decade in retrospective and future

#160
post #126

I am coming back to Unity for a side-gig VR thing after not touching it for a couple years. Unfortunately the timing is not great since they are still sorting out all the new offerings (XR Plugin vs. Player settings, Input systems, ECS from prefabs, etc.) Is anyone doing VR with Godot? I have a couple questions: 1. What's the development cycle look like? In Unity I can hit play and put on the headset (Oculus Quest w/…

See https://www.youtube.com/watch?v=07euJhZbeSc&list=PLe63S5Eft1...
Post reply on HN