STARTER...
This manual will be a quick guide to using WELLHARD. I won't describe what wellhard is all about, I will just start by running through the features included so far. I think enough will be explained by doing this and I can get more in-depth, as wellhard is developed further.
1. Explanation of features and options. 2. Step by Step guide. 3. Check hardness map integrity.
Pressing this key sets WELLHARD into create new hardness map mode, will open pre-set map file called ' NEW_IMAGE.MAP', this file is were the user will copy his image file to be worked on. I'll explain further in the step by step section.
swaps to a blank screen, no image / hardness map shown. is used to give a clear view of the build up of collisions detected by the planets. So the user can see if the boundary build up of collision colour is solid.
Hides the text displayed on screen when setting options. To give a clearer view of what's happening. Displays the text when pressed again.
D - SWAP BETWEEN IMAGE / HARDNESS MAP:
Alternates image / hardness map. Image shown allows user to see how the build up of the boundary colour relates to the image. Hardness shown allows user to see how hardness map is being updated.
Shows real movement speed of planets, to show they move at set speed, allows user to check collisions with boundary colour.
Resets to default image and settings, except colours.
A blue flag marks a collision with collision colour, set by user. The flag is a guide to weak areas of your hardness maps. pressing 'T' deletes all blue flags, (It does exactly what it says on the tin, ;) ).
Move mouse cursor over flag to be deleted and press 'Y'. Hold down 'Y' and delete as you go.
U - UPDATE INDIVIDUAL RED FLAG:
Move mouse cursor over flag and press 'U' to update hardness map.
Press 'E' to update hardness map with all red flags presently on screen.
F - FULL AUTO UPDATE OF RED FLAGS:
Automatically updates hardness map, when planet collides with boundary colour set by user.
A - SELECT ANY BOUNDARY COLOUR:
Sets boundary colour collision to any colour, except Transparent/black. As the hardness map is this colour.
C - GET IMAGE MAP PIXEL COLOUR:
Hold 'C' and move mouse around screen, colour of pixel will be shown at mouse cursor.
Hold 'C' and press 'V' to Set boundary colour to present image map colour. Boundary colour is what the planets check for to set as hardness colour.
Hold 'C' and press 'G' to set hardness colour to present image map colour. Boundary colour is the colour to set to the hardness map.
Hold 'C' and press 'B' to set collision colour to present image map colour. Collision colour is what the planets check for, when checking hardness map integrity.
V - GET HARDNESS MAP PIXEL COLOUR:
Hold 'V' and move mouse around screen, will set boundary colour once released to present hardness map colour.
V+B - SET COLLISION COLOUR TO HARDNESS MAP COLOUR:
Hold 'V' and move mouse around screen, press 'B' to set collision colour to hardness map colour.
M+1 to 4 - SET SCREEN RESOLUTION MODE:
Press or hold 'M' then press 1 - 4 to set screen to same resolution as your image.
1 - 1024x768.
2 - 800x600.
3 - 640x480.
4 - 320x240.
Decreases collision colour.
Increases collision colour.
Decreases boundary colour.
Increases boundary colour.
Decreases hardness colour.
Increases hardness colour.
Updates hardness map with hardness colour outlined by planets.
CURSOR KEY UP - MOVE PLANET UP:
While key is held down planets will move up.
CURSOR KEY DOWN - MOVE PLANET DOWN:
While key is held down planets will move down.
CURSOR KEY LEFT - MOVE PLANET LEFT:
While key is held down planets will move left.
CURSOR KEY RIGHT - MOVE PLANET RIGHT:
While key is held down planets will move right.
When pressed adds planet at current mouse cursor position. The planets will then move around the screen at random, at the speed set by user, unless user moves them around with the cursor keys. Once a planet detects a pixel of boundary colour set by user. Places a red flag to show detection
Deletes all planets on screen.
I'll explain the use of some of these options in greater detail in the step by step guide.
STEP BY STEP GUIDE: ... Skip to STEP ONE ...
Before I get to the step by step guide. First thing to do is save your image map as the NEW_IMAG.MAP (new_image.map, bloody DOS :) ) file you placed in your DIV folder. (if you haven't already done this refer to the SETTING UP WELLHARD text file). make sure you don't change the name of the file NEW_IMAG.MAP. Use save_map_as option, then save your map as NEW_IMAG.MAP.
At the moment WELLHARD can only cope with single screen images, so you will have to copy your image map into single screen sections. i.e. PLAYER background is 8 screens wide at 640x480, so chop background into 8 640x480 sections. you'll then have 8 maps to work on. (note. Arrange maps in the order that they are copied in the DIV working environment).
I know it would seem to be easier to just flood fill the different layers of the background image, and in most cases at the moment it would be. And so it would seem that WELLHARD is completely useless (maybe it is), but WELLHARD is at an extremely early stage of development.
I tried testing one section of the PLAYER background by flood filling the different layers, and it was fine until I got to the fifth layer, which always left gaps, no matter which way I went about it ( well I tried two ways, SLACKER!!, who me).
Refer to images 6 - 9 in WELLHARD.
Image 6: Was first reduced to half size ( normal hardness map size, I think ), then I flood filled each layer. Starting at the bottom, flood filled with colour 21, reduced by 1 each layer to 16. When I got to layer 5 the flood wasn't accurate, it was fragmented, I had to pick out each fragmented part. But there were still gaps.
Image 7: Was full size, flood filled then reduced, but still gaps.
Image 8: Was reduced to half size. Then used area select to select all the area of layer. Selected colour range, set to 32 to get enough colours, as I was using colours 21 to 16. Selected 21, chose FX, selected colour convert, but doing it this way I couldn't have the boundary colour of 21. Ended up with different colours, even green, which didn't matter unless you wanted colours 21 to 16. And still gaps.
Image 9: full size, selected area, selected colour range, selected colour convert, different colours so this time flood filled each area with the colour I want. Still gaps.
I know I'm being a bit picky and could just go over the layer myself and touch up the layer with the paint tool, tried it, quickly scanned through layer and painted even a good couple of pixels width. Reduced, but still gaps. The thing is I think, they're fragments of different colours left over from flood filling and reducing and of course, going over it yourself, you can't be sure your getting everything. But with WELLHARD you get a totally accurate outline of the layer. I know at the moment it takes a while to go through all the layers on each section of your image. But you would also have to go through the whole of the image painting and you would never be sure it was solid until running your program, and so you'd have to use WELLHARD anyway or check it yourself.
The initial idea behind WELLHARD was just to check hardness maps to find weaknesses, but then I thought, maybe it could be used to develop hardness maps, and I think in time, with tweaking and ideas, its got potential.
Right lets start, for those that are still interested...
Save your first or only image map as NEW_IMAG.MAP, which should be in the DIV folder. ( note. If you have more than one image map to work on, remember to arrange them in the order they will be going into the hardness map, as we will be working through them one at a time ).
But seeing as this is probably your first time using WELLHARD we'll work with the image already saved to NEW_IMAG.MAP.
Also open a NEW map half the size of your image map ( You don't have to do this for a single screen image, as the PCX file we will be creating will become this). As we work on each image and create the hardness map within WELLHARD, we'll build up this hardness map with the sections created.
So seeing as this is probably your first time, you don't have to worry about the new map.
STEP TWO:
Run WELLHARD.PRG. Once up and running you'll see a default image ( no title screen yet, sorry!) and a list of options.
STEP THREE:
We want to create a NEW HARDNESS MAP so press 'N'. WELLHARD is now in create hardness map mode. You can now swap between image map and hardness map by pressing 'D', you should be able to see your image, the hardness map is blank at the moment, if the image doesn't fill the whole screen.
STEP FOUR:
You'll need to set the screen resolution to match your image resolution. So press 'M' followed by number 1 to 4, numbers relate to screen resolution starting with highest. Once the image fills the screen your ready now to start selecting parts of your image to create hardness for. The first thing to do is set up your colours, there are three colours to set up, but one of them isn't used in creating hardness maps ( COLLISION COLOUR ) so we'll ignore this. The first colour to set is BOUNDARY COLOUR. Alright let's set this colour.
STEP FIVE:
Hold 'C' and move the mouse around the screen, you will notice a number on the mouse cursor, this number is the colour of the pixel on the image map. Move the cursor down to the bottom of the screen, we'll start on the bottom layer. Move the mouse up still holding 'C', until the number at the mouse cursor reads '123', now press 'V' to set BOUNDARY COLOUR to map pixel colour '123'. You also need to set HARDNESS COLOUR to the colour you want to update the hardness map with. But for the sake of this guide we'll leave the colour as default, which is white. But for your image/hardness maps choose your own colour. You're now ready to add a planet, right!
Hold 'C' and move mouse cursor up until map pixel colour doesn't equal '123', let go of 'C'. Now quickly just press LEFT MOUSE BUTTON once. You should now see a small planet jiggling. around the screen. Rather slow, lets speed it up a bit. Press 'P' once, the planet should have speeded up a little ( you can also increase/decrease size of planets with 'O' and 'K' keys, just for fun really). By now you should have noticed little red flags popping up. These represent a collision with the BOUNDARY COLOUR that you set. These are what will be updated to the hardness map with the HARDNESS COLOUR. We won't update just yet, but there are three ways to update.
1. UPDATE INDIVIDUAL RED FLAG
By moving the mouse cursor over the red flags individually and pressing 'U', used when there are flags where you don't really want them. Or delete all the stray one's individually by moving mouse cursor over them and pressing 'Y', then you can update them all by pressing.
2. UPDATE ALL RED FLAGS
If your confident red flags are where you want them, then press 'E' to update them all.
3. FULL AUTO UPDATE RED FLAGS
If your really confident that all collisions want to be updated then press 'F' to set full auto update to on ( sorry, haven't put indicator of change on screen yet, but you'll know when it's on, all flags will come and go ). This is what we will use, but not yet.
First press RIGHT MOUSE BUTTON to delete all planets. Now Hold 'Y' and move mouse cursor over all red flags until all are delete ( sorry, forgot to put delete all red flags in, DERRRR! ). Done that, good. There should still be white pixels on screen, we'll clear the screen, there's no real need to do this, but we'll start with a clean screen anyway. Press 'D' to swap to hardness map, this should clear the screen, don't worry if there's white pixels in the top left corner of the screen, that's were the hardness map is placed ( OH! and by the way if the writing on the screen is getting in your way, press 'H' to hide/un-hide text as and when needed, sorry! :) ). Right now press 'D' to go back to image map. Move the mouse cursor above the layer you want to detect collision with ( Hold 'C' move mouse up from bottom of screen like earlier ). Now were going to put some planets in to do their job.
STEP SIX:
First Hold cursor down key ( keep holding cursor key down until I tell you ok not to, or else! ;) ), now add planets, about 100 spreading them left and right a little. Keep Holding cursor down key, you should now see them clinging to the boundary layer, and some red flags, now, I know that it's safe to turn on auto update, ( I recommend that you use manual update 'U', until your confidence in using WELLHARD grows ).
STEP SEVEN:
Now press 'F' and you should see the flags disappear, press 'D' to go to hardness map, screen should be blank, except for a few pixels were you placed the planets and in the top left corner, the hardness map has been updated, as full auto is on. Now stop Holding cursor down key ( and rub your finger better, :) ), and let the planets do there work, you'll notice that they jiggle around and slowly update the boundary collisions with hardness colour, just speed them up a couple of levels by pressing 'P', you'll notice them bounce around frantically, and the boundary layer outline slowly building up. Right press RIGHT MOUSE BUTTON to stop all the planets.
STEP EIGHT:
Now place planets same as before on the left hand side of the screen holding cursor key down. This is the way I like to do it ( well, at the moment anyway), release the planets for a couple of seconds, then move the planets to the right and press cursor key down again. The layer will build up, move on as the layer looks solid, you get the idea.
STEP NINE:
Right once you have worked your way across to the right and you've checked that the layer is solid, then press 'SPACE' to update hardness map ( caution. once you press 'SPACE' you will loose the outline of the layer ). And that's it you've done the first layer, just do the same now to all the other layers, using different colours, or the same colour if your just going to check for one colour.
STEP TEN:
When you've totally completed the layer, then press 'D' to get hardness map on screen, the screen should be blank except for the hardness map in the top left hand corner, make sure that the screen resolution is still set to the size of your original image. Move the mouse cursor out of the way of the hardness map image, bottom rights good. Then press 'CONTROL - ALT - P' to copy hardness map as a PCX image map.
STEP ELEVEN:
Press 'ESC' or 'ALT X' to go back into DIV environment. OPEN MAP and select the last or only PCX image in the DIV folder, double click to edit, use the box selection to surround the hardness image from top left ( 0,0 ) to the bottom right ( half the size of your original image ). Then click on the cut and paste to window, right of icon bar at bottom of screen. That's it if your using a single screen image, that's your hardness map.
STEP TWELVE:
If your using multi maps, place this hardness map section into the new hardness map you opened earlier. Then work on your next section by copying it to NEW_IMAG.MAP then it's back to STEP ONE.
I know its a bit of a chore at the moment, and I'm sorry if the manuals a bit confusing, it was a bit of a rush job. but I'm coming up with ideas to speed things up. And I would be extremely grateful to hear your ideas, and even more grateful if you would add to the program or the manual yourselves. If you do update the program in anyway, please, send me your updates or if you need any help. lonestar.mail@ntlworld.com or post a message on my forum at takeoff.to/lonestar.
CHECKING HARDNESS MAP INTEGRITY:
To check the integrity of your hardness maps, you should save your image map as 'IMAGE.MAP' and save your hardness map as 'HARDNESS.MAP' which you placed in your DIV folder when setting up WELLHARD then select 'O' on the option screen..
But for now just run WELLHARD and check the images included.
Images 1 - 4.
Are simple images, just to demonstrate how solid WELLHARD is, I promise you that every time a planet moves, it checks for collision with colour first and then marks the collision with COLLISION COLOUR, with a blue flag, before moving away from collision, so if it goes into the collision colour it will be shown, there is no cheating going on ( well you can check for your self ).
Image 5.
This is taken from the PLAYER hardness map. Which was created with WELLHARD.
Images 6 - 9.
These are my attempts at using flood fill, colour conversion, ( alright, I'm useless! I no...)
CHECKING IMAGES:
First select image 1 - 4.
You then need to set colours. If you're using images 1- 4, then there is no need to change them as they are set to these images. But if you need to change them and don't know the COLLISION/BOUNDARY colours of hardness map.
Hold 'V' and move mouse around screen, colour will be shown at mouse pointer, colour will be set to BOUNDARY COLOUR automatically, so just release 'V' when you get the colour you want. To set COLLISION COLOUR, while Holding 'V' press 'B'.
If you're on the image screen move mouse to black areas and place planets, set them going at whatever speed you like, there are three counters at the top left of the screen. These display number of planets, number of collisions with COLLISION COLOUR, number of collisions with BOUNDARY COLOUR.
If you're on the Hardness map screen, Hold 'V' to check hardness map for black areas.
Just play around with it guys, and remember it's not finished yet so don't get annoyed with it's inadequacies...