José Pereira #1 Posted October 26, 2011 (edited) This, for example would have (just sprite, no shifting) 32chars in total. Is it possible to use just the chars in use (that here would be those green cells and would be only 20chars more shifting)? In the Bitmap Masking coding have the guy all joined (32chars) or, if possible, just the used chars (20chars) makes any difference (like CPU/cycles...)? Just thinking in ways of saving usefull chars. Thanks. Edited October 26, 2011 by José Pereira Quote Share this post Link to post Share on other sites
Rybags #2 Posted October 26, 2011 You save cycles by not having to do the merge/draw/restore but lose out by needing to do the check. e.g. in your 8x4 matrix of characters, there's 32 times the program needs to ask "Do I have to put a character here?" But in the scheme of things the gain is much more than the loss, e.g. of a loss might be a 5x4 matrix where all cells get filled. Another way to save is in circumstances where a cell is entirely sprite colour, ie no merge needed but in this case there doesn't seem to be any. Quote Share this post Link to post Share on other sites
José Pereira #3 Posted October 26, 2011 That in a little A8 nº of chars on each charset, having, for example, a win of 12chars would be the best way to go, right? Would that check/question if we 'need to put a char here' spend many cycles? Quote Share this post Link to post Share on other sites
Rybags #4 Posted October 26, 2011 Not too many. Some sort of RLE could probably be used, so a bunch of flag/length data could be assigned to each animation frame. So if there was 4 cells to skip, the main part of the loop could be avoided and just adjust all the working variables accordingly. Another method altogether might be to draw that figure as 3 seperate objects, minimising blank spaces but the overall saving would be less. Quote Share this post Link to post Share on other sites
Heaven/TQA #5 Posted October 26, 2011 yeah... go for joining soft sprites... so put 2 sprites because imho it gets too much code overhead for all kind of checks... my experience tells me... not worth... the sprite copy routine will anyway check f.e. if it is an empty byte to copy and skipp the code which is not needed. Quote Share this post Link to post Share on other sites
Heaven/TQA #6 Posted October 26, 2011 or write separate sprite routines for each type of enemy... then you can tailor the code specific for each task... Quote Share this post Link to post Share on other sites