Map edges, how can they be fixed? - Page 5

Map edges, how can they be fixed?

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Map edges, how can they be fixed?

Post by zwzsg »

So, when a map include its own solution for map edges, how does it tell the mod-side code that draw Forb's grid to switch itself off?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Map edges, how can they be fixed?

Post by knorke »

the part of smoth's post that was relevant:
(no idea how to duplicate posts so here it is again)
smoth wrote:Zwzsg:
Forb could add a trigger file to have the widget not turned on unless the map includes say enfranchiser.txt.
-----------------

still unsolved :roll:
trigger file seems bad, global widget variable (WG.allowGameToDrawMapEdges=true/false) seems better.
Or a real config file that also allows the game-widget to read some things from map like grid color, texture etc.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Map edges, how can they be fixed?

Post by smoth »

That is what I mean though, say like gundam's feature placer.. it can contain values but if it is not present at all, then the widget does nothing because it's config was not found..
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Map edges, how can they be fixed?

Post by AF »

Never has a new mod announcement been so unloved =(
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Map edges, how can they be fixed?

Post by zwzsg »

Maybe the mod-side widget could check the map archive for traces of Lua, then disable itself if it finds *.lua or a LuaRules or a LuaUI folder?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Map edges, how can they be fixed?

Post by smoth »

That would be bad, what if I want to include a widget with maps, pfft too bad not included.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Map edges, how can they be fixed?

Post by knorke »

evorts/grts: game devs are also map makers -> can do whatever they want
kernel panic: only played on specials maps: should be no conflicts
S44: only played on specials maps: should be no conflicts, game devs also make the maps (i think)

So it is only really a problem for games that use the big pool of old "one size fits all" maps.
Since none of those maps include a mapedge widget, it would have to be in the game anyway. At that point it makes sense that this game-widget "listens" for maps "trying to turn it off" via config files. And new maps with such widgets should include such files.

But so far, no mapedge-widget-map has been made for any mapedge-widget-mod. And I guess not many mapedge-widget-maps will be made. Mods could also include a list on which maps to disable the widget. (eg on Beheriths asteroid map, maps that have a fog widget etc)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Map edges, how can they be fixed?

Post by zwzsg »

No, the problem is what I want the maps I make to be playable with the Cursed, EvoRTS, and even GRTS, without having the VR grid forced on me.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Map edges, how can they be fixed?

Post by smoth »

z, at what point does the project get to have control over it's world?

what if something like a noborder.txt was all you needed to add to ensure I don't do any grid shit to your map?

What is to keep players from installing it into their luawidgets and saying lol at your maps?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Map edges, how can they be fixed?

Post by knorke »

What is to keep players from installing it into their luawidgets and saying lol at your maps?
If that happens the widget should read the configfile in the map and turns itself off. Atm the widget does not have that function, so it should ideally not be spread among players.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Map edges, how can they be fixed?

Post by smoth »

knorke wrote:
What is to keep players from installing it into their luawidgets and saying lol at your maps?
If that happens the widget should read the configfile in the map and turns itself off. Atm the widget does not have that function, so it should ideally not be spread among players.
and what if they disable the check. that is my point.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Map edges, how can they be fixed?

Post by zwzsg »

I would assume how the map looks belongs to the map. I'm ok with Forb's widget being used mod side as a failsafe when it's an old map that surely has unpretty border. I just want all you guys to settle on a method to autodisable it from the map when the map know what it does.

Tonight I tried my map project with the newly released Cursed, and was greeted by:

Image

So I'm not bitching just for the fun of it, I want to release V3 of that map in the next few days, and I want it to look pretty with The Cursed, EvoRTS, GRTS, etc... without the player having to fumble with the widget list.
what if something like a noborder.txt was all you needed to add to ensure I don't do any grid shit to your map?
Sure, whatever, as long as everybody agrees to follow it.

I'm asking for all coders to find a solution NOW, hopefully before map edge widgets have spread to far, to make sure every map edge widget thing will follow the same standard way to get disabled.

smoth wrote:What is to keep players from installing it into their luawidgets and saying lol at your maps?
Yes, if someone really wants to, he can always disfigure our work locally. That is not the point. The point is when a naive player download mod X and map Y, by default it works reasonably well without conflicts.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Map edges, how can they be fixed?

Post by smoth »

I cannot control what others do but how about this:



SUGGESTION FOR MAP EDGE WIDGETS:

ALL MAP EDGE WIDGETS MUST DISABLE THEMSELF IF THE MAP CONTAINS THE FILE:

NOMAPEDGEWIDGET.TXT


it will be located in the base map directory..


I cannot control everyone but I will go ahead and add support for it this weekend some time.

that fair enough?

I kindly request that others making a map edges widget do the same.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Map edges, how can they be fixed?

Post by knorke »

idea:
widget looks for config file named mapedges_config.lua in root folder of the map.

mapedges_config.lua looks like this:

options =
{
enabled = true, --should mod draw mapedges?
gridColor = {red=128,blue=64,green=255}, --color of the grid
gridTexture = "blub.png", --what texture to use (first look in map, then in mod)
tileSize = 64, --resolution of the grid
drawRange = 1000, --how far beyong map edge the grid is drawn

}
return options


The file returns a table with various entries:
The purple stuff is entirely optional - it is just so that mappers can adjust the look of the grid a bit. (think of it how sky or water color is adjustable)
If certain games/widgets do not use all entries that is okay too.
The important part is the enabled=true/false
enabled=false -> game widget disables itself

In case that is not clear: If a map does not want the game to draw mapedges:
Include such file:
mapedges_config.lua:
options ={enabled = false, }
return options
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Map edges, how can they be fixed?

Post by smoth »

whatever, I don't care.. just so people are happy and I can move along.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Map edges, how can they be fixed?

Post by zwzsg »

knorke: That seem very specific to grid based map edge cover solutions. What about mods that cover the map edges with noise, fog, the minimap texture, or novel exotic solutions?

Smoth's way seem more generic.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Map edges, how can they be fixed?

Post by knorke »

if the widget is looking for "gridColor" but only finds "noiseColor" then it simply uses its default for "gridColor." (and other way around)
or only do the enabled=true/false thing if you dont care about the rest.
But since it is a lua file you could also do configs like
if game=="the cursed" then enabled=true --cursed's widget looks ok with this map!
if game=="kernel panic" then enabled=false --kp's widget looks bad with this map!

and thus allow some games to draw stuff but overwrite it for others.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Map edges, how can they be fixed?

Post by zwzsg »

If the mapper has a precise idea of the kind of grid he wants, he'll put a nomapedgewidget.txt and his own grid widget anyway.

Also, jK tells me VFS_MAP not only doesn't work, but will never be implemented. So my idea of having the mod check if the map archive contains Lua folder or files is not possible.

So I say we go with smoth's idea, simple and more future-proof than complex config files:

Code: Select all

function widget:Initialize()
  if VFS.FileExists("nomapedgewidget.txt") then
    widgetHandler:RemoveWidget()
    return
  end
  -- rest of Initialize ....
end
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Map edges, how can they be fixed?

Post by knorke »

If the mapper has a precise idea of the kind of grid he wants, he'll put a nomapedgewidget.txt and his own grid widget anyway.
true.
And if the mod wants different looking mapedges for different maps (eg red edges on "red mars", yellow edges on "banana dunes") then the mod can include its own config stuff.

So nomapedgewidget.txt it is?
A Spring.Echo ("found nomapedgewidget.txt, removing myself") before the
widgetHandler:RemoveWidget()
might be good.
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Map edges, how can they be fixed?

Post by luckywaldo7 »

Pfff, you programmers and your difficult solutions.

Take a texture like Forb's and change the white to transparency, and magically get grid color matching to maps:

Image
Attachments
screen00016.jpeg
(225.05 KiB) Downloaded 2 times
Post Reply

Return to “Map Creation”