Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Era Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=162)
-   -   Update minimap (https://forums.graalonline.com/forums/showthread.php?t=134263045)

papajchris 04-29-2011 11:27 PM

Update minimap
 
Someone should update the minimap it only takes a minute

cbk1994 04-29-2011 11:27 PM

Quote:

Originally Posted by papajchris (Post 1646492)
it only takes a minute

Wrong.

papajchris 04-29-2011 11:28 PM

Quote:

Originally Posted by cbk1994 (Post 1646493)
Wrong.

Did things change in past few years? It's certainly been a while for me, but it's just an image. Update the image.

cbk1994 04-29-2011 11:30 PM

Quote:

Originally Posted by papajchris (Post 1646494)
Did things change in past few years? It's certainly been a while, but it's just an image. Update the image.

And how do you suppose you make the image?

papajchris 04-29-2011 11:31 PM

Download the gmap to the editor.... Press M. It says "Would you like to generate a map image?" You click yes... Bam

cbk1994 04-29-2011 11:33 PM

Quote:

Originally Posted by papajchris (Post 1646499)
Download the gmap to the editor.... Press M. It says "Would you like to generate a map image?" You click yes... Bam

What editor are you using?

papajchris 04-29-2011 11:34 PM

The basic level editor. When in edit mode press M, and it should work. I didn't test it today, but i have made numerous mini maps through that way in the past

cbk1994 04-29-2011 11:35 PM

Quote:

Originally Posted by papajchris (Post 1646501)
The basic level editor. When in edit mode press M, and it should work. I didn't test it today, but i have made numerous mini maps through that way in the past

GraalEditor.exe does not ask you to generate a map image, and the ones it does show look like garbage iirc (that is, if you can get it to work). I made the current one a long time ago by stitching images together and resizing. Granted, it's a lot easier now with NW2PNG, but it's not a one minute operation.

papajchris 04-29-2011 11:38 PM

Quote:

Originally Posted by cbk1994 (Post 1646503)
GraalEditor.exe does not ask you to generate a map image, and the ones it does show look like garbage iirc (that is, if you can get it to work). I made the current one a long time ago by stitching images together and resizing. Granted, it's a lot easier now with NW2PNG, but it's not a one minute operation.

I just tried it and it worked (not sure about quality as i dont have a whole gmap to test it with)

Rufus 04-29-2011 11:38 PM

Quote:

Originally Posted by cbk1994 (Post 1646503)
GraalEditor.exe does not ask you to generate a map image

Press M?

cbk1994 04-29-2011 11:52 PM

Quote:

Originally Posted by Rufus (Post 1646505)
Press M?

Unless I'm mistaken...

Quote:

Originally Posted by cbk1994 (Post 1646503)
GraalEditor.exe does not ask you to generate a map image


Rufus 04-29-2011 11:54 PM

Quote:

Originally Posted by cbk1994 (Post 1646508)
Unless I'm mistaken...

So tell it to make one by pressing M?

fowlplay4 04-30-2011 12:00 AM

Nitpicking itt.

papajchris 04-30-2011 12:01 AM

Do you use a Mac chris? Maybe that is why

cbk1994 04-30-2011 02:22 AM

Quote:

Originally Posted by Rufus (Post 1646509)
So tell it to make one by pressing M?

:oo:

I pointed out that it doesn't ask you to make a map because I figured he might have been using Gonstruct or some other level editor I've not heard of. I wasn't doing it to be nitpicky.

Quote:

Originally Posted by papajchris (Post 1646511)
Do you use a Mac chris? Maybe that is why

Not for running GraalEditor.

Supaman771 04-30-2011 02:42 AM

Didn't some guy make a auto-stitching tool for gmaps to generate an image?

I saw it somewhere on the forums, I forget where though.

cbk1994 04-30-2011 03:28 AM

Quote:

Originally Posted by Supaman771 (Post 1646545)
Didn't some guy make a auto-stitching tool for gmaps to generate an image?

I saw it somewhere on the forums, I forget where though.

Quote:

Originally Posted by cbk1994 (Post 1646503)
it's a lot easier now with NW2PNG

Quote:

Originally Posted by cbk1994 (Post 1623819)
I created a GUI for this.

http://u.graalcenter.org/i/Capture%2...17.59%20AM.pnghttp://u.graalcenter.org/i/windoze.png

The source and the binary are attached. To use it, download NW2PNG.jar.zip, and launch the JAR file inside the ZIP. Most operating systems should let you double click it to open it, otherwise launch it via a command prompt with the command "java -jar NW2PNG.jar".

Changes from the original:
  • Now cross-platform compatible
  • Fixed a bug causing a crash if NPCs were at a non-integer x/y (such as 20.5)
  • Levels and GMAPs can now be scaled to a variety of scales (1:1, 1:2, 1:4, 1:16, 1:32, 1:64)
  • Now loads images from the Graal folder; you don't have to put them in images/* now
  • You can specify the tileset (selects pics1.png by default if it can find your Graal installation)
  • You can specify the source
  • You can specify the output file

If you're generating an image for a large map or the program freezes in the middle of generating an image, you probably need to increase the heap size so it can use more memory. Open a command prompt and run the program with "java -Xmx3000m -jar NW2PNG.jar", replacing 3000 with the amount of memory (in MB) you want it to be able to use.

I tested this on Ubuntu, Windows 7, and Mac. It was able to generate a 27 MB 1:1 image of Era's map (which is 14x19), although it took about 10 minutes to generate since there was a lot of memory swapping involved.

I haven't gotten born2kill's permission to do this, but since he published his source code I assume he's okay with it. My source code is released into the public domain.

..

DustyPorViva 04-30-2011 06:02 AM

I'm lost, are you saying GraalEditor's mapping functionality doesn't work for you or what? Because it works for me, and most others... how else do you think servers have been generating their bigmaps? If that's not the case, then what the **** are you talking about?

cbk1994 04-30-2011 06:09 AM

Quote:

Originally Posted by DustyPorViva (Post 1646589)
I'm lost, are you saying GraalEditor's mapping functionality doesn't work for you or what? Because it works for me, and most others... how else do you think servers have been generating their bigmaps? If that's not the case, then what the **** are you talking about?

It doesn't work on Windows 7 or XP for me, and iirc the maps it generates are pretty low-quality compared to what you can get by resizing the full image in Photoshop.

edit: I guess I'm doing something wrong?
http://u.graalcenter.org/i/Picture_69758914.png

papajchris 04-30-2011 06:47 AM

Quote:

Originally Posted by cbk1994 (Post 1646592)
It doesn't work on Windows 7 or XP for me, and iirc the maps it generates are pretty low-quality compared to what you can get by resizing the full image in Photoshop.

edit: I guess I'm doing something wrong?

Press F4 from that screen and then try

Crow 04-30-2011 08:12 AM

Yup. Need to press M in the editor window. Still, the quality sucks. I also got some code that screenshots all levels of a gmap (I actually did that back then on Era as well :p) and then some batch files that will join these single images together using ImageMagick. Outcome is awesome.

xAndrewx 04-30-2011 09:08 AM

HTML Code:

function onActionServerSide(action, mapx, mapy) {
  if (action=="warpme") {
    player.x = mapx*64+30;
    player.y = mapy*64+30;
    player.z = 0;
    if (getz(player.x,player.y)>=30)
      player.y += 64;
    player.triggerclient("weapon",this.name,"warped");
  }
}

//#CLIENTSIDE
const maptilew = 112;

function onPlayerChats() {
  if (player.chat==":generatemap") {
    player.chat = "";
    generateMap();
  } 
}

//--- Map generation ---

function generateMap() {
  this.generatemapx = 0;
  this.generatemapy = 0;
  this.generatemapw = 14;
  this.generatemaph = 19;

//  this.buffer = new TDrawingPanel();
//  this.buffer.setsize(maptilew*this.generatemapw, maptilew*this.generatemaph);
  this.buffer = new GuiDrawingPanel("MapGenerator_Panel");
  this.buffer.resize(0, 0, maptilew*this.generatemapw, maptilew*this.generatemaph);
  this.buffer.visible = false;

  this.currentmapx = this.generatemapx;
  this.currentmapy = this.generatemapy;
  sendWarpRequest();
}

function onActionClientSide(action) {
  if (action=="warped")
    generateImagesForLevel();
}

function generateImagesForLevel() {
  for (temp.x=0; temp.x<2; temp.x++) {
    for (temp.y=0; temp.y<2; temp.y++)
      saveScreenShot(this.currentmapx*64+temp.x*32,
        this.currentmapy*64+temp.y*32);
  }
  this.currentmapx++;
  if (this.currentmapx>
=this.generatemapx+this.generatemapw) {
    this.currentmapx = this.generatemapx;
    this.currentmapy++;
  }
 
  if (this.currentmapy<this.generatemapy+this.generatemaph)
    sendWarpRequest();
  else {
    // Done
    player.z = -51;
    this.buffer.saveimage("graalmap.png");
    this.buffer.destroy();
  }
}

function sendWarpRequest() {
  triggerserver("weapon",this.name,"warpme",this.currentmapx,this.currentmapy);
}

function saveScreenShot(x, y) {
  jpegquality = 90;
  makescreenshot2("temp_mapgenerate.jpg", 0x4, x,y,0,512,512);
  this.buffer.drawimagestretched(
    (x - this.generatemapx*64)*maptilew/64,
    (y - this.generatemapy*64)*maptilew/64,
    maptilew/2,maptilew/2,
    "temp_mapgenerate.jpg", 0,0,512,512);
}

use dis

cbk1994 04-30-2011 05:36 PM

Quote:

Originally Posted by Crow (Post 1646613)
Yup. Need to press M in the editor window. Still, the quality sucks. I also got some code that screenshots all levels of a gmap (I actually did that back then on Era as well :p) and then some batch files that will join these single images together using ImageMagick. Outcome is awesome.

I already posted NW2PNG which does the same thing in a fraction of the time :) (creates a 1:1 image which is already stitched).

salesman 04-30-2011 07:11 PM

the level editor map won't include a lot of NPCs, like trees on Era (which are ganis)

Crow 04-30-2011 08:40 PM

Quote:

Originally Posted by cbk1994 (Post 1646676)
I already posted NW2PNG which does the same thing in a fraction of the time :) (creates a 1:1 image which is already stitched).

I prefer to have more control using my code. It also hides several NPCs I don't want to show up on the map.

cbk1994 04-30-2011 08:59 PM

Quote:

Originally Posted by Crow (Post 1646714)
I prefer to have more control using my code. It also hides several NPCs I don't want to show up on the map.

Fair enough—the source is released, though, so you might just want to modify it for your uses. It'd probably still be faster than stitching unless you've found a really fast way.

Crow 04-30-2011 09:24 PM

Quote:

Originally Posted by cbk1994 (Post 1646715)
Fair enough—the source is released, though, so you might just want to modify it for your uses. It'd probably still be faster than stitching unless you've found a really fast way.

I found it to be fast enough for my needs. I don't need to do map updates often anyway, so that's not a big deal :)

cbk1994 04-30-2011 09:42 PM

Quote:

Originally Posted by Crow (Post 1646720)
I found it to be fast enough for my needs. I don't need to do map updates often anyway, so that's not a big deal :)

Fair enough, just wanted to make sure you knew :).


All times are GMT +2. The time now is 11:57 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.