▲ | cherryteastain 3 days ago | |||||||
> How would you unit test an enemy that spawns, moves towards the player, and attacks? You can easily write a 'simulation' version of your event loop and dependency inject that. Once time can be simulated, any deterministic interaction can be unit tested. | ||||||||
▲ | mac-mc 3 days ago | parent | next [-] | |||||||
Others would quibble that those are integration tests, "UI" tests, or other higher-level tests, etc. | ||||||||
| ||||||||
▲ | ryoshu 3 days ago | parent | prev [-] | |||||||
A lot of games aren't deterministic within a scope of reasonable test coverage. | ||||||||
|