Custom map/minimap overlay

Moderator: GZDoom Developers

User avatar
AFADoomer
Posts: 1248
Joined: Tue Jul 15, 2003 4:18 pm

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
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48043
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: 17296
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

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: 26418
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

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: 17654
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: 13462
Joined: Wed Jul 16, 2003 3:52 am

Re: Custom map/minimap overlay

Post by Tormentor667 »

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

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: 17296
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

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: 48043
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: 17296
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

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: 48043
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.

Return to “Closed Feature Suggestions”