Sunday, November 27, 2016

Progress Update #4


Code Update:

    Alright, so I have spent probably way more time trying to come up with a magic heap management based solution to my multi-threading problem but alas I have not been able to come up with anything. so after awhile i waved the white flag and just embraced the already subtle client/server over tones of my code. So how it works now is I've split the physics system into 2 systems, the client physic system runs in the same thread as the graphics system while the server physics system runs in it's own thread. The server physics system handles all physics calculations and calls a callback function for every time an object moves. This callback then creates a list of all the changes in the position of these objects. After it has finished all of it's calculations the physics server will then toss the list at the client. When it's the client's turn to run it adds the new positions for all the objects and then figures out the interpolations for them. These interpolated positions then get rendered to the screen and so far I'm quite happy with how it has turned out.

    I have done some tests to see how well this works. With a debug build (adds a lot of extra work for the system) 1000 objects caused the physics server to run at 1 frame every 10 seconds, while the client ran as a some what tolerable 15fps. So while the game world had significant slow down, the gui was still somewhat usable. In the release build with 1000 objects, the game did 60fps no problems. With 2000 objects in the release build I don't know what the frame rate was but I noticed no slow down. With 3000 objects in the release build the ram usage for some reason suddenly jumped up to 14GBs and then the game crashed when there wasn't enough memory, so that's something I'll probably need to look into later. For now I'm quite happy with the results.

Learning to Art Update:

    I kind of got sick of drawing stick figures over and over again, so I decided to try drawing basic geometric shapes. Where upon I found out that I can sketch circles and triangles just fine, my squares leave some what to be desired, and my cylinder is a horrible abomination of nature. So I ended up drawing cylinders over and over again, kind of like I did with the stick figures. Like with the stick figures they got better as they got smaller over time. So I'm not sure if drawing them smaller counts as that it just might not be that I'm getting better but that smaller cylinders are just easier to draw. After awhile of that I kind of got sick of drawing being just all work, everything I read says it's supposed to be fun, but so far for me it has just been a dull boring grind. So I decided to shake things up a bit and try to have some fun with it. I found an online tutorial of how to draw Bulbasaur and proceed to draw what I've now named Retardasaur. The thing looks like it was severely beaten about the head as some point in it's life. So my plan now is I'm going to draw this over and over again until I get something I'm happy with.

No comments:

Post a Comment