Graal Forums  

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

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, 130 views)
File Type: zip NW2PNG.zip (219.2 KB, 163 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:	752
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, 167 views)
File Type: zip NW2PNG 1.3 src.zip (3.0 KB, 165 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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:09 AM.


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