English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   project.Maptapper (https://eab.abime.net/forumdisplay.php?f=123)
-   -   Maptapper Tutorial Part 2 - Kid Gloves II (https://eab.abime.net/showthread.php?t=69740)

CodyJarrett 24 June 2013 09:38

Maptapper Tutorial Part 2 - Kid Gloves II
 
This is the second part of a tutorial about using Codetapper's Maptapper tool. If you are a beginner you may want to read Maptapper Tutorial 1 - Introduction & The Basics first. Corrections and comments are welcome!

Finding Map Tiles

Now that we know some of the basics it's time to find the tiles for a game. Most of our work will be done using Codetapper's Maptapper program which was developed to rip maps for the Hall of Light database.

For the purposes of this tutorial we will rip tiles from the jolly platform game Kid Gloves II (http://hol.abime.net/2570). The first thing we need to do is get a savestate from WinUAE.

Load the game using WinUAE. Set up the virtual Amiga with as little memory as possible. If a game will run with 512K then don't use any more memory because it reduces the amount of data we have to search through.

Once the first level has loaded save the state as "Kid Gloves 2 Ice Island Section 1.uss". Here is the savestate that has been used for this tutorial: [link]

Hint - Maptapper can handle compressed WinUAE savestates so it's not necessary to save the state uncompressed.

http://www.abime.net/img/files/mappi...ESavestate.png

Download and install Maptapper. See the following EAB thread for details: http://eab.abime.net/project-maptapp...-released.html

Load Maptapper. We are in the "Tile Ripper" tab. Look for the "SaveState:" button with the ellipsis (three dots) and click it. Locate your Kid Gloves II savestate and load it.

Hint - if you are planning to do a lot of map ripping it's a good idea to create a sub-directory for each game in the same location as Maptapper.

In the middle of the window you should see an area filled with what looks like television interference. This is a graphical representation of the savestate.

http://www.abime.net/img/files/mappi...es2_Tiles1.png

Located on the left hand side of the window is a column of different settings. Our challenge is to apply the same settings that the game uses so that the tileset magically appears in the central window!

Hint - finding all the settings can be a frustrating process. It's something that you just have to practice. Eventually it becomes easier to "see" the tile set and to swiftly home in on them.

There are five main areas to consider; tile location, tile size, number of bitplanes, bitplane mode and colour palette.

Location (Address)

The tiles are located somewhere in the savestate. Use the following keys for navigation:

Cursor Left/Right -> Move picture left/right by 2 bytes
Cursor Left/Right + Shift -> Move picture left/right by 1 tile
Cursor Up/Down -> Move picture up/down by 1 pixel
Cursor Up/Down + Shift -> Move picture up/down by 1 tile
Page Up/Down -> Move picture up/down by a larger amount

Use the Page Up/Down keys to quickly move through the savestate and then use the cursor keys for more precise positioning.

The "Address" field shows the current position in the savestate. This value is in hexadecimal and can be edited directly to change position without scrolling.

Tile Size

For the purposes of this tutorial we will use the default tile size which is 16 pixels wide and 16 pixels high. 16x16 is the most common tile size on the Amiga. The tiles in Kid Gloves II are 16x16 but other games might be different. Examining a screenshot from a game can be a good method to determine tile size.

To change the tile size use the following keys:

Q/A -> Adjust bitplane width by 8/16 pixels
Q/A + Shift -> Double or half the bitplane width
W/S -> Adjust bitplane height by 1 pixels
W/S + Shift -> Adjust bitplane height by 8 pixels

However, stick with 16x16 for now.

Number of Bitplanes

We know from general experience that Amiga games aren't likely to use only 2 or 4 colours and that 8, 16 or 32 colours are more common. So the bitplane value is probably going to be 3, 4 or 5. Use the following keys to change the bitplane setting:

E/D -> Adjust number of bitplanes

Bitplane Mode

Four modes are available but let's consider the two common ones for tiles:

The "Amiga ACBM" (Amiga Contiguous Bitmap) mode is when the bitplanes are stored after each other in sequence.

The "Amiga ILBM" (Amiga Interleaved Bitmap) mode is when the same row for each bitplanes are stored together. Thus after the row across all bitplanes is stored, the next row begins again for the first bitplane.

Change the bitplane mode using the M key:

M -> Change the ripping mode used to convert memory into graphics

Colour Palette

Use the ECS, AGA and Copperlist buttons to search for the colour palette. For Kid Gloves II the palette should already be located so this step shouldn't be required.

Locating the Tiles

Start by changing the address location. Scroll through the savestate until you can see something that looks like a tileset. With the current settings we will not see the tiles as they look in-game. We are viewing a single bitplane at the moment - the "Biplanes" setting is at 1. Instead look for something that approximately looks like a tileset. It's hard to describe what it will look like but the tiles will most commonly look like blocks of corrupted graphics around 16x16 in size.

If you have trouble finding them here is a picture which shows what they look like with 1 bitplane:

http://www.abime.net/img/files/mappi...es2_Tiles2.png

One we are confident that we have the correct general tile location we can start to use the cursor keys for precise positioning. We can also start to increase the number of bitplanes and to try the different mode settings.

Hint - the exact tile start location can usually be pinpointed by noting where the graphical corruption ends and what looks like tiles begins. The first tile is often a blank or background tile so it may be black or another single colour, such as blue for the sky.

If the correct settings are selected the tiles will magically appear, like so:

http://www.abime.net/img/files/mappi...es2_Tiles3.png

The correct settings for Kid Gloves II are:

Address: $52862
Bpl Width: 16
Bpl Height: 16
Bitplanes: 3
Mode: Amiga ILBM

There is some graphical junk where the tiles end so you can use the following keys to adjust the canvas size.

T/G -> Adjust the destination ripping width by 16 pixels
T/G + Shift -> Double or half the destination ripping width
Y/H -> Adjust the destination ripping height by 1 pixel
Y/H + Shift -> Double or half the destination ripping height

The canvas size is reflected in the "Rip Width" and "Rip Height" settings:

Rip Width: 320
Rip Height: 80

The tiles will look like this:

http://www.abime.net/img/files/mappi...es2_Tiles4.png

Locating the Map Data

Now that we have found the tiles we need to find the level data that shows how the level should be constructed.

The "Map Ripper" tab is used to construct the map from the tiles. However, before we do that let's try the map search function. Go to the "Map Search" tab which looks like this:

http://www.abime.net/img/files/mappi...MapSearch1.png

The map search attempts to find the map data by analysing a screenshot from the game and trying to find a match for the tiles in the savestate. In order for it to work it requires a screenshot with a reasonably unique combination of tiles that will produce a decent match. Try to capture a screenshot free of extra items which don't appear on the map such as player or enemy sprites.

The "Kid Gloves II Screenshot.png" image has been provided as an example.

http://www.abime.net/img/files/mappi...Screenshot.png

In step "1. Load an image from the game" click the ellipsis (three dots) and load the "Kid Gloves II Screenshot.png". Click "Half Size" to reduce the screenshot to the same size as the tiles.

Drag the dotted square selector over the image and highlight the trunk of the tree and part of the ground.

In step "2. Select a region containing non-animated background tiles" click Match Tiles. A matrix of numbers appears in the box:

19, 20, 21
19, 20, 45
19, 20, 21
44, 20, 21
19, 20, 21
19, 20, 21
19, 20, 21
68, 67, 68

Maptapper has matched tiles in the highlighted section in the screenshot to the tileset that we have ripped. The numbers in decimal refer to the tile numbers in the "Tile Ripper" tab.

Now in step "3. Select a region containing only background tiles" click "Search for map". Maptapper comes up with the following results:

Checking for horizontal byte data...
Jackpot! $4E19 with 1 bytes per tile, map width 73
Jackpot! $6E6F9 with 1 bytes per tile, map width 75
Finished!

This tells us that the highlighted configuration of tiles has been found in two locations: $4E19 and $6E6F9.

http://www.abime.net/img/files/mappi...MapSearch2.png

Let's move to the "Map Ripper" tab.

The map ripper works in a similar way to the tile ripper except that it displays a map built with the tiles found in the tile ripper.

The Page Up/Down and cursor keys are used to navigate through the savestate. The Q/A and W/S keys adjust the width and height of the map.

http://www.abime.net/img/files/mappi...MapRipper1.png

In the Address box enter the first of the two values that the map search located ($4E19) and click the Create Map button. You can also use the "v" key to change the map view zoom to get a closer look (remember to use the scrollbars if you zoom in).

http://www.abime.net/img/files/mappi...MapRipper2.png

It should be evident that the map is displaying parts of a level but it's not quite right yet. The diagonal stripes indicate that the map width isn't correct and indeed the map search suggested a map width of 73. Use the Q/A keys to adjust the width manually. As the width increases the map will slowly appear in its correct form. Alternatively, enter 73 in the "Width" box to set the value directly.

Use the cursor keys to change the start position of the map. The map begins at $4D04. In order to find this location have a look at the tiles above and to the left. For example, the tiles above and to the left of the first tile looks random.

Adjust the height of the map with W/S. The height should be 25.

http://www.abime.net/img/files/mappi...MapRipper3.png

Click "Save Map" and save it a PNG file. Congratulations, you have created a map!

Click for larger version:

http://www.abime.net/img/files/mappi...on_1_small.png

One important setting to note on the "Map Ripper" tab is the "Type". This sets the size of the map tile slots. The options are:
  • Byte
  • Word
  • Longword
  • Pointers
  • Word Pointers

For Kid Gloves 2 this option remained at the default of "Byte". If you look at the tiles in the "Tile Ripper" you can see that they number 100. A byte can be used to hold values from 0 to 255 (hex FF) so a byte is sufficient to hold references to 100 tiles. If there are more than 256 tiles then the game will store values in Words (two bytes). The two most common options for this setting are Byte and Word.

zenox98 24 June 2013 13:08

Very good tutorial, thanks :)

On a side note, as I didn't have the original, I D/L a couple of ADFs that unfortunately didn't have, or the program couldn't find, the correct copperlist, so I was unable to use these, as the tiles copperlist colours didn't match the screenshot :(

Using your supplied save state worked fine :)

Thanks
Zen

Codetapper 24 June 2013 14:24

zenox98: If you still have the save state and picture you used, we can have a look at why it didn't find it.

Often it's down to:

- ECS vs Copperlist button (one is usually correct)
- Using a filtered match image (scanlines through it or a weird size ratio etc)
- Not resizing the image to native resolution (if you use WinUAE in 640x512 mode, you need to hit the Half Size button to reduce it to 320x256 resolution)

zenox98 24 June 2013 14:54

@Codetapper

I D/L 2 different ADFs from PlanetEMU.net:
Kid Gloves II - The Journey Back (1990)(Millennium)[cr Goonies] and
Kid Gloves II - The Journey Back (1990)(Millennium)[cr SKR][t +18 ATX][a]

Both couldn't seem to find the correct copperlist, regardless of whether I pressed ECS or the Copperlist buttons. This obviously meant I couldn't match the loaded screenshot, so couldn't continue.

Codetapper 24 June 2013 15:09

Did you create the savestate inside the actual level? You can't save the state on the title screen or somewhere else as the live copperlist will not match. Is that the problem?

It would really help if you upload your savestate if this is not the problem. The ADF is no use, but the USS file is!

BippyM 24 June 2013 15:46

In the map seardch I cannot seem to move the bounding box over the tiles I want to use... How do I do this?

zenox98 24 June 2013 15:49

In the zone.

I tried 2 save states, compressed and uncompressed from within game, but neither worked.

zenox98 24 June 2013 15:49

@bippym

Click and hold left mouse inside box and drag. Use handles to make larger.

BippyM 24 June 2013 15:51

It doesn't work here. Cannot click and drag. I just get some pink lines appearing

Edit: Nevermind, reloaded it as Administrator and we're working now :)

BippyM 24 June 2013 16:28

What is the most common reason for not finding matched tiles?

Codetapper 24 June 2013 22:03

Usually it's due to animated tiles included, or the colour palette is wrong (use the purple button on the far right to highlight pixels that don't match), or your screenshot is the wrong resolution (640x512 instead of 320x256 etc), or you have scanlines through it, or you have found the wrong set of tiles, or the tiles you have selected is missing either the start or the end... Loads of possibilities! A save state + config file is by far the easiest way for us to help you!

CodyJarrett 24 June 2013 23:16

zenox98 - I tried your savestate and I was able to use the map search successfully. Can you expand on the steps that you followed or perhaps upload a few screenshots from Maptapper?

zenox98 24 June 2013 23:56

@CodyJarrett

Ignore me - I was still getting used to the prog.

There is a saying that to assume makes an 'ass' out of 'u' and 'me', and I assumed the address would be as your example, but of course it isn't. Once I'd found the correct address at $528A6, then it all went OK from there.

Sorry for the inconvenience guys.
Zen.

Codetapper 25 June 2013 00:06

Glad it's sorted. If you want a specific tutorial about anything, give us a yell. We're not sure which parts are the most confusing/complicated ourselves as we're quite used to it. Basically if you can find the graphics in GfxRip, you should be able to find them in Maptapper too.

zenox98 25 June 2013 00:22

I'm messing with a remake of Leander in HTML5, so that's the maps I'm trying - without much luck - to find at the moment. I know there are the Level 1 maps on HOL, but I'd still like to find them for myself (and get the rest of the maps for all levels), but I haven't found the tiles yet even for level 1 :(

Hey ho.

Codetapper 25 June 2013 03:22

The usual story, if you get stuck, save your project, and zip up the USS and INI file and one of ye old masters will take a look :)


All times are GMT +2. The time now is 20:08.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04563 seconds with 11 queries