About Store Forum Documentation Contact



Post Reply 
gui create
Author Message
1991mirec Offline
Member

Post: #1
gui create
hi

is it better to create gui for inventory and all the guis that you are turning on and off in the game at the start of the game and hide them and show them when you want with some button or create them every time you want to see them?? and delete them every time you want to hide them.. i am asking mostly if it would do any change in fps... cause if it is just hidden doesn it has to remeber that in memory and it s keep updating if there is a update even if it is hidden..
11-24-2013 10:12 PM
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #2
RE: gui create
I chose to create them and then show/hide. Seems to me like it would depend on the GUI and how often it might be shown. Something that is toggled on and off frequently, such as inventory, character sheet, etc. would be better to just create and toggle to be seen.
11-24-2013 11:11 PM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #3
RE: gui create
You don't need to keep inventory created at the start of the game, it's a waste of memory. I think the best option it's to create inventory at the beginning of game play state, and delete it at the end of this state. During gameplay you can toogle on/off.
11-25-2013 01:20 AM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #4
RE: gui create
The biggest performance hit is usually in the draw. Additionally, I do not run the gui update when I'm not drawing it. So it uses a bit more memory, no performance hits at all when not displayed.
11-25-2013 06:19 AM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #5
RE: gui create
I would create the GUI objects once and then hide/show them when needed.
If they are so big that memory becomes an issue, recreating them every time would be the bigger issue in my opinion.
11-29-2013 03:53 PM
Find all posts by this user Quote this message in a reply
Post Reply