Computer Science Canada text help |
Author: | bgmrk [ Fri Apr 07, 2006 5:46 pm ] | ||
Post subject: | text help | ||
i am trying to make pong game..however when i am using the font.Draw it won't let me put an integar variable....does it only allow int? or is it just strings? Here is my code..you'll c the error when u try to run it...
quick help would b very grateful thanx |
Author: | Cervantes [ Fri Apr 07, 2006 5:53 pm ] | ||
Post subject: | |||
Font.Draw takes a number of parameters, the first of which is the text it wants to draw. The text is a string. It cannot be an integer. To draw an integer, you have to convert it's value into a string. 5 would convert into "5". To do this, use the intstr function.
|
Author: | bgmrk [ Fri Apr 07, 2006 6:27 pm ] | ||
Post subject: | |||
thanks that helped...but i ran into another problem ![]() i don't want to use cls and draw everything over because that will take to long..so i figure why not draw a white box over where i want to refresh the screen however i'm not quite sure how to make it non flikery...any suggestions
|
Author: | Cervantes [ Fri Apr 07, 2006 6:33 pm ] | ||
Post subject: | |||
You'll want to be using View.Update. bgmrk wrote:
Why are you turning 'offscreenonly' mode off? It needs to be on for View.Update to work. |
Author: | bgmrk [ Fri Apr 07, 2006 6:35 pm ] |
Post subject: | |
opps that was a stupid mistake....thanx..i may need more help so if i do..instead of jsut making a new topic..i'll just post it here ![]() thanx again |
Author: | [Gandalf] [ Fri Apr 07, 2006 7:02 pm ] | ||
Post subject: | |||
If you're only update one section of the screen, and speed is so important to you, you may also consider using View.UpdateArea(), which only updates a portion of the screen instead of the whole:
|
Author: | bgmrk [ Fri Apr 07, 2006 8:03 pm ] |
Post subject: | |
oo good point i never thought of that.... ![]() ![]() |