IT Hare on Soft.ware

Disclosure: On this site you won’t find specific advice on “how to call function xyz()”. Interpreting C++ ARM and #pragma dwim is also out of scope.

We’re treating our readers as intelligent beings who can use Google and/or StackOverflow, where all such specific questions were answered more than once.

What you will find is opinions on all the aspects of software development (from UI to scalability, reliability and security) for all kinds of systems (from large-scale systems to embedded ones), the reasoning behind those opinions, and tons of practical observations, which may help you to choose what you really need for your specific task.

Your mileage may vary. Batteries not included.

 

C++ for Games: Performance. Allocations and Data Locality

BB_part094_BookChapter013a_v1
Abstract: “Allocations and related lack of spatial locality can be DAMN EXPENSIVE”
Quote: “During the times of Ancient Gamers (also known as times of Atari, ZX Spectrum, and Commodore64), CPUs were running at clock speed of a single-MHz (and one operation usually took several clocks). At the same time, memory run at about the speed comparable to that of CPUs.”
[]

Marshalling and Encodings

BB_part093_BookChapter012a_v1-2
Quote: “Encoded data size is especially important for Client-Server communications, and less important (within reason) for Server-to-Server ones and for locally-stored format.”
Another Quote: “On the other hand, due to being optimized for CPU operation, Flatbuffers are NOT optimized space-wise; even compared to not-so-optimal-space-wise Google Protocol Buffers, Flatbuffers can lose additional 1.5x in size”
[]

Network Programming: Socket Peculiarities, Threads, and Testing

BB_part091_BookChapter011e_v1
Quote: “I am not saying that this architecture is the only viable one, but it does work for TCP for sure (and performs reasonably well too)”
Another Quote: “The whole task of optimizing performance beyond, say, 20-50K packets/second per box tends to be Quite Elaborated, and involves quite a few things which are platform- and hardware-dependent.”
[]

TCP and Websockets for Games

BB_part089_BookChapter011d_v1
Quote: “TCP is a byte stream, the whole byte stream and nothing but the byte stream”
Another Quote: “if all packets reach Client, there isn’t that much difference between TCP and UDP”
[]

UDP for games – security (encryption and DDoS protection)

BB4KS_pic_0002
Quote: “Yes, you DO need to encrypt your UDP traffic. And no, using UDP is NOT a valid excuse to skip encryption”
Another Quote: “Personally, I prefer to think of it as of insurance – when I’m paying my premiums in hope that my money will go to waste.”
[]

UDP from MOG Perspective

BB_part087_BookChapter011b_v1
Quote: “you may think of UDP as of an analog of good old C: you can do pretty much everything, but it is not because the language helps you – it is rather because it doesn’t stand in the way :-)”
Another Quote: “As most of the routers (including pretty much every backbone router out there) are not configured to support multicast, it makes multicast over the public Internet hopeless :-(“
[]

Book “Development and Deployment of Multiplayer Online Games” is on Kickstarter!

BB_part085_KickStarter_v1

For better or worse, but my upcoming book “Development and Deployment of Multiplayer Online Games (from social games to MMOFPS, with stock exchanges in between)” is on Kickstarter now… “Beta” of the book (available on this very site) has been praised by quite a few senior developers from the industry (from Amaya to Zynga, with quite […]