Friday, April 29, 2016

Python: virtualenv quickstart

Installation

pip install virtualenv

Usage

mkdir myproject
cd myproject
virtualenv foo
source foo/bin/activate
pip install hjson       # install packages...
./foo/bin/python
import hjson

Getting pip if necessary

curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py
python get-pip



Getting ssl if necessary in order to get pip on your linux box

symptom:    ImportError: cannot import name HTTPSHandler

yum install openssl openssl-devel
or
apt-get install openssl openssl-devel


References
https://pip.pypa.io/en/stable/installing/
http://docs.python-guide.org/en/latest/dev/virtualenvs/

Wednesday, April 27, 2016

Encrypting UDP Game Traffic

not only encryption protects your players from classical attacks, it also protects your games against cheaters too.
As a side bonus, with proper encryption you can be sure that network errors which corrupt your packets are not going undetected (and with unencrypted UDP those 16-bit UDP checksums can detect only one out of 60’000 in-transit corruptions, which means that with all those millions of packets you’re sending out each second, some corruptions WILL go undetected, causing all kinds of trouble).

http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/


Tuesday, April 19, 2016

Classic Programmer Paintings!

http://classicprogrammerpaintings.tumblr.com

My Favorite:




Hieronymus Bosch “A visual guide to the Scala language”  oil on oak panels, 1490-1510.

The left panel shows the functional features, the main one describes the type system, and the right the object oriented parts.