Author Topic: Radar Concept  (Read 2040 times)

NOTICE: This is purely for testing purposes.

So, I've seen the "Radar" topic. It's completely possible with engine changes, but it might also be possible without it. The attached picture has not been photoshopped at all. This is purely HUD screenshot.

Ya, the problem is your using a FOV that stretches things to a useless point. AND you can only see above yourself when your looking down.

Ya, the problem is your using a FOV that stretches things to a useless point. AND you can only see above yourself when your looking down.

What if a script was made, where you hold a button down. When you start holding, it pitch()'es down, and shows the HUD. Then, when released, pitch()'es back, and removes the HUD?

New picture with less FOV:

I could just get the same effect by changing the FOV in the console and then be able to see anything above my head in the direction I'm facing, which is a lot more useful than just a top-down perspective and it doesn't really make a useful radar. I suppose you could make a cool dynamic map GUI with it. It'd be totally client sided too.

I think you are better off just skipping the image. I mean seriously, how many pictures of radar have you seen in movies include the radar image layered over a satellite image tracking the boat? At best you might get a GPS map with terrain contours on it, or something like a GPS in a car with a road overlay. And this isn't radar it's GPS.

I haven't played it because I have no interest in the server but Diggy's Metropolis RPG seems to already have radar in it.

So make a working radar first. We actually need a public radar mod for this to go in, unless you just plan on handing your code off to Diggy and having it disappear into the black hole of private mods. Worry about the pictures later. If you can't find a way to make the image then one method which should work is that you could just provide documentation for mappers to produce a radar.png to put in the map folder of every map they release. Then the radar mod could just pull it out of the map folder, and if it didn't exist, it could fall back to a static white noise tv effect instead. Include radar maps for the default maps with the mod. Slate style maps could just use the bottom sky or water textures. The server mod should be able to pick through a map and figure out if it's a slate map (has slate.dif in it) and then pick the water texture first, and if there is none, fall back to the sky texture.
« Last Edit: March 13, 2010, 11:35:48 AM by Wedge »

I could just get the same effect by changing the FOV in the console and then be able to see anything above my head in the direction I'm facing, which is a lot more useful than just a top-down perspective and it doesn't really make a useful radar. I suppose you could make a cool dynamic map GUI with it. It'd be totally client sided too.

I think you are better off just skipping the image. I mean seriously, how many pictures of radar have you seen in movies include the radar image layered over a satellite image tracking the boat? At best you might get a GPS map with terrain contours on it, or something like a GPS in a car with a road overlay. And this isn't radar it's GPS.

I haven't played it because I have no interest in the server but Diggy's Metropolis RPG seems to already have radar in it.

So make a working radar first. Worry about the pictures later. If you can't find a way to make the image then one method which should work is that you could just provide documentation for mappers to produce a radar.png to put in the map folder of every map they release. Then the radar mod could just pull it out of the map folder, and if it didn't exist, it could fall back to a static white noise tv effect instead. Include radar maps for the default maps with the mod. Slate style maps could just use the bottom sky or water textures. The server mod should be able to pick through a map and figure out if it's a slate map (has slate.dif in it) and then pick the water texture first, and if there is none, fall back to the sky texture.

I was thinking about a GUI map, but I dunneh how to convert the X, Y, Z position into a position on the GUI.

Also
Code: [Select]
for(%i=0;%i<ServerConnection.getCount();%i++)
{
    %obj = ServerConnection.getObject(%i);
    if(%obj.getClassName() $=fxDTSBrick)
    {
        %pos = getWords(%obj.getTransform(),0,3);
        echo("Brick of type "@%obj.getDatablock().uiName@" at "@%pos);
    }
}
« Last Edit: March 13, 2010, 11:45:02 AM by Bauklotz »

Mega win, pm me it plz :))))

ok, wait, here is what I think you guys are saying:

The radar thing is from the brick on the roof of an area, and your using events to show anything under it, and a gUI to show the image right?

All the paragraphs are making it hard to read everything

The radar thing is from the brick on the roof of an area, and your using events to show anything under it, and a gUI to show the image right?
The image in the corner was made by copying the standard view and zooming it out so far that you can see everything.

I was thinking about a GUI map, but I dunneh how to convert the X, Y, Z position into a position on the GUI.

Also
Code: [Select]
for(%i=0;%i<ServerConnection.getCount();%i++)
{
    %obj = ServerConnection.getObject(%i);
    if(%obj.getClassName() $=fxDTSBrick)
    {
        %pos = getWords(%obj.getTransform(),0,3);
        echo("Brick of type "@%obj.getDatablock().uiName@" at "@%pos);
    }
}
Why the hell can't you use %obj.getPosition()?

Why the hell can't you use %obj.getPosition()?
You can't use it client sided.

%pos = %obj.getTransform();
%x = getword(%pos,0);
%y = getword(%pos,0);

Then the Z determines how light/dark the color used to show the brick is.

%pos = %obj.getTransform();
%x = getword(%pos,0);
%y = getword(%pos,0);

Then the Z determines how light/dark the color used to show the brick is.

I'm using Z to determine which brick should be shown on the top of the image.

Also, just arrived:
Code: [Select]
// Brick Map Tests
// Bauklotz

function reloadBrickMap()
{
$bricks=0;
for(%i=0;%i<ServerConnection.getCount();%i++)
{
%obj=ServerConnection.getObject(%i);
if(%obj.getClassName() $=FxDTSBrick)
{
%realpos = getWords(%obj.getTransform(),0,2);
%xpos = getSubStr(getWord(%realpos,0),0,4);
%ypos = getSubStr(getWord(%realpos,1),0,4);
%height = getWord(%obj.getTransform(),2);
$bricks++;
echo(%obj.getDataBlock().uiName SPC "brick detected at" SPC %x SPC %y);
if($BrickMap::isBrick[%xpos SPC %ypos])
{
if(%height >> $BrickMap::brickHeight[%xpos SPC %ypos])
{
$BrickMap::isBrick[%xpos SPC %ypos] = 1;
$BrickMap::brickHeight[%xpos SPC %ypos] = %height;
$BrickMap::brickType[%xpos SPC %ypos] = %obj.getDatablock().uiName;
echo("Registered brick as highest at position.");
}
}
else
{
$BrickMap::isBrick[%xpos SPC %ypos] = 1;
$BrickMap::brickHeight[%xpos SPC %ypos] = %height;
$BrickMap::brickType[%xpos SPC %ypos] = %obj.getDatablock().uiName;
echo("Registered brick as highest at position "@%height@".");
}
}
}
}

reloadBrickMap();


That looks like it's going to be both ridiculously slow to run and will also eat up your memory pretty fast.