Map border alteration
From VbGORE Visual Basic Online RPG Engine
Contents |
[edit] Introduction
This custom feature by Malo, makes it so that empty space where there is no map is not drawn.
The game without the custom feature.
The game with the custom feature.
[edit] Implementation
This system does not work on maps smaller than 30X30 tiles, so if your map is smaller than 30X30 it will switch back to the original system.
This does not work with zooming when the player is on the side of the map. It will just zoom in on a false location
Step 1: Open GameClient.vbp
Step 2: Open TileEngine module
Step 3: Go to
Sub Engine_ShowNextFrame()
Step 4: Replace
'****** Update screen ******
Call Engine_Render_Screen(UserPos.X - AddtoUserPos.X, UserPos.Y - AddtoUserPos.Y, OffsetCounterX - 288, OffsetCounterY - 288)
with
Dim tileDifference As Single
Dim OffsetCounterX2 As Single
Dim OffsetCounterY2 As Single
Dim mapLocationX As Single
Dim mapLocationY As Single
If MapInfo.Width < 30 Or MapInfo.Height < 30 Then
Call Engine_Render_Screen(UserPos.X - AddtoUserPos.X, UserPos.Y - AddtoUserPos.Y, OffsetCounterX - 288, OffsetCounterY - 288)
Else
tileDifference = (MapInfo.Width - UserPos.X)
If tileDifference < 13 Then
If OffsetCounterX < 0 And tileDifference = 12 Then
mapLocationX = MapInfo.Width - 13
OffsetCounterX2 = OffsetCounterX
Else
OffsetCounterX2 = 0
mapLocationX = MapInfo.Width - 12
End If
ElseIf tileDifference >= (MapInfo.Width - 13) Then
If OffsetCounterX > 0 And tileDifference = (MapInfo.Width - 13) Then
mapLocationX = 14
OffsetCounterX2 = OffsetCounterX
Else
OffsetCounterX2 = 0
mapLocationX = 0 + 13
End If
Else
OffsetCounterX2 = OffsetCounterX
mapLocationX = UserPos.X - AddtoUserPos.X
End If
tileDifference = (MapInfo.Height - UserPos.Y)
If tileDifference < 10 Then
If OffsetCounterY < 0 And tileDifference = 9 Then
mapLocationY = MapInfo.Width - 10
OffsetCounterY2 = OffsetCounterY
Else
OffsetCounterY2 = 0
mapLocationY = MapInfo.Width - 9
End If
ElseIf tileDifference >= (MapInfo.Height - 10) Then
If OffsetCounterY > 0 And tileDifference = (MapInfo.Width - 10) Then
mapLocationY = 11
OffsetCounterY2 = OffsetCounterY
Else
OffsetCounterY2 = 0
mapLocationY = 0 + 10
End If
Else
OffsetCounterY2 = OffsetCounterY
mapLocationY = UserPos.Y - AddtoUserPos.Y
End If
'****** Update screen ******
Call Engine_Render_Screen(mapLocationX, mapLocationY, OffsetCounterX2 - 288, OffsetCounterY2 - 288)
End If
[edit] Criticism
The server calculates the viewing area as a constant rectangle based off of the size of the screen when doing in-screen check calculations. This means that those who are at the corner will not only have a farther viewing area in two directions giving them an advantage over other characters (both users and NPCs) but the server won't recognize them having that extended viewing area. This can easily result in artifacts of delay when movement in this "extended" view area happens.
[edit] Criticism #2
When approching the top of the map your character will jump one square south then continue going to the top of them map.
From Malo: I don't experience this problem in my game, so if anyone else gets this, please let me know.
[edit] Criticism #3
With the new tile feature when you get next to the bottom of the screen nothing renders. So this add on becomes less useful with the 1.1.0 patch.




