Hello, I’m making a VN game and I will have a menu, in it will have sub menus like Player Profile, Inventory, Quests, Map, Romanceable Character Profiles, etc. For the sub menu like Romanceable Character Profiles there will be menus for each character. So to show these menus and sub menus should I just set their visible property to true and false or instantiate and queue_free them?
I’m worried if I put the sub menus in the same scene and just set their visibility will make the game lag due to the amount of sub menus that will be hidden, because there will be a lot. So I don’t know if I should instantiate them to show it and queue_free them when the player exits that menu.
There will be a lot? Like thousands of submenus? No idea what kind of an amount of UI items Godot can handle, but I’d venture a guess it’s not practical to make enough menus for it to be a problem.
I would personally just hide menus and use Node’s process_mode. Well, unless they’re taking up huge amounts of memory. But I mean, ultimately it’s something you have to decide for your game and your target hardware. It’s a tradeoff between memory usage and processor usage basically.
If the submenus are large enough, then there will be a noticeable loading time when you have to instantiate everything. If they’re not slowing down the game when you just hide them, then I think it’s fine to just hide them.
If you do use visibility, bear in mind that anything with a script attached will still execute _process() &c. Turning off visibility for a node doesn’t stop it from getting updated. There’s an is_visible_in_tree() you can use to check in script.
Its my first time making a game and I’m new to godot. I still don’t know the maximum capabilities of godot so I was worried that hiding lots of Nodes would make the game lag. But thanks to everyones explanations, I feel less worried so thank you all!