#linuxbsd
Explore tagged Tumblr posts
lotusprotocol · 2 years ago
Text
long ramble about how i optimized my godot game for size (and how you can too!)
Tumblr media
if i export the executable for dreamcatcher with the currently used scenes and the default export template, then the file size is 76.2mb. since it’s still early in development, i’m expecting this to get a lot bigger as i keep developing the game, and it will likely be at least 10x its current size.
i think a good amount of people reading this are familiar with the western game dev stereotype of having an executable that’s tens, if not hundreds of gigabytes in size. i’d like to avoid this as much as possible, since i want my game to be accessible to people who don’t have tons of storage to spare. also, i generally enjoy optimizing things to their limits, which is why i do tool assisted speedruns often (which will also be built in to dreamcatcher).
anyways, back to optimizing for size. a while back, i was doing some research on the topic and found this article on the godot docs: https://docs.godotengine.org/en/stable/contributing/development/compiling/optimizing_for_size.html
if it weren’t for this article, i would not have been able to optimize the file. also, if you’re a godot dev, i highly recommend looking into this!
recently, i decided to try out optimizing, so the first step was to download the godot source code (which you can find on the github repo), and download scons to build the source. here’s the links for those:
godot source code: https://github.com/godotengine/godot
scons: https://scons.org/pages/download.html
the second step was to run scons from the source code directory. this can be done by going to the command line, navigating to the directory, and running this command:
scons platform=[windows/linuxbsd/macos/web] target=template_release tools=no debug_symbols=no lto=full optimize=size [other options]
this will create an export template and put it in a new directory named bin. it takes about half an hour to build for the first time, so make sure you have something else to do while you wait, since it also uses a lot of your cpu. other options are dependent on the game you’re making, but some include disabling 3d, disabling advanced text, and disabling specific modules.
also, using the optimize=size option makes the build prioritize size over performance, which is generally done for web builds. if you’re making something that needs as much performance as possible, consider omitting this option from the command. however, in my case, the game is capped at 60fps, and i’ve already been optimizing for performance when making the game (which i might get into in another post)
the third step was to set up the export template. you’ll have to move the build into your godot export templates folder, and rename it accordingly. this video does a good job of explaining it: https://youtu.be/zKq25lXlsUE?si=AOoMVHdI6cIVG7FP&t=407
the video also explains other concepts that are mentioned in this post, so feel free to look around in it as well.
the fourth step was to export the project with the new template. go to project > export in your godot project, and make a new preset for the custom template. set the custom template path to the template you installed, select the resources you want to export if not all of them, click export project, and you should be good to go!
now, how is this whole wall of text worth it? well, i was able to cut down my file size from 76.2mb all the way to 51.6mb, which is a huge margin. and that’s before the fifth step: zipping the file.
the best way to do this is to download 7zip, which produces more optimized zip files without affecting other areas of performance. you can find it here: https://www.7-zip.org/download.html
once you have this downloaded, you can archive your executable, and you’re finally done! if you’re using the command line to do this, here’s the command format:
7z a -mx9 archivename.zip path/to/executable
zipping the file cut down the size further from 51.6mb to 28.1mb. overall, that’s almost 3x smaller than the original file, which is a really big improvement.
Tumblr media
size comparison across all three files
if you made it all the way to the end of this post, thank you so much for reading! i hope this helps :>
5 notes · View notes
maurycy-wilk · 4 years ago
Text
Systemy operacyjne Linux BSD
Systemy operacyjne Linux BSD
Systemy operacyjne Linux BSD. Oczywiście ktoś powie że nie ma takiego systemu, i ja także tak mowilem, i to jeszcze niedawno temu. Jednak często Linuxy i BSD są łączone dla wygody razem, a do tego dodawane jeszcze czasami: Solaris, i inne. Wiec mam zamiar napisać o BSD dostepnych do użytku biurkowego, czyli na pulpit. Nie będę pisał o systamch operacyjnych i dystrybucjach z rodziny BSD,…
View On WordPress
2 notes · View notes
encyklop · 4 years ago
Text
system operacyjny LinuxBSD
System operacyjny LinuxBSD. Wiadomo, ze takiego systemu operacyjnego nie ma, ale dla uproszczenia, te oba to znaczy Linux i BSD są traktowane razem. Dobrze. Zainstalowalem na dysku twardym system operacyjny NetBSD. Instalował się bardzo szybko i łatwo... https://zeejop.wordpress.com/2021/01/09/system-operacyjny-linux-bsd/
0 notes
maurycy-wilk · 4 years ago
Text
Linux BSD dla początkujących
Linux BSD dla początkujących
Jaki wybrać Linux BSD dla początkujących użytkowników komputera? Tak prosty jak na przykład Ubuntu? Odpowiednikiem Ubuntu w systemach operacyjnych BSD będzie jedynie GhostBSD. GhostBSD jest dostępny nawet dla początkujących użytkowników komputera i internetu. Oczywiście mam na myśli systemy operacyjne BSD przeznaczone do zadań desktopowych, na biurko, a nie systemach operacyjnych BSD używanych…
View On WordPress
2 notes · View notes
maurycy-wilk · 4 years ago
Text
system operacyjny Linuks BSD
system operacyjny Linuks BSD
Nie mogłem z jakiegoś powodu użyć opcji reblogowania, postanowiłem obszernie zacytować wpis, tekst pochodzi z https://zeejop.wordpress.com/2021/01/09/system-operacyjny-linux-bsd/ “System operacyjny LinuxBSD. Wiadomo, ze takiego systemu operacyjnego nie ma, ale dla uproszczenia, te oba to znaczy Linux i BSD są traktowane razem. Dobrze. Zainstalowalem na dysku twardym system operacyjny NetBSD.…
View On WordPress
1 note · View note
encyklop · 4 years ago
Text
system operacyjny LinuxBSD
Moje opnie o GhostBSD. Mam już zainstalowanego GhostaBSD nazywanego czasami GhostkiemBSD, albo Ghostkiem. I pierwsze wejrzenie, czyli pulpit. Pulpit Mate. Mate jak to Mate, ja się specjalne nie fascynuję Menadżerami Okien. KDE, Gnome, Lxde, Xfce, czy właśnie pulpit Mate. 
0 notes
encyklop · 4 years ago
Text
GhostBSD odsłona druga
Odsłona druga Ghost BSD, konketniej GhostBSD 20.11.28. System operacyjny GhostBSD mam już zainstalowany, sam proces instalacji jest niezwykle prosty, nawet dla początkujących. Pobieramy plik w formacie iso ze strony... https://zeejop.wordpress.com/2021/01/09/ghost-odslona-druga/
0 notes