ZX Recoloring project

Share graphical tips, notes and queries related to our favourite screen layout and its editors.
User avatar
4thRock
Dizzy
Posts: 89
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal
Contact:

Re: ZX Recoloring project

Post by 4thRock » Wed Jul 10, 2019 5:57 pm

That Stormbringer recolor project is interesting.
Only gave it a quick look but having the graphics as .bmp is a great idea.

I'd limit myself to a simple graphic replacement with Spectrum "compatible" graphics (original resolution, only one colour per 8x8 or at most 8x1).
That's something that could have happened back in the day if the Spectrum had some sprite support.

Must find some time to try it with Bomb Jack and Golden Axe.
0 x

geecab
Berk
Posts: 18
Joined: Sun Jun 23, 2019 11:44 am

Re: ZX Recoloring project

Post by geecab » Wed Jul 10, 2019 8:22 pm

4thRock wrote:
Wed Jul 10, 2019 5:57 pm
I'd limit myself to a simple graphic replacement with Spectrum "compatible" graphics (original resolution, only one colour per 8x8 or at most 8x1).
That's something that could have happened back in the day if the Spectrum had some sprite support.
The good things is that as the replacement sprites are bitmaps, you can mod someones else's bitmaps pretty easily in any paint editor and get the look you are after :)

>>Must find some time to try it with Bomb Jack and Golden Axe
Sounds good!
0 x

geecab
Berk
Posts: 18
Joined: Sun Jun 23, 2019 11:44 am

Re: ZX Recoloring project

Post by geecab » Wed Jul 10, 2019 8:39 pm

Hi rg_software!

I've been adding the remaining graphics to Aquaplane (Thought I'd try and get one game completely finished). Unfortunately, I think I've reached the maximum number of sprite recognition jobs that my PC can handle (Which seems to be about 20 'pixel' recognition jobs in total).

I've had a few thoughts on how to overcome this. Please don't think I expect any of it to be implemented (Its sounds like a scary load of work to me now I've wrote it all down :p). I'm just suggesting stuff really and parts of it might be worth considering as and when you are in the code again :)

- In settings.txt, the "SearchArea=Y:n|X:n|H:n|W:n" parameter. Searches for a sprite in a specified area (Where n is pixels. Height (H) and Width (W) sets the size of the search area. The top left of the search area is positioned at Y and X). If omitted, the entire screen is searched.

- In settings.txt, the "MaxInstances=n" parameter. Stops searching for a sprite after 'n' instances of that sprite have been recognized. If omitted, search for as many instances of the sprite as possible.

- In settings.txt, the "Group=n" parameter. Specifies a group of sprites that depict the same object/character (For example, a sequence of sprites depicting a person running). When one of these sprites is recognized, no need to search for any of the other sprites in that group.

- Use multiple CPU cores to perform recognition jobs simultaneously.


Example of how settings.txt might look:-

; Search for the Sun, there'll only be one and it'll be located at the top right of the screen...
0 pixel zx_sun.bmp pc_sun.bmp SearchArea=Y:0|X:200|H:50|W:56 MaxInstances=1

; Below the Sun are some clouds that move horizontally across the screen, there are only ever 3 clouds shown at once...
0 pixel zx_cloud.bmp pc_cloud.bmp SearchArea=Y:50|X:0|H:50|W:256 MaxInstances=3

; Search for the game's hero. There'll only be one of him, but he's depicted by a number of sprites...
0 pixel zx_myhero1.bmp pc_myhero1.bmp SearchArea=Y:100|X:0|H:92|W:256 MaxInstances=1 Group=1
0 pixel zx_myhero2.bmp pc_myhero2.bmp Group=1
0 pixel zx_myhero3.bmp pc_myhero3.bmp Group=1
0 pixel zx_myhero4.bmp pc_myhero4.bmp Group=1


Something else I was thinking about was a dependency setting. For instance, the recognition of sprite A, B & C to occur only while sprite D is recognized. Or perhaps recognition of sprite A, B & C to start only when Sprite E is recognized, and to finish only when Sprite F is recognized. Just trying to think of ways to stop searching for everything all of the time. To search for certain set of sprites that only get displayed when the player reaches a particular level/stage/screen in the game.

Sorry for waffling on. Hope this helps :)
0 x

User avatar
ZXDunny
Microbot
Posts: 167
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny » Wed Jul 10, 2019 9:54 pm

Holy crap dude, you're doing this by image recognition? While that's an impressive task, there really are much, much easier ways to do this :)

Are you monitoring an emulator screen display, or do you have your own emulator that this engine is tacked onto?
0 x

User avatar
4thRock
Dizzy
Posts: 89
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal
Contact:

Re: ZX Recoloring project

Post by 4thRock » Wed Jul 10, 2019 10:18 pm

BombJack didn't work, it just replaced the entire background.

So I tried Xevious and it works :D
Image

The new ship sprite only has added colour. This allows it to downgrade nicely to the original when over a background:
Image
1 x

geecab
Berk
Posts: 18
Joined: Sun Jun 23, 2019 11:44 am

Re: ZX Recoloring project

Post by geecab » Wed Jul 10, 2019 10:27 pm

Nice job 4thRock! That looks great :)
0 x

User avatar
4thRock
Dizzy
Posts: 89
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal
Contact:

Re: ZX Recoloring project

Post by 4thRock » Wed Jul 10, 2019 10:39 pm

Thanks! Recoloured an enemy sprite and it's the same thing.
Mostly works but sometimes it defaults to the the original. It doesn't affect gameplay much but it's a bit strange ;)
Image
0 x

geecab
Berk
Posts: 18
Joined: Sun Jun 23, 2019 11:44 am

Re: ZX Recoloring project

Post by geecab » Wed Jul 10, 2019 10:45 pm

ZXDunny wrote:
Wed Jul 10, 2019 9:54 pm
Holy crap dude, you're doing this by image recognition? While that's an impressive task, there really are much, much easier ways to do this :)
Are you monitoring an emulator screen display, or do you have your own emulator that this engine is tacked onto?
Yes that's right, it uses image recognition. Have a read though the thread posts to find out more, but to summarize, rg_software has modified the UnrealSpeccy emulator to do this. Its still at a early stage of development, but I really like the idea :)
0 x

geecab
Berk
Posts: 18
Joined: Sun Jun 23, 2019 11:44 am

Re: ZX Recoloring project

Post by geecab » Wed Jul 10, 2019 10:54 pm

4thRock wrote:
Wed Jul 10, 2019 10:39 pm
Thanks! Recoloured an enemy sprite and it's the same thing.
Mostly works but sometimes it defaults to the the original. It doesn't affect gameplay much but it's a bit strange ;)
Nice! Its difficult to say why its defaulting to the original without seeing it running for myself (Maybe upload the project and I can take a look?). My guess is that it might the same issue as described in This post
0 x

User avatar
ZXDunny
Microbot
Posts: 167
Joined: Tue Nov 14, 2017 3:45 pm

Re: ZX Recoloring project

Post by ZXDunny » Thu Jul 11, 2019 7:29 am

geecab wrote:
Wed Jul 10, 2019 10:45 pm
ZXDunny wrote:
Wed Jul 10, 2019 9:54 pm
Holy crap dude, you're doing this by image recognition? While that's an impressive task, there really are much, much easier ways to do this :)
Are you monitoring an emulator screen display, or do you have your own emulator that this engine is tacked onto?
Yes that's right, it uses image recognition. Have a read though the thread posts to find out more, but to summarize, rg_software has modified the UnrealSpeccy emulator to do this. Its still at a early stage of development, but I really like the idea :)
Yeah, that's why I'm amazed. He's hit his limit at 20 sprites - or his PC grinds to a crawl presumably. Unless this is being run on a 486, then a much better strategy is needed. And oh my, there are so many.
0 x

Post Reply