I'm working on a game in basic, and the graphics are taking up a lot of data.
It's time to optimize, and I'd like to know if anyone knows the most efficient way to define a sprite in Basic.
Here's what I'm using right now:
FOR I=0 TO 31 READ A$ B$=B$+CHR$(VAL("&H"+A$)) NEXT SPRITE$(0)=B$ DATA 3C,70,E0,E0,E0,E0,70,3E,1F,E,3,D,E,1E,1E,3C,3C,E,7,7,7,7,E,7C,B8,D0,E0,F0,F0,78,78,3C
I prefer using HEX codes for the graphics, as they are generally shorter and you can delete all the leading 0's to save a little extra space, but I don't know if this is the most efficient way of defining a sprite in HEX.
Is there a totally different way of defining a sprite that is even better than using HEX, or can my code be optimized even more?
Thanks for your input.
Login أوregister لوضع تعليقاتك