Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
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
 


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 01:18 PM.


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