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