Skip to content
Richard Sahlin edited this page Oct 25, 2024 · 1 revision

Welcome to the varg-engine wiki!

Some random thoughts:

Turing Organism

In order to support programmable behavior for a massive number of objects I am creating an opcode based turing engine for organisms (actor objects)
The goal of the opcodes are to enable behavior on a very large scale

  • more than tens of thousands of objects on a device on par with Nvidia Orin Nano
    This means that there will be no room for traditional script (parsed) based programming running on CPU core(s)
    Instead this must run in parallell on GPU.

Behavior, physics and appearance data

Each organism (sprite) has a number of data structures that define behavior, physics and appearance.
The data for each organism is accessed using load & store operators, via structures that are called builtin variables.

Opcode design considerations
Arithmetic operatos put result in accumulator, precision is determined by the opcode.
All opcodes are same size, probably 32 bits, this is to simplify branches and jumps etc.

Load & Store operators
These operators load or store values in or from builtin behavior structs.

LD[PRECISION] DEST,SOURCE
ST[PRECISION] SOURCE,DEST

Arithmetic operators
All arithmetic operators have a precision qualifier, this controlls the precision of the calculations.
Implicit conversion shall be avoided.

Clone this wiki locally