Handmade Hero » Forums » Code » Trouble running the most recent code
Bananaa6
2 posts
#16270 Trouble running the most recent code
2 months, 1 week ago Edited by Bananaa6 on Sept. 9, 2018, 9:50 p.m. Reason: Initial post

Hi there!

I am new here so I hope this is the right place to ask.
I have compiled the latest version (from day 478) and tried to run both win32_handmade.exe and win32_renderer_test.exe.
Unfortunately they both both of them were very heavy on my computer (a laptop with i7-750U cpu if it matters).
Could it be because I have no gpu? What can I do for it to run smoothly?
mrmixer
Simon Anciaux
480 posts
#16285 Trouble running the most recent code
2 months, 1 week ago

You can use the profiler to determine what is taking time in HMH. At the moment the lighting is computed on the CPU with ComputeLightPropagation taking 80% of the frame time on my machine. F4 will stop computing the lighting, but everything will be black, so you also need to disable the lighting in the debug menu:
click on the white text at the top of the screen > renderer > RenderCommand->Settings.LightingDisable.
Bananaa6
2 posts
#16292 Trouble running the most recent code
2 months, 1 week ago

Thanks for the answer!

I was able to turn of the light and by pressing F4 and also F5 works, but I wasn't able to do anything else.
I can't find a white text at the top, only a white dot which I can move but does nothing...
mrmixer
Simon Anciaux
480 posts
#16296 Trouble running the most recent code
2 months, 1 week ago

It looks like you either are missing the assets (.hha files in the data directory) or you haven't set the working directory properly.

If you are missing the .hha files you need to download the art pack (3 of them I think) from your sendowl link and use the "test asset builder" to build the .hha files. The problem is that in the last version of hmh the test asset builder doesn't compile (It's commented out in build.bat). So you would need to use an older version (Day 400 for example) and build the assets (the readme.txt file has some explanations). And since we have change the format you will need to convert the file to the new format using "hhaedit.exe -rewrite" (from day 478).

If you have the .hha files: if you are running from visual studio, in project > properties set the working directory to be the "handmade" directory (the parent directory of the "code" directory). The readme says that it should be "handmade/data" but it wont work if you set it to that. If you are running from a command line, just go to the handmade directory, and run the executable from there (somthing like "../build/win32_handmade.exe" ).