Week 11 Summary

This week, we did a lot of preparations for Night At the Museum. Even though we had Wednesday off from school, I was still hard at work mapping out all the remaining collisions that we hadn’t previously finished, and trying to implement NPCs into the game, along with the dialogue function I had made.

On Tuesday night, I spent around 4 hours mapping out the collisions on a few maps, but ran into a problem. When I tried testing the collisions out, on certain maps, the Lopez sprite would completely vanish upon moving. I had this problem going into the next day, but decided to finish the collisions first before figuring out the problem with the sprite. I spent more time mapping out the collisions on the maps I didn’t finish the map before, and then tackled the vanishing problem.

Debugging Issues

This was my first time “debugging”, so I decided to try and isolate everything that could be a factor. I consulted ChatGPT first, but it could not provide any answers. So, I made a copy of the current code and started removing things one by one, and running make to see if it would work or not. For example, the first thing I removed was the collisions on the affected maps, and testing to see if Lopez sprite would disappear or not. He did, so I came to the conclusion that the collisions were not the problem. Therefore, they could be implemented back in, and it was time to move on to the next factor. I went through this process in the different backgrounds, trying different images, and trying to change the movement script. In the end, it turns out the problem was the sprite scale factor. I changed it, and now Lopez sprite would not disappear.

Along with the collision problems, we also had to finish putting in the Professor Mortensen NPC in his laboratory, as well as his dialogue. Putting it in wasn’t too difficult, but I did have problems with the text, as its position was relative to the size of the computer screen and not the game canvas or top menu that it was placed in.

The last change that I made this week was attaching a link to the title screen image on the index.md. This was a simple thing, but I think that it added some polish to the game, especially making it easy for those to figure out that just clicking on it will bring them to the game rather than looking for it on our website and in the time box.

All in all, we were able to make it to Night At the Museum with minimal difficulties, and our game seemed to be well received by the public. Though it was simple, I had a lot of fun making the game over the past few weeks.