bluap Report post Posted May 26, 2008 (edited) Can you make it so that "show minimap" comes up as an option on the right click menu of the right HUD bar? I can take care of that one.... Edit: committed change. Edited May 26, 2008 by bluap Share this post Link to post Share on other sites
Florian Report post Posted May 26, 2008 As lots of people complain about a garbled minimap when they don't enable the framebuffer (or don't have sufficient hardware), maybe the minimap should check for framebuffer support. Share this post Link to post Share on other sites
Roja Report post Posted May 26, 2008 Another thing, can there be an option to use the old(current square) minimap? So you can toggle between the round rotating and the square one? Share this post Link to post Share on other sites
kibora Report post Posted May 26, 2008 (edited) The minimap is being drawn in two completely different ways with and without the framebuffer and the no framebuffer implementation was a pain in the a$$. Anyway with the sky implemented i think it's time to consider making the framebuffer a requriement to play the game Edit: Having both the minimaps would be a lot of work Edited May 26, 2008 by kibora Share this post Link to post Share on other sites
Schmurk Report post Posted May 26, 2008 Anyway with the sky implemented i think it's time to consider making the framebuffer a requriement to play the game Why? The sky doesn't use the framebuffer. However, it can be a requirement for the minimap feature. Share this post Link to post Share on other sites
kibora Report post Posted May 26, 2008 I don't see clouds/stars/sun/moon when the framebuffer is disabled Share this post Link to post Share on other sites
kibora Report post Posted May 26, 2008 Fixed the bug, reported by piiia (http://www.eternal-lands.com/forum/index.php?showtopic=43453&view=findpost&p=445111) https://developer.berlios.de/patch/index.ph...p;group_id=1256 Share this post Link to post Share on other sites
Schmurk Report post Posted May 27, 2008 I just have a little question regarding the framebuffer. I didn't take time to look at the code yet but I would like to know why the use of the framebuffer is needed for the minimap? Share this post Link to post Share on other sites
kibora Report post Posted May 27, 2008 Well it's not, but the map looks better with it. The reason is that when you draw it with framebuffer on, you can simply draw the whole map texture on the framebuffer and then take only the circle we are interested in. And when not using a framebuffer, we have to take only those parts of the map texture, which are going to be drawn. Share this post Link to post Share on other sites
Schmurk Report post Posted May 27, 2008 How are you doing without the framebuffer? Are you using the stencil buffer? If not, I think it's the solution for all your problems and you can skip the use of the framebuffer. Share this post Link to post Share on other sites
kibora Report post Posted May 27, 2008 I'm not sure about it. You see, the framebuffer is being used as a texture itself (bind_texture_id(minimap_fbo_texture). The stencil buffer, as far as i can see, is different. Basicly when you draw the map texture without the framebuffer you need to take only the part, which is in grey (on the pic). If there was something like glScissor, which allows to define a circular region, it would work. Share this post Link to post Share on other sites
Schmurk Report post Posted May 27, 2008 If there was something like glScissor, which allows to define a circular region, it would work. Yes, it's the stencil buffer. Basically, it works like this: glClearStencil(0); // set the clear value, 0 here glClear(GL_STENCIL_BUFFER_BIT); // clear the buffer glEnable(GL_STENCIL_TEST); // enable the stencil test // the 2 following lines are to tell to put a 1 in the buffer for each things you'll draw now (see the doc for more details) glStencilFunc(GL_ALWAYS, 1, 1); glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); // disable the drawing in the current buffer (not sure if it's useful though but just in case...) glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glDepthMask(GL_FALSE); /* draw your shape here, a circle in your case */ // then tell the stencil test to allow display only on pixels that are set to 1 in the stencil buffer glStencilFunc(GL_EQUAL, 1, 1); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); // re-enable the drawing in the current buffer glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); glDepthMask(GL_TRUE); /* draw the rest of stuff here, the minimap in your case */ glDisable(GL_STENCIL_TEST); // disable the stencil test You can have a look at the reflection code for an example. This technique is used when the framebuffer is not available. Share this post Link to post Share on other sites
kibora Report post Posted May 27, 2008 That works thanks. I'll try to clear the code Share this post Link to post Share on other sites
bluap Report post Posted May 27, 2008 Checking back through the original minimap2 patch of kibora's that I applied, I notice load_bmp8_fixed_alpha_with_transparent_color() in textures.c contains some SKY_FPV_CURSOR #defines and that SKY_FPV_CURSOR has been removed from the client. May be someone (kibora/Schmurk) could check that code and tidy it up. Sorry I missed this before... Share this post Link to post Share on other sites
Schmurk Report post Posted May 28, 2008 The SKY_FPV_CURSOR has been splitted into SKY_FPV and NEW_CURSOR so these flags have to be replaced by NEW_CURSOR. Share this post Link to post Share on other sites
kibora Report post Posted May 28, 2008 No idea what it should be. I simply based that function on one of the existing ones Share this post Link to post Share on other sites
kibora Report post Posted May 28, 2008 Here's a patch with no framebuffer. Also i added an option in the Controls options to disable the rotation (for those who don't like it). https://developer.berlios.de/patch/index.ph...p;group_id=1256 Share this post Link to post Share on other sites
Vegar Report post Posted May 28, 2008 (edited) The patch works here, but I noticed what seems to be a small copy-paste error: + add_var(OPT_BOOL,"rotate_minimap","itemdrop",&rotate_minimap,change_var,1,"Rotate minimap","Toggle whether the minimap should rotate.",CONTROLS); The Fog of War doesn't seem to be drawn anymore. Is that a bug of a feature? Edited May 28, 2008 by Vegar Share this post Link to post Share on other sites
kibora Report post Posted May 28, 2008 Emm there is no fog of war in the rotating minimap but yes, thet "itemdrop" should be "rotateminimap" i suppose. I'm not sure what's that string for Share this post Link to post Share on other sites
bluap Report post Posted May 30, 2008 Here's a patch with no framebuffer. Also i added an option in the Controls options to disable the rotation (for those who don't like it).Patch committed. Share this post Link to post Share on other sites
kibora Report post Posted May 31, 2008 Roja, the new compass texture is not perfectly round. It has black pixels right of the E and bellow the S. And black pixels are transparent. When the map is lighter you see some light pixels at those places Share this post Link to post Share on other sites
Rehdon Report post Posted July 3, 2008 Hi all, I'm following bluap's suggestion and posting some remarks about the mini-map. IMHO this is a very nice feature in the game, but the latest incarnation (as of 1.7.0 RC2) presents some regressions wrt the old, "square" version: - would it be possible to bring back the "sticky" feature for the mini-map? having it always open, even after closing all other windows with alt-d, was a great commodity; - the older version allowed for a much more powerful zoom function: would be nice to have it back, as well! - the small titlebar doesn't look bad, but would it be possible to make the minimap draggable by clicking on the frame alone? the close button could be blended in the frame (if possible ; - the size is also quite smaller than the previous version, I love it being circular (much more elegant) but the fact that it's a little smaller, combined with the trimming of the angles, makes the visible area a bit tiny. The first two points are the most important I guess. Thanks a lot to all devs involved! Rehdon Share this post Link to post Share on other sites
Mar(c) Report post Posted July 4, 2008 I agree with most of Rehdon's points! First of all, I really like the minimap, awesome work! Some things I want to add: I'd like to see the minimap "stick" between sessions too (save in el.cfg if it's open or not). I really miss the fog-of-war functionality. The dots look somewhat clumsy atm -- can they be made a bit more subtle? Also, I still<{POST_SNAPBACK}> would like to see the compass with a rotating scale as well (btw, it has been like that in the far past ), and some option to have only one of them visible at any time (either the minimap or the compass; sort of "minimizing" the minimap to the compass, "restoring" the compass to the minimap) -- is something like this possible/wanted? Share this post Link to post Share on other sites
Roja Report post Posted July 5, 2008 - the older version allowed for a much more powerful zoom function: would be nice to have it back, as well! - the size is also quite smaller than the previous version, I love it being circular (much more elegant) but the fact that it's a little smaller, combined with the trimming of the angles, makes the visible area a bit tiny. The smaller size I requested because the larger size was just way too big. The only way you'd use it is if you're in a high resolution at full screen I guess, which if possible to have an option to make it larger/smaller would be fine. And I think there was some problem with the zoom being greater, I don't remember. But right now it's working fine. Share this post Link to post Share on other sites