Ertzel Posted September 30, 2012 Author Share Posted September 30, 2012 I changed it in my version for Eclipse Mega so it stores the NPC and Event data like the code in that quote by me. Then it doesn't do the calculations every time it draws the map, only when the NPC or event is updated.I didn't change it for players though because the way I have players setup is they only display party members that are on your same map, no one else.I might update this tutorial using the reduced memory version when I have time later. Link to comment Share on other sites More sharing options...
jcsnider Posted September 30, 2012 Share Posted September 30, 2012 Yes, he means store the data in a UDT somewhere until it needs to be changed instead of re-calculating the positions every time the minimap updates… if you wanna be that picky then write it yourself there is no need to complain about it here, the performance hit is minimal at best. Link to comment Share on other sites More sharing options...
JohnPony Posted September 30, 2012 Share Posted September 30, 2012 > Yes, he means store the data in a UDT somewhere until it needs to be changed instead of re-calculating the positions every time the minimap updates… if you wanna be that picky then write it yourself there is no need to complain about it here, the performance hit is minimal at best.I'm not using this JC, nor am i bitching about it.I'm just giving him advice on how to improve the existing code to be more efficient, is there something wrong with that?One thing may seem insignificant at first, but a ton of poorly optimized features will slow down any project quickly. Link to comment Share on other sites More sharing options...
Ertzel Posted September 30, 2012 Author Share Posted September 30, 2012 Yes yes, It's already been updated in my engine and I'll get around to updating this thread later. Link to comment Share on other sites More sharing options...
tslusny Posted October 1, 2012 Share Posted October 1, 2012 Hey ertz do you know that you can make this only with white.png texture what is located in misc folder and with DX8 recoloring? ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) its only thought but it is possible Link to comment Share on other sites More sharing options...
Draco.exe Posted October 1, 2012 Share Posted October 1, 2012 here's the minimap image without the pink background if someone want's to use it (it's a .png image with transparent background)![](http://www.freemmorpgmaker.com/files/imagehost/pics/fbf0a9c45fbb6655196f0525ef2490ac.png)URL for the image: [http://www.freemmorpgmaker.com/files/imagehost/pics/fbf0a9c45fbb6655196f0525ef2490ac.png](http://www.freemmorpgmaker.com/files/imagehost/pics/fbf0a9c45fbb6655196f0525ef2490ac.png)Ertzel, add to the first message if you want ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Ertzel Posted October 1, 2012 Author Share Posted October 1, 2012 Updated the original post with a re-done version of the tutorial. Now player x/y values are stored and only calculated when needed and same with npc x/y values. Also removed the need for the graphics image and used Death's suggestion of just the white square and editing the color through DX8.New Color Codes areEvent With Name = YellowEvent Without Name = Dark BlueDefault tile = WhiteBlock Tile = RedWarp Tile = PurpleItem Tile = GreenPK Player = Dark RedNon-PK = Light GreenNPC Attack On Sight = BlackNPC ATtack When Attacked = Dark PurpleNPC SHopkeeper = OrangeNPC Friendly = PinkNPC Guard = Light BlueAnd a example of how it now looks ![](http://www.freemmorpgmaker.com/files/imagehost/pics/cf2831ecd53f42a5b77bf30028c174ed.png) Link to comment Share on other sites More sharing options...
JohnPony Posted October 1, 2012 Share Posted October 1, 2012 Glad to see you took my advice, have a cookie.![](http://thinkprogress.org/wp-content/uploads/2011/04/cookie.gif) Link to comment Share on other sites More sharing options...
TheLordOfTheManor Posted October 1, 2012 Share Posted October 1, 2012 MiniMap only seems to show up on high resolution, anyway to make it show on all? Link to comment Share on other sites More sharing options...
Ertzel Posted October 1, 2012 Author Share Posted October 1, 2012 If you mean when you play around with resolutions in Dragon Eclipse, that would be because its probably drawn off-screen on any other resolution.You would have to do this:At the top of```DrawMiniMap()```add```Dim CameraXSize As Long, CameraYSize As Long CameraXSize = frmMain.Width - (frmMain.Width - 780)```Then replace everything that says```CameraX = 780 -```with```CameraX = CameraXSize -```That way it calculates the X based off your frmMain width instead of a static number.I updated the original post with this change since it makes sense for all versions and will help people with Dragon Eclipse, Link to comment Share on other sites More sharing options...
draginvoke5 Posted October 1, 2012 Share Posted October 1, 2012 Thank you very much for this Ertzel! I really appreciate it ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
or3o Posted October 2, 2012 Share Posted October 2, 2012 > Glad to see you took my advice, have a cookie.> > ![](http://thinkprogress.org/wp-content/uploads/2011/04/cookie.gif)shoulda been an oreo…. Also it works perfectly but it cuts the framerate in half. just make sure to add a button in options to disable the minimap on slower pcs. Link to comment Share on other sites More sharing options...
Ertzel Posted October 2, 2012 Author Share Posted October 2, 2012 Ya, I was going to make an option in the option window but its annoying to edit options due to my failed photo-editing option to edit the picture. If someone wants to upload the 21.png file with MiniMap and the On/Off buttons below Debug, I'll add how to put in the new option into the tutorial. Link to comment Share on other sites More sharing options...
or3o Posted October 2, 2012 Share Posted October 2, 2012 Just make a checkbox just like all the other options in pic options ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) and i added a new tiletyp thats exactly the same as a blocked tile except its called water and shows up blue on the minimap, looks pretty cool lol. thx for the tut Link to comment Share on other sites More sharing options...
damian666 Posted October 2, 2012 Share Posted October 2, 2012 perhaps the minimap should be updated when somethign changes then, instead of always, that should help in the framerate dropping i think. Link to comment Share on other sites More sharing options...
Exception Posted October 2, 2012 Share Posted October 2, 2012 Render the minimap once to a buffer, and continue rendering that buffer until you have the need to change (ie, when you switch maps). Just doing it in an array looping like the tiles is rather unweildy.If you really need to show the positions of other players/NPCs, then that can at least be rendered as it is. Link to comment Share on other sites More sharing options...
Zopto Posted October 2, 2012 Share Posted October 2, 2012 Dose when you make map biger and minimap get biger ??? Link to comment Share on other sites More sharing options...
TheLordOfTheManor Posted October 2, 2012 Share Posted October 2, 2012 > If you mean when you play around with resolutions in Dragon Eclipse, that would be because its probably drawn off-screen on any other resolution.> > You would have to do this:> > At the top of```> DrawMiniMap()> ```add```> > Dim CameraXSize As Long, CameraYSize As Long> > CameraXSize = frmMain.Width - (frmMain.Width - 780)> > ```> > Then replace everything that says```> > CameraX = 780 -> > ```with```> > CameraX = CameraXSize -> > ```> > That way it calculates the X based off your frmMain width instead of a static number.> > I updated the original post with this change since it makes sense for all versions and will help people with Dragon Eclipse,Doesn't work, tried this then tried to re-do the main tutorial. Link to comment Share on other sites More sharing options...
blkcrow Posted October 2, 2012 Share Posted October 2, 2012 this is the problem```CameraXSize = frmMain.Width - (frmMain.Width - 780)```CameraXSize will always be 780 no matter what frmMain.Width is Link to comment Share on other sites More sharing options...
Ertzel Posted October 2, 2012 Author Share Posted October 2, 2012 Change CameraXSize from```CameraXSize = frmMain.Width - (frmMain.Width - 780)```to```CameraXSize = MAX_MAPX * 32 + 1```Also changed the this in the main tutorial to use this same calculation. Link to comment Share on other sites More sharing options...
or3o Posted October 3, 2012 Share Posted October 3, 2012 This tutorial works perfectly with 3.0 by the way. Link to comment Share on other sites More sharing options...
TheLordOfTheManor Posted October 5, 2012 Share Posted October 5, 2012 How can I make a disable option? You know, for the slower PCs. Link to comment Share on other sites More sharing options...
or3o Posted October 5, 2012 Share Posted October 5, 2012 find this```' Render the minimapDrawMiniMap```and replace it with something like this```if chkmap.value = false then drawminimapend if```that was the mini map is on by deafult. you gotta make a checkbox called chk map to use it tho. Link to comment Share on other sites More sharing options...
TheLordOfTheManor Posted October 6, 2012 Share Posted October 6, 2012 > find this```> ' Render the minimap> > DrawMiniMap> > ```and replace it with something like this```> if chkmap.value = false then> > drawminimap> > end if> ```that was the mini map is on by deafult. you gotta make a checkbox called chk map to use it tho.Thanks! Link to comment Share on other sites More sharing options...
farrel24 Posted October 14, 2012 Share Posted October 14, 2012 how to Fix this?Error desc = Medhod or data member not found' Draw Tile AttributeFor x = 0 To MapXFor y = 0 To MapYFor I = 1 To Map**.CurrentEvents**If Map.MapEvents(I).visible = 1 ThenIf Map.MapEvents(I).x = x ThenIf Map.MapEvents(I).y = y ThenCameraX = CameraXSize - (MapX * 4) + (x * 4)CameraY = 55 + (y * 4)Select Case Map.MapEvents(I).ShowNameCase 0 ' TileRenderTexture Tex_White, CameraX, CameraY, EventTileRect.Left, EventTileRect.Top, EventTileRect.Right - EventTileRect.Left, EventTileRect.Bottom - EventTileRect.Top, EventTileRect.Right - EventTileRect.Left, EventTileRect.Bottom - EventTileRect.Top, D3DColorRGBA(0, 0, 155, 200)Case 1 ' SpriteRenderTexture Tex_White, CameraX, CameraY, EventNpcRect.Left, EventNpcRect.Top, EventNpcRect.Right - EventNpcRect.Left, EventNpcRect.Bottom - EventNpcRect.Top, EventNpcRect.Right - EventNpcRect.Left, EventNpcRect.Bottom - EventNpcRect.Top, D3DColorRGBA(255, 255, 0, 200)End Select 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