If we are thinking of doing a remake, or at least borrow from a classic game, we may want to try to discover that repetitive squares (tiles) forming the screen of that game.
GIMP is an option that may be helpful to do so. This filter "grid", which superimposes a grid in our image.
It is found in the Filters menu within the option Filters -> Render -> Master -> Grid.
We ask:
- horizontal and vertical spacing, which will normally be 8 or 16 pixels in an image of an 8-bit game that has not been resized, or 16 or 32 pixels if the image is twice the size As with some exporting CPCE and some other emulator.
- The initial displacement, both horizontally and vertically, which is usually 0.
- The width of the lines, which should be sufficient to 1 pixel, so we will not cover much of the original image.
- The color of the lines, which depend on how the game: those with a predominantly black screen, could draw white lines yellow or red.
The result should be something like:
In what is clearly the repetitive cells that form the background.
If you now want to extract these cells for use in our remake ourselves, we have two options (both based on the original image, not the box): Remove
- fragments that interest us, with some Patience and the Trimmer tool, as we saw .
- Creating a software to extract all useful for us, and then eliminate repeated.
Such programs can be very easy to do if we rely on tools like "nconvert ( www.xnview.com ) that are able to convert a PNG image and resize or crop it, all this is based on the parameters that you indicate. Thus, our program would simply call "nconvert" (or similar tool we choose) on a repetitive basis, indicating which portion we want to extract each time.
A basic program in C # to help us in this task might be:
/ / trimmer image tiles
/ / (it supports in nconvert)
using System; / / WriteLine
using System.IO; / / Path
using System.Diagnostics; / / Process
RecortadorDeFicheros
{public class
public static void Main (string [] args) {
if (args.length < 1)
{Console.WriteLine ("Set the filename to cut");
return;}
anchoImagen int = 768;
altoImagen int = 576;
anchoTile
int = 32;
int altoTile = 32;
cantidadColumnas
int = anchoImagen / anchoTile;
cantidadFilas int = altoImagen / altoTile;
string name = args [0];
nombreSalida = Path.GetFileNameWithoutExtension string (name);
Path.GetExtension extension = string (name);
for (int row = 0; < cantidadFilas; fila++)
row for (int column = 0 ; column < cantidadColumnas; columna++)
{Console.WriteLine ("Fragment:" + row +","+ column);
fila.ToString string filaTexto = ("00");
columna.ToString string columnaTexto = ("00");
string end_firstname = nombreSalida +
columnaTexto filaTexto + + "." + extension;
File.Copy (name, end_firstname)
Process.Start ("nconvert.exe"
"png-D-out-crop" column * anchoTile
+ + "" / / x
+ row * altoTile + "" / / and anchoTile
+ + "" / / w altoTile
+ + "" / / h
end_firstname
+);
}}}
0 comments:
Post a Comment