none
Drawing text not showing up RRS feed

  • Question

  • Well i wanted to draw text, for  debuging, but it is not showing at all my code is this:

     

    debug = "Pacman X: "
    GraphicsWindow.DrawText(200,100,debug)

     

    And also is there a way to join more texts into that debug variable maybe using += ? and is there a go to new line symbol ?


    I love game design and game programing.
    • Changed type Primoz128 Friday, August 26, 2011 4:06 PM It's wrong...
    Friday, August 26, 2011 1:11 PM

Answers

All replies

  • The code you posted ran on its own works fine for me, displaying the text on the GraphicsWindow - perhaps the problem is the code where it is used - maybe this line is never reached?

    You can concatenate text using +;

    The newLine is a special character string, try the following:

    debug = "Pacman X: "
    newline = Text.GetCharacter(10)+Text.GetCharacter(13)
    debug = debug+newline+"First Line"
    debug = debug+newline+"Second Line"
    GraphicsWindow.DrawText(200,100,debug)


    Friday, August 26, 2011 6:31 PM
    Moderator
  • Well i used your example of a ball movement which i added collisions for a wall, just after collisions subroutine... is the subroutine the problem or somenthing...

    Im confused it wont draw anything.


    I love game design and game programing.
    Friday, August 26, 2011 7:58 PM
  • Well i used your example of a ball movement which i added collisions for a wall, just after collisions subroutine... is the subroutine the problem or somenthing...

    Im confused it wont draw anything.


    I love game design and game programing.


    You modified some code and it doesn't do what you expect - without the code you are using and what you expect to happen that doesn't, there isn't much help anyone can give. 

    Realistically, I'm not going to guess what you changed and make suggestions how to fix it!

    Friday, August 26, 2011 9:43 PM
    Moderator
  • Ok heres the project: RKD642.

    Oh and i found a way to join more text in a variable myself, sorry for that.


    I love game design and game programing.
    Friday, August 26, 2011 10:45 PM
  • See this thread for suggestions.
    • Marked as answer by Primoz128 Saturday, August 27, 2011 11:07 AM
    Saturday, August 27, 2011 9:48 AM
    Moderator