A
Amzin
Hello. I'm writing roguelike using VB.NET. It has very slow
console output. Is there any methods to make it work faster?
For example,
Sub PlaceAt(ByVal s As String, ByVal x As Integer, ByVal y As
Integer)
Console.SetCursorPosition(x, y)
Console.Write(s)
End Sub
Sub Setcolor(ByVal fg, ByVal bg)
Console.ForegroundColor = fg
Console.BackgroundColor = bg
End Sub
For I = 0 To mapwidth
For J = 0 To mapheight
Setcolor(ConsoleColor.DarkBlue, ConsoleColor.Blue)
PlaceAt(things(map(I, J)).image, I, J)
Next
Next
When mapwidth=80 and mapheight=25 (standard console) screen fills with
coloured symbols in 2 seconds or more (Vista/XP). Is there workaround?
console output. Is there any methods to make it work faster?
For example,
Sub PlaceAt(ByVal s As String, ByVal x As Integer, ByVal y As
Integer)
Console.SetCursorPosition(x, y)
Console.Write(s)
End Sub
Sub Setcolor(ByVal fg, ByVal bg)
Console.ForegroundColor = fg
Console.BackgroundColor = bg
End Sub
For I = 0 To mapwidth
For J = 0 To mapheight
Setcolor(ConsoleColor.DarkBlue, ConsoleColor.Blue)
PlaceAt(things(map(I, J)).image, I, J)
Next
Next
When mapwidth=80 and mapheight=25 (standard console) screen fills with
coloured symbols in 2 seconds or more (Vista/XP). Is there workaround?