Visual Basic 2010 Fast Writing
I am working on developing a simple console game in Visual Basic in which the "level" is drawn out after being read from a file.
So far, I'm using
Console.ReadKey()
to check for the arrow keys and to therefore move the position of the piece on the console开发者_JAVA百科.
The problem is that the only way I know to do this is to redraw the "level" every time that the piece moves - which is relatively slow.
Is there any better way to achieve this?
Three solutions:
- Redraw only the changing screen chars.
- Skip Console functions and use WINAPI WriteConsole (a little example to use WINAPI console functions).
- Use Forms and draw the text into a window.
精彩评论