VGMaps
January 19, 2018, 06:31:26 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Java map viewer applet  (Read 7512 times)
0 Members and 1 Guest are viewing this topic.
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« on: September 03, 2007, 03:14:17 PM »

Here are some test maps. Page weights are about 10% of the PNG file size for large images, and browser memory usage will be vastly less, even with the Java runtime overhead.



Castlevania-CircleOfTheMoon-Castle.png 16.1MB -> 1.2MB

http://www.smspower.org/maxim/forumstuff/maptest/cv.html



EarthBoundZero(J)-World.png 4.1MB -> 169KB

http://www.smspower.org/maxim/forumstuff/maptest/earthbound.html



soniccd11apalmtreepanicwo6.png 350KB -> 109KB

http://www.smspower.org/maxim/forumstuff/maptest/scd.html



I still want to:



- add the ability to save as PNG? Or maybe as an "executable" JAR? Both will require either server-side help or for people to accept a dodgy signed applet...

- alternative browsing methods: eg. for Enduro Racer's diagonal maps

- keyboard control

- middle-mouse-click scrolling

- maybe some branding/credit overlay?

- sometimes you get multiple images when zooming out



The Castlevania one is coming out as using more than 20000 tiles which seems wrong, but I think it may be due to the large annotations/branding in the image which has low tile-based redundancy.



Feedback is very welcome.
Logged
Grizzly
Full Member
***
Offline Offline

Posts: 167



« Reply #1 on: September 03, 2007, 05:35:45 PM »

That's very nice. Also the amount of extra compression due to that tile based compression is impressive. When you add a zoom option (to zoom out, and in) and a save as PNG option, that maybe would be a nice possibility to save downloading times and lower server usage.

The FIFA map doesn't work for me, though.



I really need to learn how to manipulate images in Java, too. Which classes do you use for loading an image and splitting it into pieces etc?
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #2 on: September 03, 2007, 11:12:41 PM »

Image. I'll post source soon, it's actually incredibly simple. I use a modified Tile Slicer to produce the input data.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #3 on: September 04, 2007, 07:03:37 AM »

Are you buffering the output?  That should solve the flicker, I would think.  Although, I've never done java.
Logged
Revned
Hero Member
*****
Offline Offline

Posts: 1091



« Reply #4 on: September 04, 2007, 08:12:18 AM »

The reason Castlevania came out as so many tiles is probably because it isn't aligned to the tile grid.
Logged

Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #5 on: September 04, 2007, 01:13:02 PM »

I switched from AWT to Swing for the GUI and got free double-buffering - I was doing it by hand before and there's a limit to how much you can do. It still flickers like hell when resizing the window.



The Castlevania map looked pretty well aligned to me. http://www.smspower.org/maxim/forumstuff/maptest/cv.png if you can open a 16x368848 PNG...
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #6 on: September 05, 2007, 12:49:09 AM »

I added mouse dragging and some preliminary (ugly) zoom support.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #7 on: September 05, 2007, 04:00:18 AM »

The Sonic CD special stages I did had both flipped and rotated tiles.  If it is too much trouble to implement all the combinations, I think the flipped would be the most effective though.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #8 on: September 06, 2007, 12:24:45 AM »

I implemented most of it, and I'm finding very little rotation (didn't try Sonic CD yet). Officially, the Mega Drive graphics chip doesn't support it, I don't know what the Mega CD adds to the mix.



I also added the feature to (sort of) merge tile sets between maps. The result is that you can have one set of tiles fueling multiple maps for a more optimal experience. I'm finding sprites cause a lot of tile duplication though, but I don't want to make the source data more complicated than a single image.
Logged
DarkWolf
Hero Member
*****
Offline Offline

Posts: 621



« Reply #9 on: September 06, 2007, 05:44:47 AM »

Sprites certainly complicate things.  The ultimate format would be one that would allow you to store tiles/backgrounds and sprites separately.  Unfortunately you'd have to create the image in that  format in the first place.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #10 on: September 06, 2007, 11:45:25 PM »

Exactly. This is trying to be something that you feed a map and it spits out something hugely smaller.
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #11 on: September 08, 2007, 12:35:00 PM »

Updated the first post. Here's some source, if anyone's interested:



http://www.smspower.org/maxim/forumstuff/maptest/src.zip
Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2226



« Reply #12 on: September 09, 2007, 11:16:19 AM »

Such an ultimate format would pretty much be impossible to do. It would most likely be easier and take less space to create a program that would output the map straight from the rom using the correct tiles, palettes and whatever internal transformations needed and then add all the sprites wanted.



I remember reading about a guy who was trying to do something similar but for a video format for NES games that would thus have perfect image clarity and would require a much smaller bit rate than most existing video format.



---

"With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." [...] The first time any man's freedom is trodden on, we're all damaged. - Captain Jean-Luc Picard



B*tch, meet reality. Reality, meet b*tch. - Me
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
VGMaps.com: The Video Game Atlas

 

Pixel WarehouseVGMuseum.com

 

VGMaps.com is registered with and hosted by

Go Daddy.

Supported by you.

Some advertising of and on VGMaps.com is handled by

Project Wonderful.

2002-2018 Jonathan Leung.

VGMaps.com is an archive of video game maps up since May 6, 2002. Optimized for at least 800 x 600 resolution.

This site does not contain commercial ROMs or any other illegal materials. All directly "ripped" game images are the property of their respective copyright holders. This web site and compass logo are copyrighted by Jonathan Leung 2002-2018.