Pasketi Posted June 15, 2009 Share Posted June 15, 2009 Question:I use the default map size (30x30) and my PicScreen is basically 28x14 tiles (896x450). I have tried everything, but my map just doesn't work like it should. So how should i edit this code and is there someway to count the numbers there should be? Link to comment Share on other sites More sharing options...
Sowtis Posted June 17, 2009 Share Posted June 17, 2009 @Ghost:> He's lying. It doesn't work. That is the only way to do it.Yeah, if you try to make it smaller, your character goes off screen. If you make it bigger, the extra space is black I think. Link to comment Share on other sites More sharing options...
goku1993 Posted June 18, 2009 Share Posted June 18, 2009 i don t really know if it was because of this tutorial so i m just asking if someone had the same problem,the size of the screen is great and works fine but when i use attribut in map editor some times when i like click on a block i have to click the one next to it for it to appear and happens all over again.just asking to see if someone s had such a problem Link to comment Share on other sites More sharing options...
Elena Posted June 18, 2009 Share Posted June 18, 2009 I think I must be doing something wrong. I just started editing source today, in fact this is the first edit I've done. I followed the directions word for word but I dont notice any difference in my game's screen resolution, it stays the same size. And I saved my edit and everything. :/ Link to comment Share on other sites More sharing options...
goku1993 Posted June 18, 2009 Share Posted June 18, 2009 ok well i guess it may be another tutorial or somthing i don t really know,forgot when all this started.can t find out what s causing it at all,some clicks work while others don t this is the only tutorial i can think of that has somthing to do with the map. Link to comment Share on other sites More sharing options...
Dennys Posted June 18, 2009 Share Posted June 18, 2009 I just did this recently and it worked so you must be doing something wrongHeres the steps i toook:In ModGameLogic, Search for this: ```NewX = 10 NewY = 7 NewPlayerY = Player(MyIndex).y - NewY NewPlayerX = Player(MyIndex).X - NewX NewX = NewX * PIC_X NewY = NewY * PIC_Y NewXOffset = Player(MyIndex).xOffset NewYOffset = Player(MyIndex).yOffset If Player(MyIndex).y - 7 < 1 Then NewY = Player(MyIndex).y * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = 0 If Player(MyIndex).y = 7 And Player(MyIndex).Dir = DIR_UP Then NewPlayerY = Player(MyIndex).y - 7 NewY = 7 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If ElseIf Player(MyIndex).y + 9 > MAX_MAPY + 1 Then NewY = (Player(MyIndex).y - (MAX_MAPY - 14)) * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = MAX_MAPY - 14 If Player(MyIndex).y = MAX_MAPY - 7 And Player(MyIndex).Dir = DIR_DOWN Then NewPlayerY = Player(MyIndex).y - 7 NewY = 7 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If End If If Player(MyIndex).X - 10 < 1 Then NewX = Player(MyIndex).X * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = 0 If Player(MyIndex).X = 10 And Player(MyIndex).Dir = DIR_LEFT Then NewPlayerX = Player(MyIndex).X - 10 NewX = 10 * PIC_X NewXOffset = Player(MyIndex).xOffset End If ElseIf Player(MyIndex).X + 11 > MAX_MAPX + 1 Then NewX = (Player(MyIndex).X - (MAX_MAPX - 19)) * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = MAX_MAPX - 19 If Player(MyIndex).X = MAX_MAPX - 9 And Player(MyIndex).Dir = DIR_RIGHT Then NewPlayerX = Player(MyIndex).X - 10 NewX = 10 * PIC_X NewXOffset = Player(MyIndex).xOffset End If End If ScreenX = GetScreenLeft(MyIndex) ScreenY = GetScreenTop(MyIndex) ScreenX2 = GetScreenRight(MyIndex) ScreenY2 = GetScreenBottom(MyIndex) If ScreenX < 0 Then ScreenX = 0 ScreenX2 = 20 ElseIf ScreenX2 > MAX_MAPX Then ScreenX2 = MAX_MAPX ScreenX = MAX_MAPX - 20 End If If ScreenY < 0 Then ScreenY = 0 ScreenY2 = 15 ElseIf ScreenY2 > MAX_MAPY Then ScreenY2 = MAX_MAPY ScreenY = MAX_MAPY - 15 End If ```Replace with this: ```NewX = 12 NewY = 9 NewPlayerY = Player(MyIndex).y - NewY NewPlayerX = Player(MyIndex).x - NewX NewX = NewX * PIC_X NewY = NewY * PIC_Y NewXOffset = Player(MyIndex).xOffset NewYOffset = Player(MyIndex).yOffset If Player(MyIndex).y - 9 < 1 Then NewY = Player(MyIndex).y * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = 0 If Player(MyIndex).y = 9 And Player(MyIndex).Dir = DIR_UP Then NewPlayerY = Player(MyIndex).y - 9 NewY = 9 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If ElseIf Player(MyIndex).y + 11 > MAX_MAPY + 1 Then NewY = (Player(MyIndex).y - (MAX_MAPY - 18)) * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = MAX_MAPY - 18 If Player(MyIndex).y = MAX_MAPY - 9 And Player(MyIndex).Dir = DIR_DOWN Then NewPlayerY = Player(MyIndex).y - 9 NewY = 9 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If End If If Player(MyIndex).x - 12 < 1 Then NewX = Player(MyIndex).x * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = 0 If Player(MyIndex).x = 12 And Player(MyIndex).Dir = DIR_LEFT Then NewPlayerX = Player(MyIndex).x - 12 NewX = 12 * PIC_X NewXOffset = Player(MyIndex).xOffset End If ElseIf Player(MyIndex).x + 14 > MAX_MAPX + 1 Then NewX = (Player(MyIndex).x - (MAX_MAPX - 24)) * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = MAX_MAPX - 24 If Player(MyIndex).x = MAX_MAPX - 12 And Player(MyIndex).Dir = DIR_RIGHT Then NewPlayerX = Player(MyIndex).x - 12 NewX = 12 * PIC_X NewXOffset = Player(MyIndex).xOffset End If End If ScreenX = GetScreenLeft(MyIndex) ScreenY = GetScreenTop(MyIndex) ScreenX2 = GetScreenRight(MyIndex) ScreenY2 = GetScreenBottom(MyIndex) If ScreenX < 0 Then ScreenX = 0 ScreenX2 = 25 ElseIf ScreenX2 > MAX_MAPX Then ScreenX2 = MAX_MAPX ScreenX = MAX_MAPX - 25 End If If ScreenY < 0 Then ScreenY = 0 ScreenY2 = 19 ElseIf ScreenY2 > MAX_MAPY Then ScreenY2 = MAX_MAPY ScreenY = MAX_MAPY - 19 End If ```In ModDirectX, Search for this```Public Function GetScreenLeft(ByVal Index As Long) As Long GetScreenLeft = GetPlayerX(Index) - 11End FunctionPublic Function GetScreenTop(ByVal Index As Long) As Long GetScreenTop = GetPlayerY(Index) - 8End FunctionPublic Function GetScreenRight(ByVal Index As Long) As Long GetScreenRight = GetPlayerX(Index) + 10End FunctionPublic Function GetScreenBottom(ByVal Index As Long) As Long GetScreenBottom = GetPlayerY(Index) + 8End Function```Replace with this```Public Function GetScreenLeft(ByVal Index As Long) As Long GetScreenLeft = GetPlayerX(Index) - 13End FunctionPublic Function GetScreenTop(ByVal Index As Long) As Long GetScreenTop = GetPlayerY(Index) - 10End FunctionPublic Function GetScreenRight(ByVal Index As Long) As Long GetScreenRight = GetPlayerX(Index) + 13End FunctionPublic Function GetScreenBottom(ByVal Index As Long) As Long GetScreenBottom = GetPlayerY(Index) + 10End Function```Next, visit frmMirage and you should put things similiar to this![](http://i44.tinypic.com/2uzs2f4.png)After that just fix around everything else on the screen to make sure it all fits, also make sure you extend the Window itself, and you GUI Link to comment Share on other sites More sharing options...
Elena Posted June 19, 2009 Share Posted June 19, 2009 Okay, I got it to work.. somewhat. Now whenever I go to edit my map my mouse is severely misaligned from where I'm clicking. I'll click a spot to drop something and it'll show up like five tiles down and right from where I dropped it.. and also I'm getting a weird glitch thing at the end of the screen, but only at the bottom of the map. I editted the public functions in modDirectx to be bigger to compensate for the larger screen and it's still really weird looking, as if the tile repeats itself over and over. Link to comment Share on other sites More sharing options...
goku1993 Posted June 21, 2009 Share Posted June 21, 2009 that s the problem iv been having,but only the mouse glitch my screen is fine,just can t seem to find the mouse fix Link to comment Share on other sites More sharing options...
balgus Posted June 25, 2009 Share Posted June 25, 2009 Would someone be willing to explain how exactly those numbers are calculated? Link to comment Share on other sites More sharing options...
goku1993 Posted June 26, 2009 Share Posted June 26, 2009 just a though but by changing these won t the onclick for the mapeditor become messed up too?not sure about it though and i m not that good at vb6 Link to comment Share on other sites More sharing options...
Elena Posted June 28, 2009 Share Posted June 28, 2009 Okay, I figured out some stuff while trying to fix it. The reason why the mouse was misaligned with the x, y axis when placing things was because the New X and New Y are either too high or too low. You need to fiddle around with them until they fit your screen just right. For the 800x600 NewX should = 12 and New Y should = 9 as it says in the tutorial, but if you're making your screen bigger or smaller than that, then you need to fiddle with the numbers (bigger x,y for bigger picscreens and smaller for smaller screens) Also, the reason why sometimes the map skips on the sides or top/bottom is because the Public Functions need to also fit your Picscreen size. For example, for public function mine was screwing up because my Picscreen was at 600x806, I changed it to 600x800 and it works fine, those 6 pixels make a huge difference. For public functions GetScreen 13,10,13,10 you need to have your screen exactly at 600x800 no bigger no less otherwise you'll get the glitchy thing at the edge of your screen. At least this is what I have observed, it may be different for some of you but it's worth trying if you're still having trouble. Link to comment Share on other sites More sharing options...
goku1993 Posted June 28, 2009 Share Posted June 28, 2009 hmm tried doing it but now not all the clicks are messed up just some when i click lol,resolution was 600x806 too Link to comment Share on other sites More sharing options...
willmaia Posted August 27, 2009 Share Posted August 27, 2009 Hehehehe, This tutorial does not eclipse evolution 2.8? because I've tried everything and did not work… Link to comment Share on other sites More sharing options...
minipimp Posted August 29, 2009 Share Posted August 29, 2009 hey, Sorry to ask this question but what #'s would I change if I wanted my picscreen to have a Height of 490 and a width of 800? im a bit confused. :\if I could get some feedback that would be great and appreciated .Thanks Link to comment Share on other sites More sharing options...
X-Weaver Posted August 31, 2009 Share Posted August 31, 2009 uff i got the same problem when i click to draw the map it misalign Link to comment Share on other sites More sharing options...
X-Weaver Posted September 1, 2009 Share Posted September 1, 2009 FIXED xD only change scalemode to 03-PIXEL it will work xDDDDDwith 608 x 800 work full Link to comment Share on other sites More sharing options...
Harris6310 Posted September 27, 2009 Share Posted September 27, 2009 What would I put the NewX and NewY to if I want it 32 tiles wide and 24 tiles high? Link to comment Share on other sites More sharing options...
KenshinSensei Posted December 13, 2009 Share Posted December 13, 2009 I understand the idea that the resolution cannot change, but is there a way to make it so the map would not scroll at all, Im using 30/30 map sizes, and My players would prefer a non-scrolling map. Ive tried editing the source code, the last few things I have edited are coming along great, but so far this is the only thing thats getting in my way. Link to comment Share on other sites More sharing options...
evilbunnie Posted December 24, 2009 Share Posted December 24, 2009 In the server, In Data.ini changeSCROLLING=1TooScrolling=0Then delete all maps and run server. Link to comment Share on other sites More sharing options...
Noa Posted January 1, 2010 Share Posted January 1, 2010 Cool, excelent post. Ty. Link to comment Share on other sites More sharing options...
Zamin Posted January 1, 2010 Share Posted January 1, 2010 OK, so let me get this right. This edit does NOT stretch the screen and make everything look like crap?This simply increases the total size of the window which also allow's you to have more more tiles? I really don't wanna read 4 pages. lolThanks, please answer. And to the topic starter, pelase put a screenshot if possible. This avoids reading 'words' in the entire topic. :) Link to comment Share on other sites More sharing options...
bigtales Posted February 8, 2010 Share Posted February 8, 2010 But this only serves to enlarge but not to full screen.I like to put the screen saver as complete, without changing the resolution: Link to comment Share on other sites More sharing options...
teh jimpie Posted February 8, 2010 Share Posted February 8, 2010 Is this just the big client in eclipse stable?anyway, well done :) Link to comment Share on other sites More sharing options...
Muddy Posted February 28, 2010 Share Posted February 28, 2010 Alright straight up I need some help i've been trying to mess with it for a while but I havn't really gotten anywhere… My values are going to seem rather messed up i'm sure...Could we try to break down what each numerical value is controlling? The reason I ask is that I have an issue where all my map sizes are appropriate now but on the client they either have the very last row of X and last row of y as a gray area or a black area... it's like a fringe that's pulled over the player ... Can't map on it; it's like it's there but the client isn't rendering it as part of the world; the player can walk under the black/gray and theres no glitchy movement or anything... I just can't map on it and it's drawn OVER player in game...Correct me if i'm wrong on this but I removed the elseif's at first because they seemed to only relate to a scrolling map situation? I use static maps ... I'm aiming for 15x11Any thoughts? Heres the edits I had done;```NewX = 7 NewY = 5 NewPlayerY = Player(MyIndex).y - NewY NewPlayerX = Player(MyIndex).X - NewX NewX = NewX * PIC_X NewY = NewY * PIC_Y NewXOffset = Player(MyIndex).xOffset NewYOffset = Player(MyIndex).yOffset If Player(MyIndex).y - 5 < 1 Then NewY = Player(MyIndex).y * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = 0 If Player(MyIndex).y = 5 And Player(MyIndex).Dir = DIR_UP Then NewPlayerY = Player(MyIndex).y - 5 NewY = 5 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If ElseIf Player(MyIndex).y + 7 > MAX_MAPY + 1 Then NewY = (Player(MyIndex).y - (MAX_MAPY - 10)) * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = MAX_MAPY - 10 If Player(MyIndex).y = MAX_MAPY - 7 And Player(MyIndex).Dir = DIR_DOWN Then NewPlayerY = Player(MyIndex).y - 7 NewY = 7 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If End If If Player(MyIndex).X - 7 < 1 Then NewX = Player(MyIndex).X * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = 0 If Player(MyIndex).X = 7 And Player(MyIndex).Dir = DIR_LEFT Then NewPlayerX = Player(MyIndex).X - 7 NewX = 7 * PIC_X NewXOffset = Player(MyIndex).xOffset End If ElseIf Player(MyIndex).X + 9 > MAX_MAPX + 1 Then NewX = (Player(MyIndex).X - (MAX_MAPX - 15)) * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = MAX_MAPX - 18 If Player(MyIndex).X = MAX_MAPX - 7 And Player(MyIndex).Dir = DIR_RIGHT Then NewPlayerX = Player(MyIndex).X - 8 NewX = 8 * PIC_X NewXOffset = Player(MyIndex).xOffset End If End If ScreenX = 0 ScreenY = 0 ScreenX2 = 15 ScreenY2 = 11 If ScreenX < 0 Then ScreenX = 0 ScreenX2 = 15 ElseIf ScreenX2 > MAX_MAPX Then ScreenX2 = MAX_MAPX ScreenX = MAX_MAPX - 20 End If If ScreenY < 0 Then ScreenY = 0 ScreenY2 = 15 ElseIf ScreenY2 > MAX_MAPY Then ScreenY2 = MAX_MAPY ScreenY = MAX_MAPY - 15 End If``````Public Function GetScreenLeft(ByVal Index As Long) As Long GetScreenLeft = GetPlayerX(Index) - 12End FunctionPublic Function GetScreenTop(ByVal Index As Long) As Long GetScreenTop = GetPlayerY(Index) - 8End FunctionPublic Function GetScreenRight(ByVal Index As Long) As Long GetScreenRight = GetPlayerX(Index) + 12End FunctionPublic Function GetScreenBottom(ByVal Index As Long) As Long GetScreenBottom = GetPlayerY(Index) + 8End Function```now again I should mention I've messed with this enough that some of the numbers don't make sense to why I picked that number; but hell.. it's the closest to working that I've gotten it…Thanks fella's I appreciate the help; I've been on the forums for a few days now and figured okay I guess I'll post :(MSN [email protected]/[email protected] if you want;thanks for the responses.Edit: They're only black (the x y rows) @ night so I guess I juts still have the same ol' gray box problem. Link to comment Share on other sites More sharing options...
Muddy Posted February 28, 2010 Share Posted February 28, 2010 Double post due to found a solution;Right below the tutorials code edits is " If MAX_MAPX = 19 Then"changed it to 15 and it worked.. 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