Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce filesize of map geometry in .tscn files #109

Open
yankscally opened this issue Nov 24, 2023 · 0 comments
Open

Reduce filesize of map geometry in .tscn files #109

yankscally opened this issue Nov 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@yankscally
Copy link

Copypasta from discord because I'm git noob

//

I’ve been looking through the new qodot gdscript quite carefully and I have some ideas to optimise.

First of all, a group of nodes is using the same vertex array: mesh, collision, occluder shape

Right now Qodot efficiently reuses the array to create each of these, but Godot still stores everything inefficiently. It stores the same array every time, not even bothering to check if it’s the exact same. All it cares about are resource refrences. If it already has one, it’s just an extra 2 lines of text in the .tscn, if not it will manually store the array in the scene. So saving .map stuff in a .tscn is not efficient because a map will have hundreds and thousands of packed vector3 arrays for all of the brushes. So my thinking is there has to be a way to compact geometry that is the exact same into a single array, and only use it as the reference for each thing. Not really sure where to start with that but it could optimise everything by a bunch on the godot side.

Secondly, I’ve been using linked groups recently and I feel like it’s really too useful not to use, but it’s not essential to every map.

can’t see an easy way to copy the same resources to make a linked group work in Qodot.

Essentially it could work with an array that checks for each unique linked group, and then use node.duplicate() if there’s a match. It’s an easier solution than the other thing, because we already know that this geometry is EXACTLY the same including the textures etc

@DeerTears DeerTears added the enhancement New feature or request label Nov 24, 2023
@DeerTears DeerTears changed the title .tscn file contains too much vertex heavy data that could be changed to duplicated nodes/resources as references Reduce filesize of map geometry in .tscn files Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants