Saturday, September 3, 2016

TOE week 13: The Zoolander Conundrum

                Part of the nature of Game Development is that as you add in new things your old things start to break. This is entirely normal even if it is annoying. I mean if you’re working on a team of a hundred people things can go south real fast. There were days when I couldn’t test my work because the game didn’t work at all that day. If you can’t test your work you can’t verify that it is working so you cannot check in your work. It is somewhat more manageable when you’re the only one making the changes. So I had thought that I had finally made it to the art portion of the game. Well at least for a little bit anyway. I was excited to start painting this thing so it wasn’t just a bunch of squares! I then added in 4 sprites. Basic floor tiles that display over the collision and something snapped. 

                Suddenly my push colliders push values were too low. They would no longer strong enough to push the player. Very strange! My best guess is that this is a frame rate issue. Like my sprites decreased the frame rate so the force is no longer applied at the same rate. But we aren’t taking about significantly large sprites here we are talking 100 x 1000. I don’t even know if the sprites are what broke this either. They were just the last things added and then when I hopped into the push colliders they didn’t work anymore in the Y direction. The power was too low. 

Then I found out something that really confused me. My code for walking up a second hill apparently never worked. So if I have two colliders both at odd angles like 22 and 45 and they are touching, however you cannot walk up the second hill. You instead bounce up the second hill. You couldn’t tell that this was happening until I added in the player head. I rearranged the code and then instead of bouncing up the second hill you fall right through it… Clearly not ideal.  Okay so I looked at the code and found a sign error something was negative when it wasn’t supposed to be, great problem solved! Then I was even more really confused. It only works when the player is heading right. Like going up a hill to the left and you fall through the second hill.

The dumb thing is that I can’t seem to fix this. I have tried all of the things that make any since I even tried breaking it intentionally and going right still worked. I have tried to fix this for three days with no clue as to what is happing. It SHOULD work. Basically the right corner of the player tests for collision when going up a slope then when the slope is not the same angle as it was previously recalculate player velocity x and y. Going left it changes to the left corner to test for collision but it is like that never happens and I don’t know why. 

I am worried about the addition of the artwork. I was stoked to be finally able to add in the base for the pretty colors. The possible drop in performance has got me spooked. Why would adding in a pretty small image tank my frame rate so much to change calculation speed? I mean I have plans for adding in much larger images. Like two 2048 x 1024 backgrounds and what not, something less than half that I would hope wouldn’t tank my frame rate. Or I am doing something VERY wrong. The truth seems to be that as much as I have been able to accomplish in these 13 weeks I still don’t know what the hell I’m doing.

In more productive news. My ducking functionality seems to be working better. Like I went through and prevented the player from moving while ducking and various other things that have been completely overshadowed by the total eight car pileup of a week this has been. Unfortunately though for the immediate future the player character is stuck being Zoolander… And that sucks. It really is defeating when you can’t see it and it continues to evade you. I probably have to show it to someone or tear it down entirely and rebuild it from scratch. Something for next week I guess. 



No comments:

Post a Comment