Custom map/minimap overlay

Moderator: GZDoom Developers

Post Reply
User avatar
AFADoomer
Posts: 1326
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Custom map/minimap overlay

Post by AFADoomer »

OK, it's been a couple of years, so once again I'm submitting this (redone from scratch again)...

Image

Console Command:
enableminimap [x origin] [y origin] [width] [height]

ACS Action Special:
DrawMap([x origin], [y origin], [width], [height], [stay on screen]);

The origin x and y values behave similarly to hudmessage positioning (-1.0 to 1.0 range, or .0, .1, .2 decimals with SetHudSize used). The console command behaves as though the hud size is set to 320x200, while the ACS command respects the SetHudSize() command, and scales the map appropriately when it's used.

If [stay on screen] is 1 then the map toggles between the full map and the minimap, without ever turning the automap off completely. If it's 0, then the minimap is added to the rotation, similarly to how the overlay map currently behaves. This does NOT allow the map to be disabled/turned off completely.

The map above was set up with this ACS code:

Code: Select all

script 1 (void)
{
	SetHudSize(320, 200, 1);
	DrawMap(318.2, 2.1, 70.0, 70.0, 0);
}
or could be added by the player (doesn't save across games/sessions, but could be a keybind) with:

Code: Select all

enableminimap 318.2, 2.1, 70.0, 70.0
Attachments
Minimap.diff.txt
.diff from SVN 3640
(9.33 KiB) Downloaded 350 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Custom map/minimap overlay

Post by Graf Zahl »

It's a good start but it needs some work to be included, especially this short before a release:

- the minimap is always opaque. Overlay should also be specifiable (then using overlay colors)
- toggling the actual automap switches off the minimap when am_overlay is 2.
- when the minimap is on the Automap HUD is displayed not the game HUD
- floats are crap. Use doubles! (No kidding here. The code produced for floats is magnitudes slower and larger)
- no state is saved. This has to be respecified each launch if done from the console
- enabling and positoning should be separate actions
- the feature needs to be able to handle the case where the user has enabled the minimap and a map also sets it. The user's preference is lost if that happens.


I'm afraid that with these issues it can't be added.
I created a new branch so this can be worked on without piling up code in large patches but as it is it's still too unfinished for including into the trunk.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Custom map/minimap overlay

Post by Nash »

At least we know the source is in safe hands now with the branch and will not be lost again... :3
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Custom map/minimap overlay

Post by Enjay »

This is a nice and often requested feature so it would be good to see it added. As well as Graf's list, should the options be added to the automap menu too? At least, IMO, enabling/disabling should and perhaps the possibility of binding a key to enabling/disabling in the key configuration menu as well. I'm not sure how positioning would handled in the menu. Perhaps just 4 choices (one for each corner), with better tailoring possible via ACS, MAPINFO, SBARINFO or whatever?
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Custom map/minimap overlay

Post by Gez »

Enjay wrote:SBARINFO
Definitely. It needs to become one of the things that SBARINFO can use. DrawMinimap(top, left, bottom, right) or something like that.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Custom map/minimap overlay

Post by Tormentor667 »

This is awesome :)
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Custom map/minimap overlay

Post by Blzut3 »

Gez wrote:Definitely. It needs to become one of the things that SBARINFO can use. DrawMinimap(top, left, bottom, right) or something like that.
Well at this point I think it would need to be named something other than "draw" since it wouldn't respect the command order.

I wonder how feasible it would be to get the automap to draw onto a texture? If that was possible, and you could specify the origin point and view size, you could probably use them in maps for hints on what a switch does and stuff like that, but ultimately it would allow the mini map to be a part of the statusbar and not just a floating layer.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Custom map/minimap overlay

Post by Nash »

Draw automap to texture... yes please!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Custom map/minimap overlay

Post by Graf Zahl »

Too bad that this died. It was such a promising beginning... :(
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Custom map/minimap overlay

Post by Nash »

Nooooooooooooooooooooo :(

But the branch is still inside ZDoom right? I mean if AFADoomer comes back and finishes it, cleans it up and makes it merge-ready, he can just make a new thread right... ?!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Custom map/minimap overlay

Post by Graf Zahl »

The code is still there, but since nothing has happened here, why keep the dead thread around? The feature as present is grossly incomplete and nobody has worked on it for almost 4 years.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”