Failing to build Thrive

Hi there

Issue Description

I would like to add some coding help to the thrive project, but am having some trouble getting it to build. I have the strong impression that it is because I was not able to restore the .sln file. After trying for an hour or so I decided to ask for help here (where else). In the setup instructions it details how via visual studios, but not via visual studios code. I would really rather not have to install visual studios for that one thing, since with my internet connection it would take several days ;).

Is there any way I can do this otherwise?

2 Likes

I don’t develop Thrive on Windows, so I may not be able to help much.

Linux

On Linux the setup is very simple. At least to me. You just need the names of a few packages, and setup one extra package source for mono. But after that it’s just a single command to install the required software (other than godot which you need to manually unzip), and then a few more commands and opening the godot editor to get everything built and ready.

The setup instructions have a section talking about how to do the setup with visual studio code: https://github.com/Revolutionary-Games/Thrive/blob/master/doc/setup_instructions.md#visual-studio-code
Did you follow those instructions? Did they not work?

Oh, I followed the instructions to the letter. I know better than to bother people until I’ve exhausted all solutions I can think of. The only thing I’m having trouble with is getting Thrive.sln to restore. The instructions only detail how to do that while using Virtual Studio, not VSC.

I would much prefer to work via Windows, since I have basically everything set up there for this, but if need be I will hop onto my linux distribution and set up dev for there. But like I said, I’d prefer to work in Windows.

From a quick google search it seems like there is a nuget package manager extension for vs code. You might be able to use that. I also have a slight recollection that the VS build tools for Windows include nuget.exe directly, which if included could be used from command prompt.

Humm, I already tried that, but I’ll give it another bash. It was late last night when I gave up so a fresh set of brain cells might make a better go at it.

Alas, I managed to restore the files, at least according to the terminal, but the build still fails with a very long list of Errors.

1 Like

Two things need setup:

  • the nuget packages
  • godot C# references

You probably got the packages right, but now godot references are not working. To get those working you need to compile at least once from the Godot editor (you may need to run nuget restore again after that). Once those both things are restored compiling should work right from godot editor and your IDE.

Okay, but godot fails to compile with a long list of failed resource aquisition errors.

Could you post the actual error output?
I’m leaning towards thinking that you are missing Git LFS, or you cloned before installing that, leading to all the asset files being not downloaded. Another guess is that godot has automatically applied incorrect changes (it quite often does that). If git status reports changes that you haven’t manually done, you should reset those changes while godot is closed and then reopening godot.

Humm, I did use git LFS, but git assured me that lfs was deprecated, so I really don’t know if it cloned it that way or not. Any way I can check?

You should check at this point if the image files in Thrive/assets/textures can be opened, if they can’t be opened and their file sizes are tiny, you don’t have Git LFS properly installed.

https://github.com/Revolutionary-Games/Thrive/blob/master/doc/setup_instructions.md

Curses. Foiled again by my own stupidity. Alright, I will try to find out why git lfs didn’t do its job properly. Thanks for all the help.

You need nuget to build the project. If you can run nuget restore in the project directory and it says it was successful, you should be good to go. VSCode will still give errors that it doesn’t work but you’ll need the nuget extension to fix those errors. Even if you don’t have the extension, it’ll still build with Godot if you restored with the actual program. Make sure you follow all of the setup instructions for VSCode with the link HH provided, to the letter. If you still have trouble, join the community server and I’ll help you if I’m available.

Thanks.

I have a feeling that hh is right about git LFS not working properly. I was quite sure to use it when cloning, but obviously something was wrong. Maybe the version was too old? I updated it, but that somehow totally stuffed git on my machine, so I uninstalled. I’ll reinstall git and git LFS and try again. If that fails, I’ll reach out again.

Not sure why, but I do not think that the LFS files are cloning properly.

Have you installed the latest git version and checked the include LFS option in the installer?
Does git --version output what you expect? If it doesn’t you might have another git installation in PATH.
Have you ran git lfs install and looked at the output to see that it was properly installed?

1- Yes, latest git version freshly installed, with LFS included.
2- git --version “git version 2.28.0.windows.1”
3- git lfs install Updated git hooks. Git LFS initialized.

It just never shows “Filtering content” as shown in the setup instructions when cloning

Those steps should work, not sure why it doesn’t work for you. You are the first person to have this kind of issue after messing with git.

I don’t think I can suggest much more than uninstalling and reinstalling git, and googling around why git LFS wouldn’t work correctly.

It might be possible to run git lfs commands manually in a cloned repository to get it to filter content / install the needed hooks in there. That approach probably is not very maintainable so I recommend that only as a last resort.

Don’t I feel special for being the “first”

I uninstalled all of git for the fourth time, reinstalled it, with LFS enabled, and this time it worked. I have… no idea why… I did literally nothing differently from previous occasions. Although I do seem to have a knack for finding problems no one else has encountered.

I was able to successfully build Thrive in Godot and launch it. There is however, one more problem. Instead of a microbe I can control, all I see once the game has loaded and I’ve pressed “New Game” is a large Thrive logo taking up most of the screen. I can move aruond the game world, I can see all the various clouds of chemicals, but no microbes at all. Additionally, once I am able to evolve I see no microbe to edit. Any idea why?

1 Like

Good that you got it finally working!

Sounds very similar to the OpenGL ES 2 issues (the game targets Godot OpenGL ES 3, but has fallback to 2 enabled:


As a partial workaround you can disable chromatic aberration in the game options to get rid of the bug with the thrive logo being over the gameplay.