Register
Handmade Hero»Forums»Code»Game does not start after build
1 posts
Game does not start after build
6 months, 3 weeks ago Edited by Meerkat on May 16, 2020, 6:31 p.m. Reason: Initial post
I have built game source code 601 and have been using art assets 536. However, the game does not start.

I have been following the intsructions from the readme.txt file, but no luck.

One thing I changed in the built.bat file is the enabling of HANDMADE_INTERNAL.

After running c:\build\win32_handmade.exe executable from within the c:\handmade directory, 2 files were created in folder data, namely:

base_game.hha (approx. 136 Mb)
intro_cutscene.hha (approx. 343 Mb)

However, if I start the game once again, so after creating these 2 files, then nothing seems to happen, I just get to see a black window that closes itself after 3 seconds.

Does anyone have an idea of what is going wrong ?

Thanks in advance for any help.
Simon Anciaux
920 posts
Game does not start after build
6 months, 3 weeks ago
Have you try launching the game from Visual Studio and see what's causing it to close ?
1 posts
Game does not start after build
6 months, 1 week ago
I'm a brand new follower and ran into the same issue. I bodged around it temporarily by changing "#define TEST_SPHERE 0" to 1 to bypass the FullCast call that's crashing, and the game loaded fine after a rebuild. Obviously not the correct solution, but might help other users until that's fixed, as only having a black screen and a crash wasn't a great first-time experience

The crash was at line 679 of handmade_lighting.cpp
1
TransferPPS[RayIndex] = Clamp01(Inner(MoonDir, -ThisRayD))*MoonColor;

with the following callstack
1
2
3
4
5
>	handmade_game_temp.dll!RayCast(lighting_work * Work, v3_4x RayOrigin, v3_4x RayD, light_atlas * SpecAtlas, light_atlas * DiffuseAtlas, light_atlas_texel SpecTexel, light_sample_direction * SampleDirections, unsigned short InitialGridIndex, int Debugging) Line 679	C++
 	handmade_game_temp.dll!FullCast(lighting_work * Work, light_atlas_texel Tile, v3 VoxCenterP, unsigned int EntropyIndex, unsigned short InitialGridIndex) Line 753	C++
 	handmade_game_temp.dll!ComputeLightPropagationWork(platform_work_queue * Queue, void * Data) Line 931	C++
 	[Inline Frame] win32_handmade.exe!Win32DoNextWorkQueueEntry(platform_work_queue *) Line 1215	C++
 	win32_handmade.exe!ThreadProc(void * lpParameter) Line 1250	C++