Recently, a member of a game development mailing list asked me what random number algorithm I used in the Space Plumber game. This small document describes it.
First, I want to remember everyone that real random numbers are impossible to create on a computer because computing is deterministic BLAH BLAH BLAH I JUST WANT THE FUCKING CODE.
Ok, here it is:
unsigned int sp_random(unsigned int *seed, unsigned int range)
/* Space Plumber's random */
{
*seed = (*seed * 58321) + 11113;
return (*seed >> 16) % range;
}
It accepts two arguments:
time() or something like that.
The sp_ in the name, unsurprisingly, comes from Space Plumber. It's not written exactly this way there, though.
The output value will be an integer from 0 to range-1, sufficiently unexpected to be used as a random number in games and such (don't make me laugh about cryptographically-secure values).
It's based on the wrapping of the 32 bit multiplying operation, so it won't work with floating point arithmetic.
So you were a great system programmer, back in the old days; your low level programs were celebrated by clever people, you loved C pointers and some days even considered Assembler as an option. You were happy and self-confident. But somehow you screwed something, got trapped in a time vortex and you ended today, trying to maintain or develop a program using that pesky Object Oriented Programming model in something called C++. I understand you; follow this guide and learn a bunch of things that will put you out of your misery and understand this brave new world.
Artemus is a template toolkit. It filters text files, parsing, compiling and executing code surrounded by special marks (leaving the rest untouched) and concatenating everything as output. Its main purpose is to filter HTML files, but it can be used for any scripting need related to text filtering and substitution.
This reference documents version 2.2.0 of the MPSL Function Library.
MPSL (Minimum Profit Scripting Language) is a programming language concieved as a scripting engine for the Minimum Profit Text Editor, though it can also be used as a general-purpose programming tool.
This document describes the character encodings supported by the Minimum Profit text editor and the performed autodetection tests.
Por Mark Pilgrim, traducción de Ángel Ortega. Artículo original: http://diveintomark.org/archives/2008/12/30/give-part-3-lossy-audio-codecs
Por Jonathan Corbet, traducción de Ángel Ortega. Artículo original: http://lwn.net/Articles/313682/
Por Mark Pilgrim, traducción de Ángel Ortega. Artículo original: http://diveintomark.org/archives/2008/12/19/give-part-2-lossy-video-codecs
Por Jake Edge, traducción de Ángel Ortega. Artículo original: http://lwn.net/Articles/302251/
Por Mark Pilgrim, traducción de Ángel Ortega. Artículo original: http://diveintomark.org/archives/2008/12/18/give-part-1-container-formats
El algoritmo Diffie-Hellman permite que dos partes, comunicándose mediante un canal no cifrado, se pongan de acuerdo en un valor numérico sin que un tercero, que tiene acceso completo a la conversación, pueda conocerlo o calcularlo, al menos en un tiempo práctico.
This is a list of Frequently Asked Questions about the Gruta web content management system.
This document contains a brief guide for the installation of Gruta, the web content management system.