Opry99er Posted March 10, 2011 Share Posted March 10, 2011 (edited) As the title of this thread suggests, I'm dealing with a character pattern issue... Here are my issues: I'm needing to re-define 4 SPRITEs during gameplay each time an opposite "direction" is pressed by the user... Additionally, the patterns will also have alternate definitions to shift during a thread. Essentially, this can be broken down into two different questions, each of which MAY have a different solution. 1) If the PC is facing left, the 4 SPRITEs will have patterns A,B,C,D---- if the PC is facing right, the SPRITEs will have patterns E,F,G,H. 2) During the game loop, the left-facing collection of 4 SPRITEs will change their patterns back and forth (from A to B) During the game loop, the right facing collection of 4 SPRITEs will change their patterns back and forth (from C to D) (please note that the "A,B,C,D" in the first question have no relation the the ABCD in the second question) To clarify: This would take 16 characters... 4 characterss for left facing "A", 4 characters for left facing "B".... 4 characters for right facing "A", and 4 characters for right facing "B" So, all that was to ask the following question: "Would it be faster/better/more efficient to take up 2 character sets and simply use "CALL PATTERN" for each of the SPRITEs, or to actually do CALL CHAR(96,PAT2) and re-define the same 4 or 8 characters over and over? I HAVE the character set space available to do all 16 patterns and use CALL PATTERN to re-define the SPRITEs, but it would wipe out every available character I have. But if it's faster, I'd be willing to sacrifice all of it for this purpose. Perhaps using CALL PATTERN for the threaded A-B shift would be best, but CALL CHAR might be best when swapping between right and left... This way, I'd only use 8 characters total and only re-define the characters when swapping from left to right or vice versa... I tested this in Classic99 with a simple program, but it's not within the actual game loop in which this routine will be placed, so the speed difference isn't noticeable. Is there a theoretical reason to believe one would be preferable over another, or will it just take doing both and testing... The CALL CHAR method would take quite a bit of time to put together, whereas the CALL PATTERN would be easy to write... but that isn't really indicative as to which is "faster"... Any help you guys can offer (philosophical or otherwise) would be appreciated. =) P.S. Sorry for the length of this post... I had to lay out the actual issues to make it understandable and not abstract. Thanks! Edited March 10, 2011 by Opry99er Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.