March 24th: Cache

Completely out of it today, achey and sleepy and generally not in a very productive place. Was still able to fix the bugs I left for myself yesterday, but unfortunately discovered that the changes I made were not quite as efficient as I had imagined them to be. I actually had a hunch this might end up being the case, but I disregarded that hunch.

Anyway, it’ll take a bit of thinking to figure out the most efficient way to handle level drawing/caching. Ideally I want to either a) front-load the work, so it all happens when you enter a level and the loading is covered by the transition, or b) spread out the work as much as possible, so it’s constantly loading and caching the parts of the level you’re most likely going to see next and it rarely has to take any extra time to draw it. I found that there’s a scroll function for bitmaps which is substantially faster than just drawing the bitmap to itself with an offset, but it’s still pretty heavy to scroll the tile cache and draw the new sections whenever the player moves — not sure how much of that load comes from the former and how much from the latter, which would affect my strategy. Dunno, I’ll figure out some approaches tomorrow. Maybe there’s some good stuff out there I can look up.

Advertisements

About problemmachine

What is the nature of your problem? Can we modify the nature of your problem? Can your problem be touched? Eaten? May we eat your problem for you? May we eat your soul for you? Would you like a replacement problem? We make problems. We eat souls. We crap solutions. We are Problem Machine.
This entry was posted in Daily Update, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s