Posts

G A M E S

Image
 Just going to mention some of my favourite and inspiring games. Besides board games like Monopoly and Payday, the first games I enjoyed were Choose your own adventure books. A simple memory game, but an enjoyable way to get kids to read books. A friend at school during the choose your own adventure craze, brought an interesting more advanced book based game to school. Be an interplanetary spy.  This was a different choose your own adventure. Instead of simple choices the player completed puzzles to move to a new page in the story. Here is a sample page showing some puzzles that advanced the story. The next story book evolution was my favourite. Fighting Fantasy by Steve Jackson games. It was a LITE version of Role-playing games that did not require a Game Master.  The book included a game sheet. My father was a Tattooist so I used his photocopier to create as many game sheets as I needed. I eventually made my own stories and my game sheets also had a picture of a person for adding arm

V P U

Image
Just thinking about a hypothetical "VPU", or Voxel Processing Unit. It would only require 16 instructions: NOT - bitwise NOT of register.  OR - bitwise OR of register.  AND - bitwise AND of register.  ADD - register addition with register.  SUB - register subtraction with register.  MUL - register multiplied with register. RS11 - right shift register 11 bits.  RS13 - right shift register 13 bits.  RS8 - right shift register 8 bits.  ZSUB - zero subtracted from register.  AND255 - register AND 255. 256SUB - 256 subtracted from register.  ADD256 - 256 added to register.  SUB256 - register subtracted 256. JELZ - jump if equal or less than zero.  JEGZ - jump if equal or greater than zero.  A total of 23 variables are used in calculations so they could be loaded into a 32 general register system at the start with a final pixel colour returned.  Alternatively a RISC-V approach can be taken. First registers are constants: register0 = 0 register1 = 256 register2 = 255 register3 = 8 r

MATH

Image
 The dot and cross products can be used to detect collisions between rays and AABB's. This is the cross product version. Repeat the process with another axes pair say x, z. Use the y component formula to get y1, y2, y3, y4. If either views have No collision then No collision has occured. Using only two axes pairs will fail if x and y are zero. Testing all three axes pairs eliminates this bug.  This is the dot product version, very similar to the cross product version. Using the cross product and dot product in a grid allows iso-surface extraction. I will call these iso-surfaces "Plancktons".  Marching cubes iso-surfaces. Marching cubes is basically a lookup table that converts voxels into triangle surfaces. It has 256 possible surfaces. "Plancktons" are derived from a formula and can produce billions of possible surfaces. To test for a collision between a voxel (sx, sy, sz) and a AABB use this : if(!((sx-x1>>>6)|(sy-y1>>>6)|(sz-z1>>>6)

CODE

Image
"The prevention of tyranny and the restoration of order is just" WUTZU THE MASTER,The sayings of WUTZU. CORE 2D A multi canvas multi core renderer The multi canvases stacked on top of each other. core1. js core2. js core3. js Code Editor by Rhythm Software HTTP Server by Phlox Development Output from Code Editor Output from Edge for Android Output from Opera fullscreen Offscreen canvas is working and will give a performance boost This is the worker file And this is the output Will be alot less code as well as faster rendering. I have been waiting for offscreen canvas for a decade. Writing to the canvas with a context in a web worker feels so weird. But I should get a noticeable increase in rendering speed. I like how simple it turned out to be. Just edit the canvas in the worker and the main thread canvas gets updated. This is so cool. Coolest API ever!  Navigator getGamepads was originally going to be eventhandler based. Instead they went for time slice of axes and button st