JeffVenancius / Godot-Body-Builder

Scans a Godot project, lists the nodes used and (that's for later) helps you to create a shorter build.
MIT License
1 stars 0 forks source link

some suggestions! Please keep working on it! #1

Open lucasthomaz97 opened 2 years ago

lucasthomaz97 commented 2 years ago

first of all, nice initiative on creating this, something that always bothers me in godot is the enormous final build size, a pixel art simple game that would be a 2mb exe file, on godot is 15mb! here goes some suggestions: place a label when the user clicks in the button "Go" with the message you are writing on the terminal, i took too long to notice that the system are saying me something!

add some documentation please! if you teach me how to use it, i can help you with this, what folder exactly you need to open, what to do with the output file, etc...

Please, keep the good work on it!

JeffVenancius commented 2 years ago

Hi! So, I was kinda in a hurry when I'd uploaded, you're right, There's a lot of things to be done, actually.

For building, generally you should go to scene/register_scene_types.cpp and comment the nodes you won't use it. it goes like this:

Look for the node on the #include list and comment:

//#include "scene/gui/color_picker.h" (Don't need ColorPicker)

Then look for it on the GDREGISTER_CLASS and do the same :

//GDREGISTER_CLASS(ColorPicker);

I do have a lot to work still, since currently it gives you what you use and it should give you the ones that you don't, right? I need to make a relationship between nodes and files and how they are registered. I mean, Spatial is a file called Node3D, for example, so it's not the same.

I'll be doing it as soon as I can. Thank you for your comment!

lucasthomaz97 commented 2 years ago

is it already possible to create an executable using it? how's the size loss?

JeffVenancius commented 2 years ago

I have made so the output is opened by the system once it's done and updated it so you'll have the unused nodes instead of the used ones, is it better? 40e40b0e28cbd3e5e31be8cfdba080b21d514273

lucasthomaz97 commented 2 years ago

made what you think it's better! would be nice if you add an option to choose the unused or used or something like that. did you build any game with this?

JeffVenancius commented 2 years ago

I'd runned some tests, so yes, you can do it, but not in the best way (I need some data, to make sure to comment also the virtual classes and such).