Input/Output console window in XNA

Posted by Will Bagley on Game Development See other posts from Game Development or by Will Bagley
Published on 2012-12-07T01:41:04Z Indexed on 2012/12/07 5:22 UTC
Read the original article Hit count: 282

Filed under:
|
|
|

I am currently making a simple game in XNA but am at a point where testing various aspect gets a bit tricky, especially when you have to wait till you have 1000 score to see if your animation is playing correctly etc. Of course i could just edit the starting variable in the code before I launched but I have recently been interested in trying to implement a console style window which can print out values and take input to alter public variables during run-time.

I am aware that VS has the immediate window which achieves a similar thing but i would prefer mine is an actual part of the game with the intention that the user may have limited access to it in the future.

Some of the key things i have yet to find an answer to after looking around for a while are:

  • how i would support free text entry
  • how i would access variables during runtime
  • how i would edit these variable

I have also read about using a property grid from windows form aps (and partially reflection) which looked like it could simplify a lot of things but i am not sure how I would get that running inside my XNA game window or how i would get it to not look out of place (as the visual aspect of is seems to be aimed just for development time viewing).

All in all I'm quite open to any suggestions on how to approach this task as currently I'm not sure where to start. Thanks in advance.

© Game Development or respective owner

Related posts about XNA

Related posts about c#