wtorek, 5 sierpnia 2014

Mini-games and bug fixing - part two

Hello everyone!

I spent this week fixing bugs that still had left in game code and I can't believe that there are so many of them ;) I'm pretty sure that you can easily find some more, but let's talk about fixed ones now.

I reworked whole Animation class, which felt very complex at the beginning, so I skipped this task of the project at that time and work on it now.

Some frames of sprites in Prince need decompression process before drawing them. Initially, specific frame was unpacked every time the game wants to draw it, which for looped animations (like background animations) wasn't optimal.

At first attempt I changed loading function of Animation to decompress all frames of it when it is used for the first time, so every frame was unpacked just once. It turns out that this wasn't the best solution. Unpacking about 300 frames during the gameplay, not in location loading, can freeze the game for a while and player can see it. I decided to change this conception to find a golden mean for it. So now, each frame is decompressed just once and it's stored for later use, but it's done when game draw it for the first time, so it's not loading all frames at once. I made Visual Studio performance test for this solution and it looks like everything is working well now.

Next part that I was trying to finish this week were mini-games. I was able to fix four of them: "clip-clap" with bartender, one-armed bandit, "Mr. Sun puzzle" and "Throw a rock" . I don't want to spoiler a lot, so here are just a few screen-shoots of them:

"Clip-Clap" with bartender
Mini-game

One-armed bandit
Mini-game

"Mr. Sun puzzle"
Mini-game
"Throw a rock"
Mini-game

I still have to implement last one, which appears at the end of a game.

Rest of things that I fixed this week:
- hero special animation drawing (position of animation and last frames)
- hero running
- inventory  - saving, swapping, opening and new item adding animation
- German texts drawing
- background script interpreter during dialog-boxes
- cursor after loading

Brak komentarzy:

Prześlij komentarz