Slasheree Posted August 30, 2012 Author Share Posted August 30, 2012 How can I make so that when the server creates new maps ( when map folder is empty ) it makes them in the dimension I want ? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted August 30, 2012 Share Posted August 30, 2012 Change:```Public Const MAX_MAPX As Byte = 14Public Const MAX_MAPY As Byte = 11``` Link to comment Share on other sites More sharing options...
Slasheree Posted August 30, 2012 Author Share Posted August 30, 2012 when I changed those values, the map stopped scrolling ( dunno if it's the right term ), my player gets out of the screen Link to comment Share on other sites More sharing options...
Ruins of Hell Posted August 30, 2012 Share Posted August 30, 2012 > when I changed those values, the map stopped scrolling ( dunno if it's the right term ), my player gets out of the screenSorry, 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 More sharing options...
zarocmaster Posted August 30, 2012 Share Posted August 30, 2012 > 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'sPublic Const MAX_MAPX As Byte = 14Public Const MAX_MAPY As Byte = 11To that number minus 1.2\. Make sure that the number you decide does not come to a decimal. If it does u got problemsAn 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 thisPeece Link to comment Share on other sites More sharing options...
Slasheree Posted August 30, 2012 Author Share Posted August 30, 2012 > 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> > PeeceWhy does the map size have to get involved with screen size ? I just don't get it… Link to comment Share on other sites More sharing options...
Ruins of Hell Posted August 30, 2012 Share Posted August 30, 2012 > Why does the map size have to get involved with screen size ? I just don't get it…The idea is that the default map size should be the amount that can be viewed without scrolling, I think because the original Mirage engine didn't support scrolling at all. Link to comment Share on other sites More sharing options...
Slasheree Posted August 31, 2012 Author Share Posted August 31, 2012 so, you can't change the map size without changing the 'form.width and form.height' ? Link to comment Share on other sites More sharing options...
Joyce Posted August 31, 2012 Share Posted August 31, 2012 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 More sharing options...
Justn Posted August 31, 2012 Share Posted August 31, 2012 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 More sharing options...
Slasheree Posted August 31, 2012 Author Share Posted August 31, 2012 > 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 More sharing options...
Justn Posted August 31, 2012 Share Posted August 31, 2012 Hmm I heard that happen to other people too I have never had that with 50x50 but never tried 100x100 Link to comment Share on other sites More sharing options...
Joyce Posted August 31, 2012 Share Posted August 31, 2012 What error does it give? Sounds to me like it exceeds the memory limit(s) VB6 implies. Link to comment Share on other sites More sharing options...
Zzbrandon Posted August 31, 2012 Share Posted August 31, 2012 Go to Map editior in admin and change dimensions ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Justn Posted August 31, 2012 Share Posted August 31, 2012 > Go to Map editior in admin and change dimensions ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)Get out…Slasher I sent u a pm also Link to comment Share on other sites More sharing options...
Slasheree Posted August 31, 2012 Author Share Posted August 31, 2012 > 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 rangeit highlights this line: Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONEin Public Sub cacheRenderState(ByVal x As Long, ByVal y As Long, ByVal layerNum As Long) Link to comment Share on other sites More sharing options...
Joyce Posted August 31, 2012 Share Posted August 31, 2012 ~~Yup, seems to run out of memory there. Why do you need such huge maps anyway though?~~Disregard this post, it was made before he edited his post above. Link to comment Share on other sites More sharing options...
Slasheree Posted August 31, 2012 Author Share Posted August 31, 2012 Cause it's kinda messing my imagination with dungeon floors :\ Link to comment Share on other sites More sharing options...
Joyce Posted August 31, 2012 Share Posted August 31, 2012 Oh, you edited your post.. Interesting, I did read about something somewhere that the caches did not get redimmed properly upon changing map sizes, might have to look into that. Link to comment Share on other sites More sharing options...
Slasheree Posted September 5, 2012 Author Share Posted September 5, 2012 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 LongDim sTemp As LongDim x As Long, x2 As LongDim y As Long, y2 As Long, layerNum As LongDim tempArr() As TileRec' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerIf Not IsNumeric(txtMaxX.Text) Then txtMaxX.Text = Map.MaxXIf Val(txtMaxX.Text) < MAX_MAPX Then txtMaxX.Text = MAX_MAPXIf Val(txtMaxX.Text) > MAX_BYTE Then txtMaxX.Text = MAX_BYTEIf Not IsNumeric(txtMaxY.Text) Then txtMaxY.Text = Map.MaxYIf Val(txtMaxY.Text) < MAX_MAPY Then txtMaxY.Text = MAX_MAPYIf Val(txtMaxY.Text) > MAX_BYTE Then txtMaxY.Text = MAX_BYTEWith Map.name = Trim$(txtName.Text)If lstMusic.ListIndex >= 0 Then.Music = lstMusic.List(lstMusic.ListIndex)Else.Music = vbNullStringEnd 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 ittempArr = Map.Tilex2 = Map.MaxXy2 = Map.MaxY' change the data.MaxX = Val(txtMaxX.Text).MaxY = Val(txtMaxY.Text)If x2 > .MaxX Then x2 = .MaxXIf y2 > .MaxY Then y2 = .MaxY' redim the map sizeReDim Map.Tile(0 To .MaxX, 0 To .MaxY)ReDim Autotile(0 To Map.MaxX, 0 To Map.MaxY)For x = 0 To x2For y = 0 To y2.Tile(x, y) = tempArr(x, y)NextNextClearTempTileEnd With' cache the bum candy' initAutotilesUnload frmEditor_MapProperties' Error handlerExit Suberrorhandler:HandleError "cmdOk_Click", "frmEditor_MapProperties", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub Link to comment Share on other sites More sharing options...
Slasheree Posted September 6, 2012 Author Share Posted September 6, 2012 Noticed there's some bug with the Fog, when you change it, the tiles go all buggy and stuff, but if you save it everything goes back to normal and it saves the changes. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now