Pages

Tuesday, August 21, 2012

Paving the way!

Hey guys,

    Sorry it's been so long since my last real update! But I'm here today with good news and bad news. The Good news is that I've been hard at work updating QFang quite a bit! The Bad news is that there are almost no visible changes.

    I've spent the last few days working on optimizing my code. Previously, the game sent a total of Six messages per frame (and the game runs at about 60 Frames per Second, meaning about 360 messages per second) to update the player's location, height, appearance, rotation, etc. As of now, I've limited that to Two, meaning that rather than each client sending over 360 messages per second back and forth to the server, it now sends about 120. So, in essence, the game is running approximately 3x Faster than previous! Soon, I will modify the game to send just one message per frame, which will make the game run 6x Faster than previous, but that can wait.

    I've long anticipated working on the enemy system in the game, but I felt it was necessary to get this speed boost before starting so I didn't end up trying to fix a laggy game. Instead, I now have a game that is ready to take on an extra FPS drain. I won't go into the details, but with all of the entities in the game so far, I've cut the messages being sent to the server each frame down in total from about 3,840 to approximately 1,000.

    Oh yeah... and I've added in the game's first enemy:


All he does as of now is sit there. When you click on him, the game will tell you that you clicked on an enemy. Soon, clicking on him will start a combat situation, and he will free roam.

That's all I've got for now. Thanks for reading!
Dan

No comments:

Post a Comment