ZX Recoloring project

Share graphical tips, notes and queries related to our favourite screen layout and its editors.
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: ZX Recoloring project

Post by Joefish »

Joefish wrote: Fri Jul 12, 2019 6:38 pm Why not use the pattern-matching algorithm to search for the sprite data in a memory snapshot and present it for editing, then use a Spectrum-256 like approach to present it in-game?
rg_software wrote: Sat Jul 13, 2019 7:37 am I am not really familiar the details of with Spec256 approach. I mean, I know that it emulates a sort of "shadow graphics processor", but I neither know the details nor can estimate how hard is to to something similar.
I think it's already been covered, but the Spec256 approach is to run an emulation where each bit of memory is handled as a byte instead. That way, a 1-bit pixel in the emulated screen memory is actually an 8-bit colour index.(REMEMBER you'd need colour #1 to be 'black', as colour #0 is 'transparent' or a zero bit).
When emulating the Z80, you use the zero/non-zero status of a bit as 0/1. But when building the screen display, for each bit of pixel data you ignore the attribute, consider the 'bit' to be its full 8-bit representation, and look up its colour in a 256-entry palette.

Now my suggestion, to improve things, is you have a palette that is partly fixed, and partly dependent on the current attribute.
The fixed part of the palette is the first 224 colours.
Then there's a palette of another 256 colours. Each holds 16 variations on each of the 16 spectrum colours (including BRIGHT / DARK BLACK).
So the palette for a character cell consists of 224 base colours + 16 variations on the INK colour + 16 variations on the PAPER colour from the current attribute.
This allows sprites to be partially recoloured depending on their current attribute, as much or as little as desired. So for Manic Miner, your penguins could still have an attribute-dependent body-colour. But for something like 3 Weeks in Paradise, with its horrendous colour clash, you'd just use the fixed colour palette.
rg_software wrote: Sat Jul 13, 2019 7:37 am Furthermore, I am not entirely sure that the sprites are stored in the memory in the same format for all games. We know exactly that when a certain picture is displayed on the screen, it has a predefined pixel structure. When it sits in memory, it can be literally anything stored in the way the authors wanted. For some games with large sprites (like Popeye) I guess there are maybe no complete sprites at all, just separate sprite pieces later combined into a character on the fly. So in order to recolor such sprites one would need to guess these pieces and process them separately.
Most sprites are stored in a simple linear fashion, or a slight variant of it. Variations include alternating bytes of sprite / mask, or alternating rows, or alternating frames of sprite / mask; reversal of byte order, reversal of row order, reversal of every second row; sometimes pre-shifted with animation. But this is what the smart routine is for - to recognise the repeating shapes in memory and identify the start and end of individual sprites; which ones are similar enough to be considered animations, etc. And all done from a memory snapshot, so it can take as long as it wants, and accept hints and prompts from a user to guide it.

If sprites are stored as UDGs, with a second table to organise the UDGs into a large object, then you're pretty much stuffed. But a huge number of games could be tackled with only a few simple variations from linear storage.

You wouldn't even have to identify attribute data, as with my suggested approach sprites could be partly re-coloured by their original attributes, or with no respect to their attributes at all, as the designer wishes.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny »

I think that most people saw the Spec256 tool as being way too complex for them - they just want to be presented with graphics for recolouring without actually having to find them first.

Which is a shame, because it's the best "automatic" way to do it we've seen so far.
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: ZX Recoloring project

Post by 4thRock »

geecab wrote: Sun Jul 14, 2019 9:25 pm Once renamed (and the bitmaps resized to 16x16 pixels), then the blocks appear :)
:lol: Thanks!
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: ZX Recoloring project

Post by 4thRock »

ZXDunny wrote: Mon Jul 15, 2019 1:47 pm I think that most people saw the Spec256 tool as being way too complex for them - they just want to be presented with graphics for recolouring without actually having to find them first.
That's why pattern matching is a great idea. Sure you still need to create a spritesheet, but that's very intuitive.
Once I tried to find sprites directly on TAPs and memory. Confusing because of different sizes, masks and the variations mentioned by Joefish.
So an automated approach has it's merits I think.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny »

4thRock wrote: Mon Jul 15, 2019 2:27 pm
ZXDunny wrote: Mon Jul 15, 2019 1:47 pm I think that most people saw the Spec256 tool as being way too complex for them - they just want to be presented with graphics for recolouring without actually having to find them first.
That's why pattern matching is a great idea. Sure you still need to create a spritesheet, but that's very intuitive.
Once I tried to find sprites directly on TAPs and memory. Confusing because of different sizes, masks and the variations mentioned by Joefish.
So an automated approach has it's merits I think.
It does, but it certainly limits the games you can recolour and also the circumstances in which they can be recoloured. I'm hoping that I can be proved wrong though.
rg_software
Drutt
Posts: 11
Joined: Sun Jul 07, 2019 4:20 am

Re: ZX Recoloring project

Post by rg_software »

Didn't have time for an update yet... However, since several people mentioned that EmuZWin has a potential to do the job "the right way", I tried to investigate the state of that project. It seems that it is effectively abandoned, and the sources are given to Denis Grachev (given that he keeps them locked somewhere). So he is perhaps the only person who can modify the emulator now, and it seems it's far from trivial given its old codebase.

P.S. People suggest using EmuZWin 2.6 instead of 2.7 -- it seems that some bugs @geecab encountered appear on the 2.7 version only.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny »

I would start a new emulator from scratch tbh. They're not terribly hard, just laborious to get right. If all you intend to do is play recoloured games then the accuracy doesn't have to be anything like SpecEMU or its ilk.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: ZX Recoloring project

Post by hikoki »

This project might be a good opportunity for the Sam Coupe
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny »

hikoki wrote: Sat Jul 20, 2019 4:21 pm This project might be a good opportunity for the Sam Coupe
I'm not sure the Sam Coupe, even with an accelerator, would be able to find and replace the graphics quickly enough.
User avatar
Stefan
Manic Miner
Posts: 808
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: ZX Recoloring project

Post by Stefan »

ZXDunny wrote: Sat Jul 20, 2019 6:24 pm
hikoki wrote: Sat Jul 20, 2019 4:21 pm This project might be a good opportunity for the Sam Coupe
I'm not sure the Sam Coupe, even with an accelerator, would be able to find and replace the graphics quickly enough.
Even an optimised SAM Coupé port of any title will have trouble since it needs to move four times the amount of graphics data around with only a slightly faster z80.
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Rebelstar II is coming on nicely I think. Julian Gollop was clearly influenced by the Aliens film when he programmed this, so I've always wanted to see a full on Aliens version of this game.

The main changes are the Aliens look more like the ones from the film (Black with no eyes). I've also replaced all the members of your squad with the names (and small images) of the film characters.

I replaced about 80 of the sprites (Got about 20 left to do) and as I'm just working with bitmaps in my favored editor it hasn't taken long. I can use the 'block' search feature in my settings.txt, and there hasn't been any performance problems.

Image

:)
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Hi all!

The developer of the recoloring tool (rg_software) has been busy fixing bugs, improving performance and adding new features since his first release. The latest version works really well I think :)

Here is a quick preview of RebelstarII - with new graphics, fonts, music and sound effects. All achieved with the recoloring tool. I'll upload the entire game at some point:

https://www.youtube.com/watch?v=8sTQy8_eQRw&t=1s

New RebelstarII features:

- All game graphics and fonts have been redrawn/recolored.
- The names of the raiders changed to those from the Alien (1979) and Aliens (1986) films.
- Marine and Alien voice samples heard when squad members are selected.
- Menu music and in-game music.
- Motion tracker heard during 'fire mode'.
- Swamp Rat changed to a facehugger.
- Better ending screen.

:)
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny »

...do those Aliens have bows and swords?

:D
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: ZX Recoloring project

Post by hikoki »

Would Super Off Road be a good candidate to be recoloured? Playability could be improved by giving the player a different colur as every car looks the same!
User avatar
Stefan
Manic Miner
Posts: 808
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: ZX Recoloring project

Post by Stefan »

hikoki wrote: Wed Oct 09, 2019 6:02 pm Would Super Off Road be a good candidate to be recoloured? Playability could be improved by giving the player a different colur as every car looks the same!
I would expect that the same car sprite is used for all cars, so there is only one sprite to colour, resulting in all cars then having that colour.
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

To be honest hikoki, I would probably recommend that you just play the Arcade/Amiga/ST versions of Super Off Road. That would be the ideal look/sound that I'd be aiming for if I were to improve the Speccy version. That is, unless the Speccy version has something extra that the other versions don't?

This has got me thinking about 3D Stock Car Championship:
https://spectrumcomputing.co.uk/index.p ... 96&id=4904
Used to love that game as a kid. Bit of a rubbish looking game with awful sound, but really fun with your mates (could have up to 4 players). I quite fancy giving that a make over sometime :)
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Hi there!

Just thought I'd upload a shorter version of my RebelstarII video. Just wanted to mix together the interesting sections of gameplay and also include footage of the dropship, hopefully making it a bit more exciting for viewers :)

ZX Recoloring Project: Rebelstar II "Ripley's Revenge"
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Hi there!

Thought I'd upload this video of Stormbringer - with new graphics and fonts. All achieved with the recoloring tool. I'll upload the entire game at some point:

Image
ZX Recoloring Project: Stormbringer

:)
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: ZX Recoloring project

Post by 4thRock »

Looks great! My preference would be a more restrained graphic style (keep one colour per sprite, only use the Spectrum palette), but this really shows the potential for this technique! Looking forward :D
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Cool thanks! I know what you mean about a more restrained graphic style. To be honest, I was going for the look of an ST/Amiga game. Incidentally, there was an Atari ST version of Stormbringer, but it wasn't the best :)
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Hi again!

Here is a video of my quick attempt at adding sound and colour to Tomcat (by Players).

I bought this game when I was a kid. Liked the detailed graphics, but you couldn't see the tiny enemy bullets. As everything was the same colour, it was hard to distinguish the enemies, bullets and your own plane from each other. Also, the game was totally silent, no music or sound effects.

I've added menu music, in-game music and made the bullets large & bright blue so that you can see them. I've also added colour to the player's ship and enemies.

I could put more work into ensuring the enemies stay recoloured when other sprites/bullets invade their space, but didn't want to spend too much time on this - Wanted to keep it as an example of what can be achieved in a short space of time.

I still think it is a very unfair game, but being able to see your bullets definitely helps. I can now complete the first level without cheating!

Image
ZX Recolouring Project: Tomcat

:)
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: ZX Recoloring project

Post by 4thRock »

I like this style, I think it improves gameplay and still feels 8-bit.
toot_toot
Manic Miner
Posts: 678
Joined: Thu Nov 29, 2018 7:17 pm

Re: ZX Recoloring project

Post by toot_toot »

These look great, thanks for doing these!

Interesting choice with Tomcat, a couple of other similar games that could really benefit from coloured bullets are Slap Fight, Flying Shark and maybe even Uridium. Slap Fight in particular was a nightmare at the time, despite it being a decent conversion the amount of times you'd die because of invisible bullets.
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Cheers, thanks for taking a look!
toot_toot wrote: Wed Oct 23, 2019 7:03 pm Interesting choice with Tomcat, a couple of other similar games that could really benefit from coloured bullets are Slap Fight, Flying Shark and maybe even Uridium. Slap Fight in particular was a nightmare at the time, despite it being a decent conversion the amount of times you'd die because of invisible bullets.
Unfortunately, I don't think the Slap Fight bullets can be recoloured using this tool. The Slap Fight bullets are just a block of 4 pixels, and those pixels get XOR'd as they travel over the landscape (So it would be really difficult for the tool to recognise them).

Flying Shark and Uridium would be good contenders though :)
geecab
Drutt
Posts: 32
Joined: Sun Jun 23, 2019 12:44 pm

Re: ZX Recoloring project

Post by geecab »

Hi again!

Here is a quick video of my work so far with Micronaut One. The original game was silent apart from the 'click' sound when you pressed fire. I've added engine thrusters sound, lasers/sparks sound and title/menu/in-game music (David Whittaker). I've gave the dashboard a new colour scheme, added a red/green cross-hair as well as a few extra things :)

Image
ZX Recoloring Project: Micronaut One
Post Reply