Graal Forums  

Go Back   Graal Forums > Development Forums > Level Design
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-24-2010, 08:27 AM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Cool Nw2png

Hello everyone
I've made a new tool in java which generates an PNG Image from a given level

- The latest download is attached below -

For the developers under you I've also attached the source code
Please gimme comments + Ideas of what I should add / change =D

------------------------------------------------------------------

Latest version is 2.1, by Dusty!

Patch Notes:
Quote:
Originally Posted by Dusty
Alright, I think this is it. Added addtiledef2 img,dest,x,y; and addtiledef2("img","dest",x,y); support. However, right now it scans through the levels, and doesn't use tiledefsOffline.txt. I don't seem to have the file, so I'm assuming it doesn't work or something *shrug*. So make sure you have at least one NPC on the overworld that defines the tiledefs.

I think this is pretty complete now, should be able to render most maps efficiently

I also included a shortcut in the folder that increases the memory heap for the program. I'm not sure if the shortcut will work for anyone else, but you can try it. It's at 1300mb, but if you right click the short cut and go into properties you can change it via changing:

-Xmx1300m

to something like

-Xmx2000m

This will allow the program more memory to render larger maps. But if you raise the number too high the program won't even manage to run.
Attached Files
File Type: zip NW2PNG.src.zip (50.8 KB, 470 views)
File Type: zip NW2PNG.zip (219.2 KB, 604 views)

Last edited by Crono; 11-21-2011 at 09:03 PM..
Reply With Quote
  #2  
Old 06-24-2010, 08:48 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
HTML Code:
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
__________________
Reply With Quote
  #3  
Old 06-24-2010, 08:57 AM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
@ Andrew you can download the java runtime (JRE) here:
http://java.com/en/download/inc/windows_upgrade_xpi.jsp

Oh and I just saw I had a quick typo when parsing the gmap file
(Width was Height and Height was Width)
Ive attached the changed one 1.1 now

I always prefer Java since you only have to compile it
once and you can run it under every OS
Reply With Quote
  #4  
Old 06-24-2010, 09:03 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Haha cool-alot quicker than using the map editor!

Can you please add a tileset changer on to it- ie the tileset you want to use (I know you can just re-name pics1.png, but would be cool of an option)

rep++
Attached Thumbnails
Click image for larger version

Name:	bravo.png
Views:	1062
Size:	325.9 KB
ID:	51224  
__________________
Reply With Quote
  #5  
Old 06-24-2010, 09:09 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Already done it, but that's pretty cool. I'm still working on the new version of mine with GMAP support so I guess you beat me to that .

Nice work.
__________________
Reply With Quote
  #6  
Old 06-24-2010, 09:09 AM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
The image looks so smooth <3
Thanks for repp + uploading your picture =)
The changer will be added in the next version 2.0
until then we will have an auto parse of the level to read the addtiledefs =P
Also im doing a GUI version soon

Programs written in C++ / Java gives more possibilites like you can see the
image is Rendered Intepolated (very smooth) not like the usuall horrible pixeled M map (no Interpolation rendering)

Did I already mentioned that it also supports pics1.png's with alpha =) ?
oh and you can also skip Levels when creating the gmap - just dont add the
.nw level to skip in the folder and the NW2PNG will auto skip this level if it doesnt exist
so you have an alpha hole where this level should be

Actually this is the very first Alpha version I just started with this Project a few hours ago =o

Last edited by born2kill; 06-24-2010 at 09:39 AM..
Reply With Quote
  #7  
Old 06-24-2010, 12:31 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Wow, this is awesome man!

Thanks alot rep+
Reply With Quote
  #8  
Old 06-24-2010, 04:31 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
NW2PNG v1.2 released
Here comes v1.2 - including several changes
+ support for Tilelayers

Please read the readme.txt file in the folder

Last edited by born2kill; 06-26-2010 at 10:19 PM..
Reply With Quote
  #9  
Old 06-24-2010, 04:59 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Add anti-aliasing Maybe as an option

PHP Code:
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASINGRenderingHints.VALUE_ANTIALIAS_ON); 
Or a higher interpolation setting -- I can't really tell.

Last edited by WhiteDragon; 06-24-2010 at 06:00 PM..
Reply With Quote
  #10  
Old 06-24-2010, 06:01 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Mhm I already played around with the rendering to get the best quality
Bicubic Interpolation > everything else with the Quality
I just wish I could use the Lanczos sinc Interpolation in Java =(
Reply With Quote
  #11  
Old 06-24-2010, 06:08 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by born2kill View Post
I just wish I could use the Lanczos sinc Interpolation in Java =(
You could write it yourself :o. The weight for a given pixel using an 8-pixel window in Lanczos is [ sin(x*.25) / (x*.25) ] * [ sin(x*.25 / 8) / (x*.25/8) ]


Edit: Here is Chromium's implementation of Lanczos in C++ http://src.chromium.org/svn/trunk/sr..._operations.cc

Last edited by WhiteDragon; 06-24-2010 at 06:25 PM..
Reply With Quote
  #12  
Old 06-24-2010, 06:38 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Quote:
Originally Posted by WhiteDragon View Post
You could write it yourself :o. The weight for a given pixel using an 8-pixel window in Lanczos is [ sin(x*.25) / (x*.25) ] * [ sin(x*.25 / 8) / (x*.25/8) ]


Edit: Here is Chromium's implementation of Lanczos in C++ http://src.chromium.org/svn/trunk/sr..._operations.cc
Haha nvm im just using Bicubic untill there is something giving a better quality xD
(Even Bicubic is already perfect)

PHP Code:
g2d.setRenderingHintRenderingHints.KEY_INTERPOLATIONRenderingHints.VALUE_INTERPOLATION_BICUBIC ); 
ftw =o

Last edited by born2kill; 06-24-2010 at 08:32 PM..
Reply With Quote
  #13  
Old 06-26-2010, 08:01 PM
Rufus Rufus is offline
Registered User
Join Date: Jun 2004
Location: United Kingdom
Posts: 4,698
Rufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud of
I haven't downloaded the program yet as I don't really need it, but it sounds like some nice work.
__________________
Quote:
Originally Posted by Loriel View Post
Seriously, you have ****-all for content and you're not exactly pulling in new developer talent, angling for prestigious titles should be your last concern.
Reply With Quote
  #14  
Old 06-26-2010, 10:14 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
NW2PNG v1.3 released

Again a new version =)

Changelog:
- Added support for normal NPC images
- Added ignorecase for "pics1.png" npcs and npcs containing "light" in their name
(Parsing of setimgpart() not added yet)
- Small source code changes
Attached Files
File Type: zip NW2PNG 1.3.zip (202.9 KB, 459 views)
File Type: zip NW2PNG 1.3 src.zip (3.0 KB, 477 views)
Reply With Quote
  #15  
Old 06-26-2010, 10:20 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by born2kill View Post
NW2PNG v1.3 released

Again a new version =)

Changelog:
- Added support for normal NPC images
- Added ignorecase for "pics1.png" npcs and npcs containing "light" in their name
(Parsing of setimgpart() not added yet)
- Small source code changes
Do you plan to add the suggestion above for supporting different tilesets, and what about addtiledef2?
Reply With Quote
  #16  
Old 06-26-2010, 10:24 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Quote:
Originally Posted by DustyPorViva View Post
Do you plan to add the suggestion above for supporting different tilesets, and what about addtiledef2?
Different tilesets will be added when I finished the GUI
(Selection on beginning where you can select the default tileset
when there wasnt an addtiledef in the level-script)

But currently I dont hesitate with makeing the GUI since you
can just replace pics1.png with an other tileset image to
get this tileset as default (can have alpha) ;-)

addtiledef / addtiledef2 + npc-script parsings will be added soon

Last edited by born2kill; 06-26-2010 at 10:37 PM..
Reply With Quote
  #17  
Old 06-28-2010, 08:06 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Hmm Im gotta pausing this project for some time since im getting really busy with irl and other things D=

(Purrr only one download after 3 days which was a
test to see if the download counter works so far)

Im going to continue it pretty soon or do at least a few small fixes
before I continue it (currently it reads npcs x/y only as integers
-> next small fix will make it possible to have them also on decimal positions)

Maybe a few more comments to the current version (+Downloads)
would help to speed up the development =o
(If you need the tool at all >.<)
Reply With Quote
  #18  
Old 06-28-2010, 08:14 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
lol well it's great- I generate bravo's map with it!!

Please continue
__________________
Reply With Quote
  #19  
Old 06-29-2010, 02:17 AM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by born2kill View Post
Hmm Im gotta pausing this project for some time since im getting really busy with irl and other things D=
aww..
Quote:
Originally Posted by born2kill View Post
(Purrr only one download after 3 days which was a
test to see if the download counter works so far)
no, its broke, ive downloaded it like 4 times now because i keep deleting it after using it :o

Quote:
Originally Posted by born2kill View Post
Im going to continue it pretty soon or do at least a few small fixes
before I continue it (currently it reads npcs x/y only as integers
-> next small fix will make it possible to have them also on decimal positions)
does it read images?
oh and, a common way to show images on a level is with showimgpart.. so that might be a bit tricky :o


Quote:
Originally Posted by born2kill View Post
Maybe a few more comments to the current version (+Downloads)
would help to speed up the development =o
(If you need the tool at all >.<)
i'd help you to make a "drag'n'drop" for linux OS'es if you want :o
(not sure how to do this, but i could research.)
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #20  
Old 06-29-2010, 10:32 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
png2nw?? :P
__________________
Reply With Quote
  #21  
Old 06-29-2010, 11:51 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
If it were bigger that'd probably be possible.
Reply With Quote
  #22  
Old 07-01-2010, 07:07 AM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Quote:
Originally Posted by Deas_Voice View Post
aww..
no, its broke, ive downloaded it like 4 times now because i keep deleting it after using it :o
Nope its not
The counter doesnt increase for every new download - it only counts 1 download per account
Reply With Quote
  #23  
Old 07-01-2010, 07:47 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
would be interesting if the map image was real size, as in taking screenshots of each level and just piecing it without resizing. i've always wanted this feature or atleast some kind of size toggle
__________________
Reply With Quote
  #24  
Old 07-01-2010, 04:02 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Quote:
Originally Posted by Crono View Post
would be interesting if the map image was real size, as in taking screenshots of each level and just piecing it without resizing. i've always wanted this feature or atleast some kind of size toggle
I also had a personal version which did it but the problem is if we keep it original size the image becomes ( 1024 * levels ) pixel big for example a 10x10 level would have 10240x10240 pixels which has an incredible size
Reply With Quote
  #25  
Old 07-01-2010, 05:06 PM
Umat Umat is offline
Banned
Join Date: Jul 2008
Location: Sweden
Posts: 412
Umat will become famous soon enough
What about half-size?
Reply With Quote
  #26  
Old 07-01-2010, 08:20 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by born2kill View Post
I also had a personal version which did it but the problem is if we keep it original size the image becomes ( 1024 * levels ) pixel big for example a 10x10 level would have 10240x10240 pixels which has an incredible size
i know. but thats what i want

dusty did it by hand in the last level collab: http://forums.graalonline.com/forums...1&d=1213546629
__________________
Reply With Quote
  #27  
Old 07-01-2010, 08:46 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
It probably wouldn't work very well with lots of levels, even if you had enough memory on your computer. I have a 1:1 of Era's GMAP from a week ago or so and it's 70 MB.
__________________
Reply With Quote
  #28  
Old 07-01-2010, 08:47 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
yeah but for 2x2 or 3x3 gmaps it should be fine
__________________
Reply With Quote
  #29  
Old 07-02-2010, 02:45 PM
born2kill born2kill is offline
Mainly GS2+Java Scripter
Join Date: Nov 2006
Posts: 17
born2kill will become famous soon enough
Hmm lemme just modify my script to also create full / half sized gmaps

Edit:
Attached - just replace the .jar file with the NW2PNG.jar in your NW2PNG folder
Be warned you can easily run out of memory since when the image is rendered
he works with RAW data meaning a 50x50 gmap could be like 1gb of ram while generating the level image before its finaly saved as .png

Also like it is scripted now he will create two raw images one for tiles and one for npcs and just mix them together in the end -> in the next release this will be fixed (So currently its useing twice the ram you usually need =s)
Attached Files
File Type: zip NW2PNG 1.3 modified.zip (13.4 KB, 272 views)

Last edited by born2kill; 07-02-2010 at 03:05 PM..
Reply With Quote
  #30  
Old 07-03-2010, 01:36 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
eh tried to run it for once and it said java isnt recognized as an internal or external blahblah

i already have jre installed
__________________
Reply With Quote
  #31  
Old 09-17-2010, 04:01 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Requesting sticky on this thread, such an awesome feature.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #32  
Old 09-17-2010, 04:06 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
http://forums.graalonline.com/forums...0&postcount=51
yes just look at my gmap it rendered. (Note that I had to add in the NPCs but was simple and took like 5 mins maybe :P)
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #33  
Old 09-17-2010, 05:09 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
sticky plx
Reply With Quote
  #34  
Old 09-19-2010, 04:24 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
fu this aint no democracy >:[

also i still havent got mine to work...halp
__________________
Reply With Quote
  #35  
Old 10-04-2010, 08:42 PM
Seich Seich is offline
Noctorious' NeoHunter
Seich's Avatar
Join Date: Jun 2008
Location: Honduras
Posts: 193
Seich will become famous soon enough
Send a message via MSN to Seich Send a message via Yahoo to Seich
Quote:
Originally Posted by Crono View Post
eh tried to run it for once and it said java isnt recognized as an internal or external blahblah

i already have jre installed
Try adding jre to your system's 'Path' variable.

(This is for windows 7, it should be similar for all other windows based OSs)
Go to Control Panel -> System -> Advanced system settings.

Then click on the Environmental Variables button on the Advanced tab.

Look for the Path Variable in System variables.

Once you find it click on edit then, try adding something like: ";CProgram Files\Java\jre6\bin" to the end of the string in the variable value textbox. Make sure to have the semi-colon dividing it from the variable that's before this new one.


Then click ok and ok again and try it. Hopefully it should work now.

Last edited by Seich; 10-04-2010 at 08:50 PM.. Reason: I had the urge to add images...
Reply With Quote
  #36  
Old 11-02-2010, 12:36 AM
N01ze N01ze is offline
Level Designer
N01ze's Avatar
Join Date: Aug 2010
Posts: 46
N01ze is on a distinguished road
This is great, thanks
Reply With Quote
  #37  
Old 01-18-2011, 09:23 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I created a GUI for this.



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.
Attached Files
File Type: zip NW2PNG.src.zip (7.7 KB, 259 views)
File Type: zip NW2PNG.jar.zip (11.9 KB, 258 views)
__________________
Reply With Quote
  #38  
Old 01-18-2011, 09:24 AM
Seeya Seeya is offline
ω
Seeya's Avatar
Join Date: Jul 2007
Location: Seminole, FL
Posts: 1,903
Seeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to behold
Send a message via AIM to Seeya
noiz
__________________
Kale Vimes

Reply With Quote
  #39  
Old 01-18-2011, 11:12 AM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by cbk1994 View Post
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.

i think his idea was that, this code was going to be open sourced because he was talking about putting it on github or something along those lines.
i'll tell him that you updated the code when i see him online.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #40  
Old 01-18-2011, 03:10 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Just stops at "Generating..." no matter what I do.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:52 PM.


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