Map border alteration

From VbGORE Visual Basic Online RPG Engine

Warning! The code in this page has been marked as possibly incorrect or buggy!
You can fix up this page by editing it. Relevant information can be found at the talk page. This tag must include information in the talk page!

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
Personal tools