• Register
Post news RSS A Network Adventure

This week I rewrote a large swath of Istrolid network code. Oh boy was it long overdue! The network was taking way too much CPU to compute. Oh and some gifs...

Posted by on

4/27/2015 - A Network Adventure

This week I rewrote a large swath of Istrolid network code. Oh boy was it long overdue! The network was taking way too much CPU to compute. Originally I just copied the whole simulation state and performed a diff with the previous simulation state and sent the diff out to the clients. At the time I just wanted to play the game and not get stuck with stupid network logic. It was fast to write, it was easy, it was not efficient. Now I just do it with less copying objects around. I also reuse a lot more objects to appease the Javascript GC God. Have mercy on me and don't eat my FPS or produce frame jitter.


Also someone on IRC came around and looked at the performance profile for my game in Chrome tools and found my deepCopy function was taking like 60% of their CPU. I was embarrassed so I set out to optimize it. It runs much, much better now. My next step is to convert it to a binary protocol and make the clients predict more... but this will be built on top of this system rather than the old copy/diff the whole state. Now the CPU time is spent in copying webGL buffers around, a much better use of CPU time.

I submitted some Istrolid screenshots to Screenshot Saturday on Reddit. Some people came and left. But it became clear to me that GIFs show off the game way more. I really like the gifs in this game: Sky Rogue

So with this new found desire to make gifs, you guessed it, I also tried to make some GIFs and even record a commentary on a match. Even though I learned I suck at making gifs, I suck at commentary more. I am too embarrassed about the commentary video so you will never see it. But here are the gifs:

I put the gifs on the front page so that was cool.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

News
Browse
News
New
Post news
Share
Related Games
Istrolid
Istrolid Real Time Tactics