Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug messages and logging. #21

Open
IanWitham opened this issue Apr 26, 2012 · 3 comments
Open

Debug messages and logging. #21

IanWitham opened this issue Apr 26, 2012 · 3 comments

Comments

@IanWitham
Copy link
Contributor

I think it would be easier to see what's going on behind the scenes with liberally scattered debug statements, as per this blog post.

The messages could be routed to a log file or to the terminal, but I think it would be a nice touch if they were routed to an in game HUD which could be brought up with, for example, the tilde key. What do you think?

@kcunning
Copy link
Owner

I like this, and I've been thinking seriously about this. I needed to add a messages screen anyway. Here are some other things I wanted to add:

  • Coords for each of the blocks in an overlay
  • Numbers on each of the monsters, so it's easier to follow them around.
  • Specific rolls during combat
  • Hit points remaining for a monster

@Technohazard
Copy link

I have something similar in a module called 'myDebug' - it's not perfect, but it tracks error messages, and renders to a HUD.

https://github.com/Technohazard/Odd-Engine/blob/master/myDebug.py

I usually add two members to every object, errorQueue and isError. If there are any errors / messages in an object, I call self.errorQueue.append and set self.isError = True. After updating an object, check to see if object.isError == True and copy the list from object.errorQueue to the Debug window.

@kcunning
Copy link
Owner

kcunning commented May 4, 2012

I like that! I might have to use that (with credit, of course :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants