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.SetCurs orPosition(x, y)
Console.Write(s )
End Sub
Sub Setcolor(ByVal fg, ByVal bg)
Console.Foregro undColor = fg
Console.Backgro undColor = bg
End Sub
For I = 0 To mapwidth
For J = 0 To mapheight
Setcolor(Consol eColor.DarkBlue , ConsoleColor.Bl ue)
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.SetCurs orPosition(x, y)
Console.Write(s )
End Sub
Sub Setcolor(ByVal fg, ByVal bg)
Console.Foregro undColor = fg
Console.Backgro undColor = bg
End Sub
For I = 0 To mapwidth
For J = 0 To mapheight
Setcolor(Consol eColor.DarkBlue , ConsoleColor.Bl ue)
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?
Comment