borodust / cl-bodge

Feature-rich game framework for Common Lisp
http://borodust.org/projects/cl-bodge/
MIT License
174 stars 14 forks source link

Throw error and stop gracefully when engine startup/shutdown fails #17

Open borodust opened 8 years ago

borodust commented 8 years ago

If bad thing happens, it hangs atm, which shouldn't be the case. See host system's enable.

Inc0n commented 4 years ago

It seems that if the game (using gamekit defgame) throws an error in draw or act. The shutdown of engine will hang, and the latching seems to be the cause.

Inc0n commented 4 years ago

It think it hangs because the game (appkit) instance is still running, while the engine is attempting to shutdown.

borodust commented 4 years ago

There are too many ways things can go south in cl-bodge atm. Calling random restarts most often than not will result in corrupted state of an engine. gamekit manual has a few guidelines how to avoid this.

appkit system is just a tool to bootstrap an engine quickly by preconfiguring a few things. Running appkit instance is (kinda) an engine itself.

Inc0n commented 4 years ago

Thanks for the explanation. Ah yes the manual explains quite a bit, and explains why I am left to restart the sbcl process, pressing q after encountering any error in my code.

Inc0n commented 4 years ago

On a side note, it seems that if :blocking t is not passed into start, its thread will continue to run, after the program has exit, and :blocking nil or not specifying blocking argument will resolve this matter in a different way.