most least significant bit,
msb,lsb,big,little,endian msb[1,0,0,1]lsb, pop3,imap,rc4,base64,xml,zlib,registry,opengl,rsa,ssl,md5,xor cipher ,ftp,html,ports 80,20,21 , mysql, http, post,get,cgi,sockets, win32api,gui,windows,inf,rgb,palette
binary 8,4,2,1, zero and ones 0011,logic and not or nand xor nor,shift bits left right,power,sin,cos,sqr,sqrt,min,max,degress to radians,abs,floor,wrap,pi 3.14159,vector,normalize, magnitude ,direction,dot and cross product, hash functions sha1, ascii characters set,
strings,int, float, integer,short,word,dword,boolean,byte,bits, binary,octal,decimal,hex,matrix,ocr,neuron,weight,threshold,socks4,tcp ip,fat32, ntfs, exfat,partition, GUID, 8 bit 256, 16 bit 65536, 32,64,128, #FF , frequency, amplitude, gdi, ram,rom,circular buffer ,Inverse-square law, point_direction, distributed hash table, peer routing table, bootstrap node, pwm, random, randomseed,
kb 1024, 1000
mb=1024*1024, 1,000,000
gb=1024*1024*1024 1,000,000,000
tb=1024*1024*1024*1024 1,000,000,000,000
3d, view frustrum ,backface culling, painter's algorithm, ray tracing, binary space partitioning (BSP) , Visible Surface, md2 3d model, polygons quads,fps,camera
circle,point,x,y,radius,diameter,circumference
circle radius,
circumference divided by diameter gives PI,
by multiplying 3.14 pi by the diameter of the circle gives the circumference
point_distance(x1,y1,x2,y2), x = pow(x1-x2,2) y = pow(y1-y2,2) return sqrt(x + y)
if distance between two circles is less than combind radius than colliding with eath other
cellular automata,turing machine, lexer, parser, virtual machine interpreter, bytecode, x86 asm, opcodes, z80,6502,arm,4000 chips,pic12f675, nop 0x90
CPU, alu, control unit, registers, fetch,program counter, data bus, address bus, store, load, interrupt,, system clock, full adder, shift register, jk flip-flop, bcd, decoder, multiplexer,opcode
asymmetry, symmetry,
bresenham's line algorithm, flood fill, eclipse,virtual screen, c malloc,dos mode 0x13, 0xA000, 256-Color.
texture mapping,sprite,texture atlas
steering behaviors flee,arrival,wander,seek,
delta time, frame rate independent movement, system time,
1000 millseconds per second , pixels per second 120
120/1000= 0.12 *elsapedtime, delta time
1000/60(fps) =16.666666666666666666666666666667
0.12*16.666*60 =120 pixels, bitmap
0.12 speed
16.666 delta_time
x+=cos(angle)*speed*delta_time;
y-=sin(angle)*speed*delta_time;
k value between 1 and 26 the key,
shift cipher,
cipher mod 26,
perlin noise, encryption alice bob, private, public,key,
linear interpolation,lerp,distance -kademlia,field of view, serialization, deserialization, json, inputs, outputs, dma,immediate,absolute,memory mapping, lookup tables,truth tables,stacks, pop, push,top ,queues,first in first out, last in first out, FIFO & LILO , LIFO & FILO, link list, double linked list, node,child,root,head,tail,pointer,
two's complement, addition, subtraction, a star, modulo, windows environment variables, a variable
a=not(a) toggle on and off 0,1 repeatedly
(angle * (PI/180)) degtorad
(angle * (180/PI)) radtodeg
and_bits(test_integer, 1) = 0 is_odd or is_even
record input steam plus delta time between frames
then to playback replace the delta time with the record dt and to keep the same game state make everything deterministic and update each system with the dt, use the record input stream to create the output stream at each tick of the game 8 bits for movment 1 bit for each button plus 4 bytes for the dt
also a global seed for the random_seed function saved
function wrap_between(integer v,integer min, integer max)
return v - (max - min) * floor( v / (max - min))
end function
hash a image
image_data[23,1,66,12,11,7...] rgb colour values from a picture 24bit
16,777,216 colors
for i=1 to length(image_data) do
hash_index+=image_date
end for
return wrap_between(hash_index, 0,1000) room for one thousand images with hash collisions
packet protocol 5 bytes+data
5 byte header+data, per packet type
[1,0,0,0,10]+['h','e','l','l','o']
first byte packet id 0--255
next four bytes, data length is the total size of the packet-5
read and write ,byte,string,int,float,bool,short
if (buffer>=5)
{
packet_id=buffer[0]
packet_length=buffer[1..4]
if (packet_length>length(buffer)-5)
{
//packet is ready to be read
packet_id //decides the amount and type of bytes to read from the data buffer
}
}