Friday, September 3, 2010
SEQ.BREAKER DEV. JOURNAL # 21: TILESETS TO THE RESCUE!
Rather lazily, I've been making walls of my wall object. That is, every 16x16 pixel block in the above picture is actually there, an actual object, even if there's no way the player can interact with it. For the first level, this presented no problems. But for the second, which is substantially larger (each room, again, not being a separate "room" but one continuous interconnected space) and features a lot of water (with each 16x16 block of aqua being, yes, an object), the sheer number of objects caused a lot of slow-down. As in, the game was running at about half-speed.
Now, there's nothing going on, code-wise, within those instances-- no alarm events, no detections, all the collision information for those object types are contained inside the player object-- but it still was putting a tremendous strain on the computer. And as soon as this happened, I realized, I'm going to have to go in and remove as many as those objects as possible, replacing them with tilesets (which take up far less memory).
Now, I love working on my game, but one thing I hate doing is tedious work, such as, oh, I don't know, going into a room and clicking on swaths of 16x16 objects and then replacing them with tilesets. But tonight I finally got off my ass and did it, and as a result, the game is running at the brisk and intended speed of sixty frames per second.
Remember, game makers: tilesets are your friends.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment