Skip to content

Experiment with using old pixel perfect map screenshots as a way to test/validate map parsing code #75

@mattbruv

Description

@mattbruv

So, luckily for this project in general, Pallosalama was very meticulous in documenting Lentokonepeli. The other day I remembered that he documented each map and stitched together 1x1 pixel screenshots of all of the maps. A long time ago I saved them into this repository, and they can be found on an older version of the branch right here.

Take classic for example. You can see that he documented how it should look, and the picture can be used as a test case which models the original.

I think it would be awesome if we could somehow write tests which would export our levels as screenshots from the PIXI.js renderer at the same 1x1 detail and then compare them with Pallosalama's originals. If this is possible (not sure at the moment, but I think it could be possible), then it would allow us to be sure that our remake is 100% faithful to the original as far as the map layouts, and have it confirmed programatically.

There are some things to note if one is attempting to implement this: The original game rendered everything over a Red #FF0000 background, so even though it's covered 99.99% of the time, there are certain "Leaks" in Pallosalama's original screenshots where there are transparent pixel "holes" in some of the textures, and the red background can be seen. These are extremely subtle, but can be seen here:

Image

This isn't the only example, I think I've seen red in other parts when closely inspecting these old map images a long time ago.

But the point is, that if we use these map images as a source for a test, we might want to edit the background to be #FF0000 in photoshop before saving them as test images, so that ALL of the background is red, and then when we generate our version, to generate it with a red background (and omit rendering sky/hill sprites). This should allow us to have a 1:1 comparison, assuming we crop the test image and our output image to be equal dimensions and contain a sane map area.

Curious to hear input on this idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfidelityAn issue with the consistency to the original gamehelp wantedExtra attention is neededrendererIssue with the game's renderer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions