Starbound has been one of my favorite games of all time, so I’m happy to say that I have the latest Starbound source code, last commit August 7th, 2019. I will not be explaining how I got these files. It is the actual source, not just a decompilation, and as such includes build scripts, unused stuff, old migration code, comments, a stored test player, etc.
Source Screenshots
The source has minimal comments, and the structure is reasonable. I found the code easy to read and understand, but perhaps that’s because I’ve been modding Starbound for years now and am familiar with its behavior.
Languages Breakdown (GitHub)
StarEnvironmentPainter.cpp
StarMixer.cpp (audio related)
StarTools.cpp
Building
And of course, we can build it. I compiled this version without Steam API or the Discord rich presence API, but those are easily included.
Funny Developer Comments
Here’s a look at some of the best (in my opinion) developer comments in the source. This is not intended to be a mockery, far from it, I’m ecstatic I can take a peek into the minds of the developers. Enjoy.
Example: Simple Re-implementation of Vapor Trail and Sitting Toolbar Usage
At some point during development, Chucklefish had the idea to add a vapor trail when the player was falling fast. I could’ve sworn I saw a post on their news about it back when the game was in beta, but I can’t find it now. Anyway, we can add a small snippet to restore it, as an example of further engine work Starbound can benefit from.
// Vapor trail
if (m_movementController->velocity()[1] < -50) {
m_vaporTrailTimer += WorldTimestep;
if (m_vaporTrailTimer > 1)
m_humanoid->setVaporTrail(true);
}else{
m_vaporTrailTimer = 0;
m_humanoid->setVaporTrail(false);
}
By adding this snippet, we can see what it was roughly meant to look like.
We can also modify Player restrictions such as
bool Player::canUseTool() const {
return !isDead() && !isTeleporting() && !m_techController->toolUsageSuppressed() && m_state != State::Lounge;
}
to just
return !isDead() && !isTeleporting() && !m_techController->toolUsageSuppressed();
Allowing us to use our inventory while sitting down
Further Thoughts
Future work on the engine can lead to further modding capabilities and engine optimizations. There are many potential client side performance improvements that could be made without touching any network code. This would maintain compatibility with the vanilla client. The netcode could be updated as well, but this would break compatibility once major changes were made. If both (or more) parties are willing to use a modified client, any theoretical modification could be made. The possibilities are endless.
As of 2024, there now exists a few Starbound open source community projects with the aim of enhancing the base game’s experience. : )
It helps me if you share this post
Published 2023-05-27 04:55:45
Hey man hope you read this, but I have a problem with building. I’ve got all the libraries included and the solution builds, but when building the exe I get a lot of errors telling me quite a lot of header files are missing even though I included all the files in cmake using file(GLOB_RECURSE ALL_FILES “.cpp” “.h” “*.hpp”)
If you (or someone) reads this can they point out what I’m doing wrong? Thanks.
Absolutely with you it agree. In it something is also idea good, I support.
Understand me?
The last blog update on the official Starbound page was at the end of 2020, and nothing more has been posted since then.
Tbh, Chucklefish should just re-license the source code to a free software license, the game is abandonware, they are selling a game that is no longer supported, so any bugs or crashes that occur as a result of running it on a higher release of the major operating systems is not going to be fixed by them. It’s the least they can do, judging by everything that happened during the Starbound development process. If the developers relinquished ownership of the source code and assets to the company, there should be no legal impediment to doing so.
Hi Gen, could you show us everything you did to compile the code in Visual Studio? In principle the files are there, but what’s next?
you don’t necessarily need to use visual studio to compile it
install cmake and use the included configs / scripts as a reference for how to set up the external libs which are included or you may install them separately if wanted to use different / updated versions of the dependencies
then simply build with cmake the main cmakelists.txt in the source dir
you will also need to place the external libs (the exe errors and you can just read the error message) next to the program output
you need the initial sbinit.config that is also included to be next to the exe. refer to the release version of Starbound for further reference of the folder structure setup if need be
Hi, part of the source code have been published to archive.org, but it’s incomplete https://www.reddit.com/r/starbound/comments/14bmmpz
Would you be willing to share the full source code with the community?
hi, you can contact me and we can discuss further, I have no plans to upload the source code to archive.org
although following the link you sent, it appears the full source code is in the included ‘rar’ folder