VGMaps

General Boards => Maps In Progress => Topic started by: Weatherproof on July 16, 2010, 05:20:09 pm

Title: Crusader: No Remorse
Post by: Weatherproof on July 16, 2010, 05:20:09 pm
Hey VGmaps members!
My name is Weatherproof and I'm new to the board. I've been following the forums and maps for awhile and would like to contribute.
So I'm starting with Crusader: No Remorse.
I'm planning on doing this as long as there's interest for it and people would like to see it mapped.  I've done some work on it for an hour or so and have come up with not even half a level so far, and, as you can see, there's many things that need fixing (HUD, player character, filling in the whole map, black areas (that was my fault), and other things).  I'm not very good with image editing software and am just starting to learn it, so I will definitely need some tips/help on getting rid of these artifacts. Also, I know it looks like shit at this point.
So tell me what you think so far!

[Edit] The file is 2 megs, does anyone know of a good way to post it?
Title: Re: Crusader: No Remorse
Post by: Peardian on July 16, 2010, 07:49:31 pm
First off, welcome to the forum.

Two MB? Those must be some pretty big images. You can use a file hosting site like Sendspace or Mediafire to host them.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 16, 2010, 08:21:54 pm
Thanks for the suggestion!

Here's the jpg version (2MB):
http://www.sendspace.com/file/4vcby2 (http://www.sendspace.com/file/4vcby2)
Here's the png version (8MB):
http://www.sendspace.com/file/s63lt6 (http://www.sendspace.com/file/s63lt6)
Title: Re: Crusader: No Remorse
Post by: Peardian on July 16, 2010, 10:06:13 pm
I don't have any experience in this kind of game, but I do have some immediate suggestions. The first is to find some way to compress those images. I don't know what you used to put together the map, but just saving the image in paint cut the filesize in half. I'm sure a PNG compression program would cut it even more.

As far as the actual mapping process would go, I am of no help. If it weren't a computer game, it would be as simple as disabling the sprite layer or something, but... I dunno. The one thing I can point out, though, is that big black square overlapping the room behind it. You'll want to try avoiding that at all costs, because it's covering up part of a room the player will travel through.


Aside from that, though, the other members here will be much more helpful to you. I wish you luck in your mapping.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 16, 2010, 10:14:31 pm
Thank you very much! And yeah, I'll go back through the game in another pass and make sure i merge that particular picture right.  Since it is Dos though, maybe there's a sprite hack... I'll have to look into it...
Title: Re: Crusader: No Remorse
Post by: DarkWolf on July 19, 2010, 07:56:22 am
I actually started to do this map a while back.  It presents a lot of difficult challenges.  For one, the levels are pretty big, and the graphics are isometric, which means your end result is going to be a huge file.  Also those rooms that boarder the map are inaccessible and have to be dealt with in some way.  Then there's the removal of all the overlays and enemies as you are mapping.

I worked on it nearly a day and maybe got halfway through the first level.  There's probably some way to hack to make it easier, but I didn't spend a ton of time on it.

*EDIT*

Forgot to mention.  There is a Sega Saturn version of the game, in which you could theoretically remove layers, but last time I tried it SSF would crash.  I'm not sure if that has been fixed or not.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 19, 2010, 03:52:25 pm
Yeah, I think that the inaccessible areas of the map I'll just fill in black.  There is a cheat however to walk around out there but it's not much use in the map unless people REALLY want to know what all those pipes and silos go :P
Thanks for the info on that Saturn version, I'll definitely have to look into that!
I think I'll give it a couple more hours and see where I'm at and where the file size is before deciding whether or not to continue... I did notice that I can make the pallet 256 colors and that really cuts back on the space used...
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 19, 2010, 07:47:50 pm
Just finished the first part of the first level.  The image size is 13356x6120.  I indexed the colors to 256 and the png at high compression is about 7.5 megs:
http://www.sendspace.com/file/yxw7xf (http://www.sendspace.com/file/yxw7xf)
There's lots of touching up to do but this is a preliminary thing to see if I want to continue this.  Either on the PC or with the Saturn :P
I know it looks like crap but tell me what you guys think!
Title: Re: Crusader: No Remorse
Post by: Maxim on July 20, 2010, 02:11:21 am
Yuck, the downconversion has totally screwed the image. Keep it in 24-bit colour and then run it through PNGOUT to get the best compression possible.

I think we do want to see where all the pipes go.
Title: Re: Crusader: No Remorse
Post by: Peardian on July 20, 2010, 08:21:21 am
Yeah, I'd try to use better compression to save filesize instead of reducing color. I'm sure that map could still be reduced by a good deal.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 20, 2010, 02:09:22 pm
I did some googling and I remembered now that the game is in 256 colors anyway. To be sure though, I made some comparison photos, one with RGB compared to Indexed-256, and one of a closeup of the comparison. I think tonight I'll try the cheats to walk around outside the first level and map that area.  Although I think the majority of this game has areas which are just black in the places you can't go, especially in the later levels.
Thanks for the tip on PNGOUT!
EDIT: forgot the pictures:
Comparison:
http://www.sendspace.com/file/i0cmiq (http://www.sendspace.com/file/i0cmiq)
Closeup:
http://www.sendspace.com/file/qpi6s4 (http://www.sendspace.com/file/qpi6s4)
Title: Re: Crusader: No Remorse
Post by: Peardian on July 20, 2010, 04:17:24 pm
With images that size, you can use Imageshack (http://www.imageshack.us/) to host them. ;)


Good luck with the cheats, and I hope you can find one for hiding sprites. It will save you a whole lot of time.
Title: Re: Crusader: No Remorse
Post by: Revned on July 20, 2010, 05:02:45 pm
PNGOUT will automatically reduce the color depth for you, so don't mess with it.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 20, 2010, 06:23:27 pm
I totally forgot about image shack!  :D
Here's the problem when you wander around where you're not supposed to go:
http://img24.imageshack.us/img24/8872/crusader076.png (http://img24.imageshack.us/img24/8872/crusader076.png)
I don't know if this is just the way dosbox is rendering stuff or what but it does it with Surface, Opengl, and Ddraw :(

PNGOUT on default settings takes it from a 81MB bitmap down to 253 colors but never completes.  The percentage indicator just keeps counting up to 99 percent and resets...
Crusader is available for Sega Saturn and for Playstation, I'll have to check them both out for differences but which one do you guys think would be easier to disable the sprite layer for?
Title: Re: Crusader: No Remorse
Post by: Revned on July 20, 2010, 07:59:07 pm
PNGOUT takes a long time to process an image. It uses very rigorous compression settings, so each fill of the progress bar probably indicates one test run. It will go through many trials before it decides which is best. I don't use the GUI version of PNGOUT, so I'm not sure what you're seeing.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 20, 2010, 08:09:20 pm
Yeah, I'm using the command line one as well.  I guess I'll just have to leave it running for awhile and see what i can get out of it!
Title: Re: Crusader: No Remorse
Post by: Maxim on July 21, 2010, 01:39:59 am
PNGOUT loops over the image, each time it compresses it it gets a bit smaller. When it stops getting smaller, it stops. So watch the "subtraction" figure, and wait for it to get to zero. Due to the way it works, PNG compression takes a huge amount of time on large images.

Image editors allow one to reduce a true-colour image to paletted using "diffusion" which gives a speckled appearance in return for better reproduction of the colours compared to other reduction methods. It looks like this game's art was compressed using this technique. The telltale sign is that the dithering is the same for the same "part" in different places, a whole-image dither wouldn't achieve that.

I'm not sure I see the problem with http://img24.imageshack.us/img24/8872/crusader076.png ...
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 21, 2010, 06:29:02 am
Oh so the problem with that picture is just that I can't really get good screenshots of the areas that are outside the normal areas of play, it would be much much easier to make all inaccessible areas black.
Title: Re: Crusader: No Remorse
Post by: Peardian on July 21, 2010, 09:49:54 am
Oh, I think I see it. Is it the crazy "smearing" of the edge of the map in the top right corner? I'm not sure what you'd have to do about that other than getting in and manually cutting away the extra smearing.
Title: Re: Crusader: No Remorse
Post by: DarkWolf on July 22, 2010, 09:04:31 am
Good news:  The Saturn version now works on SSF

Bad news:  Everything is rendered in the sprite layer

Oh well, the graphics aren't quite as good as the PC version anyway.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 22, 2010, 03:02:49 pm
Yeah :\ the whole game is sprite based so it could run at a higher framerate, be better looking, and have destructible environments.  For it's time it was a real gem.  And if I'm not mistaken the graphics were rendered as needed, so the computer was only working on just the sprites that needed to change by the frame (the background would be rendered once when you enter the screen and not again until you re-center the camera again).
I can't seem to find an image download for the playstation version. I might have to buy a used copy off of amazon just to see if it'll work haha! An unused copy goes for about $95!
Title: Re: Crusader: No Remorse
Post by: DarkWolf on July 23, 2010, 05:37:35 am
A lot 2d Saturn games still use the layering features of the hardware.  I suppose they were just lazy in porting the PC code, which is typical of Saturn games unfortunately.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on July 25, 2010, 08:43:58 am
Okay everybody,
After putting more hours into this, I'm realizing that this will be a huge project that I'm having trouble finding time for.  With the inability to disable sprites (which would probably make the screen black :P) and the sheer size of the maps, it's quite a hard project, so I may move on to another DOS game (maybe Jazz Jackrabbit or looking into the current Duke Nukem 2 maps).  I am going to upload the first level of crusader with all 4 floors but with NO editing with the sprites, just for fun (It'll be mostly like the pictures I have up now but with more completeness and black filling where inaccessible areas are). 
I really appreciate all your help and if there's an old DOS game that you would like me to work on let me know and I'll give it an attempt!
Title: Re: Crusader: No Remorse
Post by: Weatherproof on August 02, 2010, 06:39:46 pm
So I'm finally done with what I'm going to call the "Macro" level of level 1-1 (level 1, floor 1) in Crusader.  So this picture is just the stitching of all the images together and the blacking out of the inaccessible areas.  The "Micro" level of this would be editing out every single sprite, patching things together, and overall making it pixel perfect.  I know it looks sloppy but I also know that this step would just not be worth it in terms of time/cost to benefit ratio. I don't know how many hours that I've put in this because I've lost count.  I do know that it took 166 png screenshots from Dosbox, the raw raster image is 239.4MB, the un-indexed PNG is 14MB, the resolution is 13356x6210, and GIMP doesn't seem to like big things and complicated processes :)
I might work on the next three floors of this first level, but it will be whenever I'm free and feel like it.
However, I really feel like I've learned a lot from this failed project, I feel a lot more comfortable with image manipulation programs.
Anyways, here's the link for the compressed, indexed png!
Enjoy!
http://img716.imageshack.us/img716/8684/crusader11.png (http://img716.imageshack.us/img716/8684/crusader11.png)

Title: Re: Crusader: No Remorse
Post by: TerraEsperZ on August 02, 2010, 07:20:36 pm
Considering the difficulties involved, you did an impressive job. Unfortunately, I don't think it would be feasible to map this game correctly unless someone were to program some sort of map extraction tool. Heck, just getting a single map up to "standards" would take so many hours of painstaking work that you'd get fed up before finishing. At any rate, you seem to like a challenge :).

It's nice to mention how much you learn. I don't know how many screenshot maps you've done so far (is this your first one?) but it takes a while to get the hang of the various image programs and develop shortcuts for the various processes you go through. If this is indeed your first, then you're off to a great start!
Title: Re: Crusader: No Remorse
Post by: DarkWolf on August 02, 2010, 07:33:18 pm
Unfortunately, I don't think it would be feasible to map this game correctly unless someone were to program some sort of map extraction tool.

I was actually able to do half of the first floor without sprites or status bar overlays.  But it takes FOREVER.  I probably used 166 shots or more and I didn't even get as far as Weatherproof.
Title: Re: Crusader: No Remorse
Post by: TerraEsperZ on August 02, 2010, 07:47:37 pm
By "correctly" I actually meant being able to fully map the stages including all the portions that are off-screen. It's one of my pet peeve about isometric games; they often depict gorgeous worlds full of details and architecture but the game often prevents you from seeing a large part of it, most notably along the stage borders.

That reminds me... Does anyone knows how isometric games usually keep coordinates in memory? I mean, if I wanted to change the player's position, would a game use simple horizontal and vertical values, or would it use internal X and Y values corresponding to how those axes appear on screen, meaning diagonally? I'm thinking about future projects, maybe...
Title: Re: Crusader: No Remorse
Post by: Weatherproof on August 02, 2010, 09:15:26 pm
Thanks for the support! :)
I'm guessing the coordinates would be stored as in X/Y.  There's a cheat that I discovered during the last couple of hours into it where you can enable cheats, turn on 'hack' mode, and move your character around the world.  I noticed that elevated areas are just different flat positions, like there's no Z axis at all, it's all tricking of the eye.  This doesn't mean that the game stores your position with X/Y coordinates, I just know it doesn't handle Z stuff. 
I also did some reading and noticed that the rendering is done with a 'dirty box' method, where only the parts of the screen that need updating get updated, which allowed the devs to get up to a reasonable framerate at 800x600 at the time.
I'm wondering how the maps themselves are stored.  I'm guessing each thing in the world is just a tile with some properties, imagine if the world was stored as just raw data! The game would probably be the size of a DVD. :P
Title: Re: Crusader: No Remorse
Post by: TerraEsperZ on August 02, 2010, 09:42:13 pm
That's a cool find! I was actually reading up on that "Hack Mover" and how you could move objects with it, but you actually confirmed what I was hoping, that the player's avatar is considered an object too! Finding something like that while mapping an isometric game is one of the best thing ever! I hope this makes this project easier for you.
Title: Re: Crusader: No Remorse
Post by: DarkWolf on August 03, 2010, 12:54:41 pm
There's a function to translate X,Y or X,Y,Z coordinates to an isometric projection.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on September 25, 2010, 09:23:16 am
Update!!!
So the past month at work I've been learning programming in VB .NET and C# and doing custom applications for stuff that my boss needs.  And one of them involved analyzing images, breaking them apart, and stitching them back together.  So after some minor adjustments, I've been reworking the tool for this Crusader project.  But I think it will really really benefit anybody stitching images together on this site.  It uses the Accord.NET libraries and is using some of the code taken from this site:
http://www.codeproject.com/KB/recipes/automatic_panoramas.aspx (http://www.codeproject.com/KB/recipes/automatic_panoramas.aspx)

It's definitely a cool thing to check out.  I'm trying right now to be able to dump a directory of images into the program and have it stitch a mosaic together.
Here's a screenshot of it working currently:
http://img545.imageshack.us/img545/4610/autostichv1.png (http://img545.imageshack.us/img545/4610/autostichv1.png)
So right now, it takes two images, stitches them together by corner detection and correlation, then blends them (you can see the blank alpha sections where neither picture covers.  The main problem will still be that goddamn HUD.
Title: Re: Crusader: No Remorse
Post by: Maxim on September 27, 2010, 03:45:30 am
If the HUD is in the same place on every image then you can make the code ignore those specific pixels (in my autostitcher I call it "masking"). Of course, locations where there is no overlap of the HUD area will be left blank.

Is the engine based on fixed-size tiles (on a grid) or are the "pieces" of varying sizes/in non-grid positions? I have a tool that can fill in gaps in tile+grid images.

Is there anywhere in the game where the HUD is disabled? Cut-scenes, for example?

How does your stitcher scale to large numbers of images? I'd be worried it'd get ridiculously slow as the overall image gets large. Does .net/Graphics/etc fall over when images get very big?
Title: Re: Crusader: No Remorse
Post by: Weatherproof on September 27, 2010, 06:14:58 pm
After taking a day off to spend on this, I've still gotten nothing to work.  The images are warped and distorted as soon as more than 3 of them get stitched.  I'm also having great trouble automating the process.  So in the meantime i'll have to find another corner detection/edge detection algorithm that is better suited for this set of images.

To answer your questions Maxim:
The HUD is in the same place every image, and that masking idea is great! I'll implement that eventually

The engine is tile based, I think...
And the HUD is never disabled (Cut-scenes are FMV)
And until I get this to work I won't be able to tell how it scales, but I'll report here first thing.
Title: Re: Crusader: No Remorse
Post by: Maxim on September 28, 2010, 12:36:33 am
The problem may well be that most photo stitching algorithms expect to align things on fractional pixels (with some warping too), whereas screenshot maps are always perfectly aligned and not stretched/rotated/etc. Maybe you can apply some rounding to the match locations and/or disable warping (maybe discard the homography matrix stage).
Title: Re: Crusader: No Remorse
Post by: DarkWolf on September 28, 2010, 06:08:18 am
After my failed attempt at writing a pixel-perfect automated stitching program, I thought a GUI assisted one might be better.  It would allow you to drag and drop an image near the area where it should go and it would attempt to match in that general area.  The end result would be similar to a grid snap, without a grid.  Would improve the speed issue since you could take the first match and not worry about the rest.  Still, I do web development for a living and not standalone applications, so my skill with doing applications that require that kind of re-painting isn't too great.  Would be nice to see someone else try it though.
Title: Re: Crusader: No Remorse
Post by: Maxim on September 28, 2010, 08:25:47 am
You need to start with decent large-image support, a lot of frameworks fall down with 10000x10000 images (for example). My autostitcher would be a decent base for it - it's designed to start at a guessed location and then look at increasing distances until it finds a good match. Feature recognition might be a faster technique than brute-force pixel matching.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on September 28, 2010, 04:36:58 pm
So i've done some more work on it.  I took out the homography estimation stuff because there's no point in using that on a flat image, it actually warps and worsens the result.  The homography is great for panoramic images but is useless for flat images such as video game maps.  The program now detects corners (Harris detection with Accord.NET still), correlates them, and instead of homography and ransac analysis to fit the inliers, it just subtracts the correlation points, then finds the majority of where the corners want to go and ignores the rest.

The result is a non-warped image that aligns perfectly, computes faster, and will work with any size image.  The next thing to do is implement a batch process so i can open a directory of images, and optimize stuff here and there.

The Harris detection is kind of expensive for large pictures so either i reduce the area searched, or move to a more simple detection algorithm (which is possible because there's no noise with these images), this would require me to actually write the algorithm though.
Title: Re: Crusader: No Remorse
Post by: Maxim on September 29, 2010, 01:21:52 am
For feature detection you could run a 2D edge-detection convolution and then maybe erode and threshold it. You could then build up the overall "feature bitmap" as you go along by merging in the matched images. You still have the problem of having to search globally (unless you assume some locality of sequential shots, as I do) and the fact that low-contrast areas will have few or no "features" by this algorithm.
Title: Re: Crusader: No Remorse
Post by: Weatherproof on September 30, 2010, 02:41:23 pm
Another update:
The program will now load a group of images, they can be any size and there can be any number of them.
The program will use a bunch of logic to determine the canvas size, then it will place the base picture, then overlay the second picture by the majority offset.
It then saves the new image as the new base repeats for all the pictures.  Because the base picture gets successively bigger each iteration, the program takes longer and longer for more pictures.
However, i did some profiling and found that the slowness is 99% the harris corner detection and the correlation (from the Accord.NET library).
So I'm going to code a custom corner detection (actually copy the Moravec or FAST algorithm).
The images also need to be loaded so that each new image will overlap at least some portion of the previous image (ie: you stitch some images together, then the next image is in a different part of the map), so I'll just have to do some really crazy logic to sort the pictures or something first.

Hopefully, this program will greatly aid anybody on this site stitching far away images together that need to be pixel perfect.