See.. now here's one of those places where I get into trouble. I have some choices, and I usually pick the hardest one if it's a matter of doing things " Hence building an entity system from scratch when there are many tried and true methods of doing roguelikes that don't use one.
The problem: Since the game is grid based, when a player moves he goes from space 1,2 to space 1,3 for example. But, depending on the size of the sprite, say a 32x32, he moves 32 pixels each time he moves. Now, do I have the rendering system look at a the single spaced grid and just multiply coordinates by 32 for every single thing it needs to draw? Seems like a lot of calculations. Maybe the compiler knows enough to just bit shift a few spaces over so the multiplication is trivial. Dunno. Maybe I should keep track of two coordinates for everything, and only do the multiplication when something moves. Maybe I should make a lookup table where all the multiplication is precomputed. I dunno. Crud. Hate stuff like this. I guess I could time it, see what's fastest. Then again, this is a turn based game, there's not really any FPS target to worry about. Maybe I should be worrying about just making something that works and not so much on the best way to do it. :P Ugh..
No comments:
Post a Comment