PLEX Update

Leave a comment Standard

Okay, so my blitting is working again but it’s not working up to my standards. Yes, it removes the character from the screen but its re-loading a much larger piece of the board then I want it to. I’m still working on getting it to exactly where I want it (a small bounding box around the player’s last position on the board) but I need to get other work done as well.

Now that the character is moving around again without leaving a trail behind, I’ve switched it over to using a local x and y value. What this does is calculate the character’s position on the screen based on the maximum blocks in the window. So you could be looking at a 5 x 5 block of squares around position 50, 50 but instead of drawing the character off the screen like it was before, block 50, 50 is in the center of the screen and the character orients itself around the top upper left corner as the 0, 0 coordinate. I’ve done this by modding the character’s global x and y value by the maximum visible blocks on the board.

Now the next thing I’ll be working on is getting blocks from other parts of the board to re-draw themselves and to finish re-positioning the character after it has moved off of the current frame of blocks. I’m including some pictures below to help explain what I’ve been doing.

Blitting Problems

Visible Blocks

Advertisements

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