Comments (1)
After a few hours of debugging, I have finally found the culprit lurking in ObjectDialog.gd
:
# Set the asset database contents, based on the asset database given.
# assets: The database from the AssetDB.
func set_piece_db(assets: Dictionary) -> void:
_piece_db = assets
_update_object_packs()
# The object previews take some time to instance (this is mostly due to the
# rendering engine creating the buffers needed to render the object), so
# we'll instance all of the previews now while the user is loading in, so
# we can just add them to the scene tree when needed.
var max_needed = 0
for pack in assets:
var pack_num = 0
for type in assets[pack]:
pack_num += assets[pack][type].size()
if pack_num > max_needed:
max_needed = pack_num
while _available_previews.size() < max_needed:
_available_previews.push_back(_object_preview.instance())
When the asset database gets fed into this function, the function wants to try and make as many object previews as there are objects in a pack (so it can display them in the objects dialog) - the problem is that this code doesn't distinguish between objects and other kinds of assets, like skyboxes.
However, I don't think adding the workaround of making this function only count objects would work in the long run, because it ignores the actual underlying issue I found: as soon as about 130 object previews are instanced, the physics engine stops working (I'm assuming its something to do with the fact that object previews contain viewports, which take up a lot of memory). But at the same time, I want players to be able to import more than 130 objects in an asset pack, so clearly, the current way that objects are displayed in the objects dialog has to change.
Side note: This behaviour could very well be a bug in Godot that could be fixed, but I still think changing the objects dialog is the right decision because I've noticed that when you import a large number of assets, the time it takes to create the object previews is noticeably long (which is why it can take a while for the room scene to load).
This actually coincides with another issue, #41, because I was planning to revisit the object dialog anyway via that issue. So during that issue, I will change how the objects are previewed such that there can never be more than a set amount of previews, no matter how many assets have been imported from a given pack. Doing it that way should fix this issue as well.
from tabletop-club.
Related Issues (20)
- Assign shortcuts for scaling objects. HOT 1
- Allow easy object zoom for closer look. HOT 1
- Option to scale UI HOT 1
- Import Log doesn't display non-ASCII characters HOT 7
- Omit latter parts of too-long values in config.cfg HOT 1
- Installer for windows HOT 1
- Replace the default SpatialShader with one that allows additive albedo blending. HOT 1
- When hovering over an object, asset pack name doesn't show up if description is not empty
- Weird behaviour of objects after scaling HOT 1
- Raise the music volume range HOT 2
- Use “cuboids”, “cylinders”, “figures” instead of “cards”, “tokens”, “pieces” HOT 3
- Add a way to stop pre-made games from overwriting the current skybox. HOT 2
- Elimination on mouse-click when two same objects are clicked on continuously HOT 1
- Slide an object with mouse HOT 4
- Select from multiple available texture sets HOT 12
- Automatically extract asset packs inside ZIP files.
- Crash/freeze when navigating the Objects menu HOT 1
- Packs not registering on Win 10 / 64 bit HOT 1
- Fallback to GLES2 if game fails to boot with GLES3 backend.
- Use thicker highlight border HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabletop-club.