Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Map size


Slasheree
 Share

Recommended Posts

> when I changed those values, the map stopped scrolling ( dunno if it's the right term ), my player gets out of the screen

Sorry, I should have elaborated more than that. You have two options:

1. Increase them, and then also change the picScreen size to fit.
2. Go to Sub ClearMap() (client/server-side) and change the values there.

Example:

```

Map.MaxX = MAX_MAPX

Map.MaxY = MAX_MAPY

```
to:

```

Map.MaxX = 14 ' change these values.

Map.MaxY = 11

```
Link to comment
Share on other sites

> Change:
>
> ```
>
> Public Const MAX_MAPX As Byte = 14
>
> Public Const MAX_MAPY As Byte = 11
>
> ```

Along with changing this you have to change the picScreen width and height witch you can find in the objects property's inVB.

Btw to avoid Screen tear, Win7 areo disable, and proportion issues do this….

1\. Divide the width and height individualy by 32, then change the property's

Public Const MAX_MAPX As Byte = 14

Public Const MAX_MAPY As Byte = 11

To that number minus 1.

2\. Make sure that the number you decide does not come to a decimal. If it does u got problems

An easy way to find a native number is to use your calculator and do 32+32= and keep hitting equals till the number gets close to the screen attribute u want and use tht number an a dimension for ur resolution.

I don't know if this is what u were trying to do or not....

Btw sometimes you have I delete all your maps and start again to do this

Peece
Link to comment
Share on other sites

> Along with changing this you have to change the picScreen width and height witch you can find in the objects property's inVB.
>
> Btw to avoid Screen tear, Win7 areo disable, and proportion issues do this….
>
> 1\. Divide the width and height individualy by 32, then change the property's
>
> Public Const MAX_MAPX As Byte = 14
>
> Public Const MAX_MAPY As Byte = 11
>
> To that number minus 1.
>
> 2\. Make sure that the number you decide does not come to a decimal. If it does u got problems
>
> An easy way to find a native number is to use your calculator and do 32+32= and keep hitting equals till the number gets close to the screen attribute u want and use tht number an a dimension for ur resolution.
>
> I don't know if this is what u were trying to do or not....
>
> Btw sometimes you have I delete all your maps and start again to do this
>
> Peece

Why does the map size have to get involved with screen size ? I just don't get it…
Link to comment
Share on other sites

You can, but it's a bit tricky. I do believe that if you change the server-side size only, it'll generate new maps with the proper size, and the client will still scroll. (Will cause some trickyness trying to resize maps client-side though, so you may need to change that a little as well.)
Link to comment
Share on other sites

I dont get what the problem is… It takes two seconds to change the map size in the map editor.. you could have changed them all manually by now ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

> I dont get what the problem is… It takes two seconds to change the map size in the map editor.. you could have changed them all manually by now ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

If I put 100x100 it crashes, or even 50x50 ._.
Link to comment
Share on other sites

> What error does it give? Sounds to me like it exceeds the memory limit(s) VB6 implies.

Simply makes the game 'stopped working', gonna check through IDE ( or whatever you call it XD )

[EDIT] Runtime Error 9: Subscript out of range

it highlights this line: Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONE

in Public Sub cacheRenderState(ByVal x As Long, ByVal y As Long, ByVal layerNum As Long)
Link to comment
Share on other sites

Joyce I fixed it I think… I added the Redim Autotile(found it in the Sub initAutotile) and commented out the initAutotile. What problems can this cause ? So far I haven't had any problems mapping, autotiles work just fine.

Private Sub cmdOk_Click()

Dim i As Long

Dim sTemp As Long

Dim x As Long, x2 As Long

Dim y As Long, y2 As Long, layerNum As Long

Dim tempArr() As TileRec

' If debug mode, handle error then exit out

If Options.Debug = 1 Then On Error GoTo errorhandler

If Not IsNumeric(txtMaxX.Text) Then txtMaxX.Text = Map.MaxX

If Val(txtMaxX.Text) < MAX_MAPX Then txtMaxX.Text = MAX_MAPX

If Val(txtMaxX.Text) > MAX_BYTE Then txtMaxX.Text = MAX_BYTE

If Not IsNumeric(txtMaxY.Text) Then txtMaxY.Text = Map.MaxY

If Val(txtMaxY.Text) < MAX_MAPY Then txtMaxY.Text = MAX_MAPY

If Val(txtMaxY.Text) > MAX_BYTE Then txtMaxY.Text = MAX_BYTE

With Map

.name = Trim$(txtName.Text)

If lstMusic.ListIndex >= 0 Then

.Music = lstMusic.List(lstMusic.ListIndex)

Else

.Music = vbNullString

End If

.Up = Val(txtUp.Text)

.Down = Val(txtDown.Text)

.left = Val(txtLeft.Text)

.Right = Val(txtRight.Text)

.Moral = cmbMoral.ListIndex

.BootMap = Val(txtBootMap.Text)

.BootX = Val(txtBootX.Text)

.BootY = Val(txtBootY.Text)

.BossNpc = scrlBoss.value

' set the data before changing it

tempArr = Map.Tile

x2 = Map.MaxX

y2 = Map.MaxY

' change the data

.MaxX = Val(txtMaxX.Text)

.MaxY = Val(txtMaxY.Text)

If x2 > .MaxX Then x2 = .MaxX

If y2 > .MaxY Then y2 = .MaxY

' redim the map size

ReDim Map.Tile(0 To .MaxX, 0 To .MaxY)

ReDim Autotile(0 To Map.MaxX, 0 To Map.MaxY)

For x = 0 To x2

For y = 0 To y2

.Tile(x, y) = tempArr(x, y)

Next

Next

ClearTempTile

End With

' cache the bum candy

' initAutotiles

Unload frmEditor_MapProperties

' Error handler

Exit Sub

errorhandler:

HandleError "cmdOk_Click", "frmEditor_MapProperties", Err.Number, Err.Description, Err.Source, Err.HelpContext

Err.Clear

Exit Sub

End Sub
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...