gozar Posted January 3, 2014 Share Posted January 3, 2014 I'm working on writing my first game in Action!. It's a two player game, and the players are identical except that they are mirrored. I'm storing the shape data in a BYTE ARRAY, is there a trick to flipping my player? Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 4, 2014 Share Posted January 4, 2014 In terms of speed it's probably the quickest, in terms of memory not the best but 256 bytes + the programming requirement isn't much. Essentially you just use the original data as an index into the array, then store the looked up array entry into the graphics for the object. A more memory efficient way is to just use a 16 byte table and operate on each nybble at a time. But the saving isn't quite as much as you'd think as it's extra programming and execution time, so a 256 byte table is probably best by far. So, your lookup table would look like (index, entry) - first 4 and last 4 in hex: 00 00 01 80 02 40 03 C0 .. FC 3F FD BF FE 7F FF FF Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.