Re: A85: Which is better
[Prev][Next][Index][Thread]
Re: A85: Which is better
The sprites I was going to use weren't the actual rooms, rather they were
pieces of a room. If you have a corner that looks like this:
UpperLeftCorner:
.db %11000000
.db %10000000
You could rotate it 90° to the right, you get this:
UpperRightCorner:
.db %11000000
.db %01000000
I don't think I'm going to do this anymore. I think I'm going with my
dynamic sprite idea. That way I'd only have to calculate what the
current room was once and if a spell is cast to clear all of the map
you've uncovered, I can simply call CLEARLCD and then just draw the
current sprite and not have to calculate rotations again. I especially
like the dynamic sprite concept because at any time I only have the draw
data for one room while in my first game I had all possible draw datas.
There were 33 different rooms including special rooms such as the shop,
exits, and locked rooms in my first game and the data for that game
turned out to be larger than the actual main program. In my sequel, I
plan to have a total of 65,536 different looking rooms. This doesn't
include the special rooms or clipping. With these attributes included
there are at most 4,294,967,296 different types of rooms. Pretty big
huh? Here's why:
4 bytes/room
8 bits/byte
2 possible combinations per bit
SOOOOOOooooooo...............
2^(4*8) = 2^32 = 4,294,967,296
OR
4 bytes/room
256 possible combinations per byte
SOOOOOOooooooo...............
256^4 = 4,294,967,296
Wanna know how many possible maps there are?
162^4,294,967,296
Thank God for assembly
egillespie@juno.com
"In a prototypical world, nothing ever goes wrong." -Scott Meyers
_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]
References: