Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Make the game easier to debug #177

Open
izidormatusov opened this issue Aug 21, 2022 · 2 comments
Open

Make the game easier to debug #177

izidormatusov opened this issue Aug 21, 2022 · 2 comments
Labels
C-feature-request Request a new feature

Comments

@izidormatusov
Copy link

I love the idea of the game and having fun implementing my solution.

However, my current solution has a bug in it as two planes crashed into each other:

Screenshot 2022-08-21 at 10 27 45

How does one go about debugging this? It is impossible to know what were the plane ids or what wast their flight plan. I would have to go over the logs of my solution and try to painfully reconstruct the state in order to find where my solution made an error. It is feasible for somebody who has a lot of experience doing that but it is no fun 😞

At the moment UI window just shows the current state. It could be extended to show information like:

  • ID of the plane
  • flight path of the plane / flight paths of all planes

The information could be displayed always or only on hovering over the plane. Few mockups:

Screenshot 2022-08-21 at 10 51 58

Screenshot 2022-08-21 at 10 54 14

When the game stops, it would be useful to play with the game and debug it: Be able to rewind the game and see how the planes were moving around. You could inspect planes (their ids and the flight plan at the given time) and see when the flight plan changes were issued.

These changes would make it much easier to debug. The player can focus more time into writing algorithms rather than debugging / building their own debugging tools.

@jdno
Copy link
Owner

jdno commented Aug 23, 2022

The API includes the ids of the airplanes in the GameCollided event:

message AirplaneCollided {
  string id1 = 1;
  string id2 = 2;
}

But I fully agree that the observability of the game is not great right now. Rendering the names and flight plans is something I've considered as well, as is highlighting the planes that crashed by drawing a circle around them or so. This shouldn't be too complicated to implemented.

Replays would be great to have as well, but I honestly don't know how much work they would be to implement. If it's too complicated to do in the engine, maybe we can just record a video or so.

(Just fyi, this game is my attempt to get into game development. So I'm sadly not experienced enough to hammer out a feature like this in a weekend. 😬😅)

@jdno jdno added the C-feature-request Request a new feature label Aug 23, 2022
@noahc
Copy link

noahc commented Aug 23, 2022

One way to start would be to have a logger toggle that logged to a log file everything needed to play back the game. The log by it self would be valuable, but you could at a later stage, take old log files or new ones and play back the game for debugging purposes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

3 participants