Recent News: Added Doors!

For a limited time order an early release V.0.8.1 for only $9.99 (very limited quantity)[CURRENTLY NOT AVAILABLE] All preorder sales get lifetime free updates.

The version 1.0 release of BIOCODE X™ is coming soon!!!

Welcome to the world of BIOCODE X™, this is the place for infinite fun and adventure, and where new possibilities are constanly unfolding. BIOCODE X™ is a game inspired by Minecraft. Minecraft is a great and timeless classic, what we need is a brand new game unlike anything ever played before, a game like BIOCODE X™. A new and exciting adventure that rewrites the rules of fun. It features a cutting edge in-game virtual computer that is fully programmable including png image loading and rendering onto a cube screen. This technological feat is very significant in the advancement of computer science, and provides the tools for users to create full games within the game BIOCODE X™. The community is most important, in order to connect us in ways we never thought possible. Within BIOCODE X™, structures may be encoded onto an in-game disc. This provides an effective way to share your builds easily with others, and connect you with people all around the world. Contribute, create and discover new things daily! your epic adventure awaits. Are you ready?

History

BIOCODE X™ is a 3d first person building game. It has an infinite terrain generator that uses randomized procedural generation. This game is inspired heavily by Similar block buildng games that have become ubiquitous. One of the first differences encountered, is the inability to have multiple items of the same kind occupy the same inventory or chest space. This is to provide a challenge to the removal of ground blocks when in search of ores. This limitation also encourages the creation of backpacks, which are able to also hold backpacks. A total of 5000 backpacks may be made. BIOCODE X™ has been in development since march 2015, and is written using c++, opengl and sdl 2.0. This game is unique in many ways, and it has very good performance, and is still in development at this time.

Features

There are many features to discover and enjoy while playing BIOCODE X™. At night, zombie hordes come to eat you alive! This can be combated with the use of the desert eagle hand gun. The desert eagle is able to kill a zombie in one shot, if you can hit its head. There are many features that are planned to be made in the future, these include transportation devices, a bull and much more, suggestions are welcome. Wooden cubes and objects can be set on fire by holding a torch and holding right click for a few seconds, quickly spreading to nearby wood. The barrel of black powder may only be detonated by holding a torch and right clicking, because of this, it does not damage the player yet. BIOCODE X™ will ALWAYS autosave upon exiting, UNLESS a new game is created and NOT saved. Upon saving a new game, the game will ALWAYS autosave upon exiting. Any two teleporters placed on the ground may be synced to enable instant transfer across any distance. Simply press the set button after right clicking the first teleporter, and press the sync button on the second teleporter.

Recipes

NEW RECIPE LIST WITH IMAGES COMING SOON!

There are many recipes in BIOCODE X™, they will be posted here in the following format:

NAME OF ITEM

XXX
XYX
ZZZ

X = Material 1
Y = Material 2
Z = Item 3

Refined Wood

XXX
XLX
XXX

X = Nothing
L = Wood Log

Wood Fragment

XXX
XRX
XRX

X = Nothing
R = Refined Wood

Robot

SSS
MBC
SFS

S = Iron Ingot
M = Storage Chest
B = Boiler
C = Computer
F = Furnace

Hay Cube

XXX
XXX
XXX

X = Wheat Bundle

Item Duct

SCS
XSX
XXX

X = Nothing
S = Iron Ingot
C = Circuit

Automaker

GTG
GCG
XGX

X = Nothing
G = Gold Ingot
T = Making Table
C = Computer

Bed

XXX
AAA
RRR

X = Nothing
A = Wheat Bundles
R = Refined Wood

Fence Boards

RRR
XXX
RRR

X = Nothing
R = Refined Wood

Stone Brick

SSX
SSX
XXX

X = Nothing
S = Refined Stone

Teleporter Wall

SXX
SXX
SXX

X = Nothing
S = Iron Ingot

Teleporter

TXT
TXT
TCT

X = Nothing
T = Teleporter Wall
C = Computer

Slopes

YXX
YYX
YYY

X = Nothing
Y = Refined Wood

Source Finder

GCG
GDG
GGG

G = Gold
C = Circuit
D = Diamond

Surveyor

SFS
SCS
SSS

S = Silver Ingot
F = Source Finder
C = Computer

Pistol Magazine

BBB
BBB
BBB

B = Bullet

Extended Magazine

BSB
BMB
BBB

B = Nothing
S = Iron Ingot
M = Magazine

Bullet

XXX
SBX
XXX

X = Nothing
S = Iron Ingot
B = Black Powder

Desert Eagle Pistol

SSS
XXS
XXS

X = Nothing
S = Iron Ingot

Making Table

XRR
XRR
XXX

X = Nothing
R = Refined Wood

Bucket

XXX
SXS
XSX

X = Nothing
S = Iron Ingot

Storage Chest

RRR
RXR
RRR

X = Nothing
R = Refined Wood

Furnace

CCC
CXC
CCC

X = Nothing
C = Cobblestone

Torch

XCX
XFX
XXX

X = Nothing
C = Coal or charcoal
F = Wood Fragment

Bread

XXX
YYY
XXX

X = Nothing
Y = Wheat Bundle

Black Powder

SXX
XCA
SXX

X = Nothing
S = Saltpeter
A = Sulfur

Barrel

RXR
RXR
RRR

X = Nothing
R = Refined Wood

Barrel of Black Powder

XXX
XBX
XXX

X = Black Powder
B = Barrel

Boiler

XSX
SWS
SSS

X = Nothing
S = Iron Ingot
W = Bucket O' Water

Circuit

CCC
GGG
CCC

C = Copper Ingot
G = Glass Cube

Computer

XXX
XRR
XCS

X = Nothing
R = RAM
C = CPU
S = Screen

CPU

GPG
XRX
GPG

G = Gold Ingot
P = Platinum Ingot
X = Glass Cube
R = Ruby

RAM

CGC
XDX
CGC

C = Copper Ingot
G = Gold Ingot
X = Glass Cube
D = Diamond

Screen

XCX
XGX
XXX

X = Iron Ingot
C = Circuit
G = Glass Cube

Disc

XSX
XHX
XCX

X = Nothing
S = Iron Ingot
H = Silver Ingot
C = Circuit

Backpack

LLL
LXL
LLL

X = Nothing
L = Leather

Programming in-game computer tutorials

Welcome to the programming computer tutorials section of the wiki. Here you will learn how to write programs using an in-game computer.

This is a very easy and straight forward thing to do, thanks to a very user-friendly graphical user interface. If you have never programmed a computer before, this is an excellent starting point to begin.

BASICS

Programming an In-game computer is very easy. It starts by first making a disc, which is used to store programs the computer can run. The disc may be inserted into the computer by pressing the SHIFT key and right clicking on the computer, while the disc is being held by the player. The disc may also be ejected the same way, if the player is not currently holding an item.

The computer is accessed by right clicking, and exited by pressing the ESC key. The disc should be named, and is done by picking the disc up while accessing the computer, and placing it back down. All programs are automatically saved. There is not currently an easy way to delete a program once it has been created using the NEW button, the only method is to open the .PRG file in a text editor (notepad), and remove the program manually (not recommended), however, a program's name may be edited from within the program by selecting it after pressing the EDIT button. A program's name may only be 8 characters long, and typing a name longer than eight characters from within the program may have unexpected consequences.

After a disc has been inserted into a computer, the NEW button is used to create new programs on the disc. It should be noted, that a program may be written using any style that the programmer wishes. For example, a single program could be created that runs all of the code for the program. However, it is tedious and confusing to deal with a single large program, therefore, in these tutorials, I will be showing you a possible way to break up a program into more manageable parts made of separate programs. This has the effect of allowing code to be easily reused, as well as making the entire thing easier to manage and understand.

There are three basic things involved with programming, Commands, Variables and Programs. We have already briefly covered Programs, which are simple to create using the NEW button, as well as being easy to edit with the EDIT button.

Variables

Variables are the containers for data the computer uses while running a program. All variables are signed integers (signed means they can be negative). Each variable may be named any string of eight characters including special characters (=-+*/), and MUST be followed by a SPACE if not at the end of a line.

Variables are automatically created, and will not be destroyed until the program stops. All variables are global to all the programs stored on any given disc. This is in order to simplify the process of sharing variables among the different programs without the need to actually pass and return values. This has one drawback, that the programmer must be creative in there naming of variables, as well as careful to not reuse a variable without intending to do so.

Here is an example of creating a variable:

VAR = 1

It is customary to assign a value to a variable immediately after declaring it. An important thing to note about variable creation is that they will not be automatically created if it is the second variable in a statement, for example, the following is valid:

DOG = 0

GOOD = 10

DOG = GOOD

However, the following is not valid:

DOG = 0

DOG = GOOD

This is because the variable GOOD has not been declared. Variables may also be used to return a value from a Command like the following example:

VAR = K.A

Where K.A is a key press command.

Variables can be manipulated using addition, subtraction, multiplication and division. Since all variables are not floating point (they do not have a decimal), division results in a truncated answer. For example:

VAR = 7

VAR / 2

This would make the variable VAR equal to 3, as opposed to 3.5 or 4 (if it rounded). The following is also valid:

TODAY = 14

RESULT + TODAY

This would make RESULT equal to 14, because all variables are initialized with a value of zero, and zero plus 14 is 14.

Commands

The basic commands are considered separate from the Robot API and Graphics API (coming soon), and there are seven total.

LABEL
GOTO
IF
ELSE
END
RUN
K.A

LABEL

The LABEL command is used to create loops. Whenever the LABEL command is found, a corresponding GOTO should also be found. The label name is given after the command LABEL preceded by a space, for example:

LABEL A

GOTO

The GOTO command is used to loop a program to any LABEL within a program being ran. The label to go to, is given after the command GOTO preceded by a space, for example:

GOTO A

This would place the program execution point at the command LABEL A. The name of a label or goto can only be eight characters long, and may be the same as variable names without causing problems.

IF

The IF command is used to run (or not run) a specific section of code according to the value of a variable. Here is an example:

VAR = 1

IF VAR = 1

GOOD = 10

END

The conditions can be the following:

= Equal to
< Less than
> Greater than
! Not equal to

ELSE

The ELSE command is used to run a specific section of code, if the previous IF section did not run. This should only be used with a corresponding IF command proceeding it. Here is an example:

VAR1 = 0

IF VAR1 < 1

VAR1 + 10

END

ELSE

VAR1 = 100

END

END

If you have made it this far, good job, we are almost done! You may have noticed the command END used with the IF and ELSE commands. The END command tells the computer when the end of an IF or ELSE statement is. It is very important to include this at the end of the IF and ELSE section of code. An IF or ELSE section of code may contain as many lines of code necessary, therefore, if the END is not included, strange results may occur.

RUN

The RUN command is the most important command to make it practical to code anything useful. This command will execute any program stored on the same disc. As mentioned earlier, programs are created by pressing the NEW button, and are edited by pressing the EDIT button and selecting it from the list of programs.

As an example, lets say the first program you created on the disc is called START, which is the name I usually use. I use the program START as the main loop for the thing to run. A program is simply an infinite loop of code run until the variable condition is changed. Here is an example START program:

RUN INIT

LABEL A

IF LOOP = 0

GOTO B

END

RUN TICK

GOTO A

LABEL B

Empty lines may also be added to make the code more readable. Here is the program INIT used in START:

LOOP = 1

BOOKS = 0

Here is the program TICK:

IF BOOKS < 10000

BOOKS + 1

END

ELSE

LOOP = 0

END

This program first runs the program INIT, which declares two variables; LOOP and BOOKS, while also setting their initial values. The program TICK is then run as long as the variable LOOP is equal to 1, however, in TICK, the value BOOKS is incremented by one each time the program completes a cycle (frame), until the value of BOOKS is equal to 10,000. When this is true, the IF statement does not run, and therefore allows the ELSE statement to execute its section of code. This makes the variable LOOP equal to zero, which makes the program GOTO the command LABEL B and the program stops. Whew, it should be noted that this programming language is very fast, and counting up to 10,000 on my computer did not take any noticeable time to stop executing, and appeared to occur instantaneously.

K.A

And last, but certainly not least, is the mysterious K.A. This is a very simple way to have key pressing detection for your program running on an in-game computer. The 'A' stands for the key being pressed, therefore K.A is for the 'A' key, K.B is the 'B' key etc. The basic idea, is to check for a keypress each frame. This is generally done within a separate program called KEYS or something. Also, if the key is pressed and detected, the variable indicating the keypress should be made zero. This will allow only a single keypress to be registered, instead of many. As usual, here is an example, I will simply modify the TICK program.

IF BOOKS < 10000

BOOKS + 1

END

RUN KEYS

And here is the program KEYS:

KEYT = K.T

IF KEYT = 1

LOOP = 0

KEYT = 0

END

This program will check for a keypress each frame, and if the 'T' key is pressed the variable LOOP will be made zero, and the program will stop running. The variable KEYT is also set to zero, however, in this case it is not strictly necessary, because after the variable LOOP is set to zero, the program stops.

Conclusion

This concludes the Basic programming tutorial. As I mentioned at the beginning, it is very easy to program computers in BIOCODE X™, thanks to the very user-friendly graphical user interface. This programming will primarily be used for two things within the game, the most obvious being the ability to have a robot mine and build automatically. However, the thing I am really excited for, is the Graphics API. This is very awesome, read more below.

Graphics API

Welcome to the Graphics API tutorial. Here you will learn how to use the Graphics API within BIOCODE X™. Be sure to read the Basics tutorial first. Let's get started!

The first thing to note about the graphics API, is that it is very easy to use. Each command must start with a variable, this is to check for errors or return a value. The images are rendered onto an external in-game screen array. The array may be up to 32x32 screen block, and must be kept within a single chunk. The resolution for the external in-game screen may be set using the command:

VAR = SET.R VALUE

VAR is a variable that will have the value 1 if an error, or 0 if no errors occurred. VALUE may be a number 1-5.

Any .png image up to 64x64 may be loaded by using this command:

IMG = IMG.L IMAGE

IMG is a variable that is assigned the index of the image loaded, this is used with the drawing command to draw the image to the screen, and can be any variable name not already used. IMG.L is the image loading command. It takes a single value, the name of the .png file located within the IMG folder within the root directory of the application BIOCODE X™.exe. The file name comes after the command with a SPACE separating them.

The Graphics API commands are all double buffered. This is in order to allow animations, and requires that the pixels drawn to the screen are flushed to the visible screen buffer:

VAR = IMG.F

In order to draw a .png image to the off-screen buffer, the following command is used:

VAR = IMG.D IMG XPOS YPOS

VAR is a variable that is assigned 1 if the command succeeds, and 0 if an error occurred. IMG.D is the drawing command to draw an image to an external screen. IMG is the index of the image that was loaded, while XPOS and YPOS are the pixel coordinates to draw the image. The coordinates may be constants or variables.

We are almost done! There are only two commands left to mention. The first one clears the screen, this requires a call to IMG.F to be visible.

VAR = IMG.C

VAR simply checks for error.

The last, but probably not least, is the command to draw a pixel on the screen of any RGB value:

VAR = IMG.P XPOS YPOS R G B

Again VAR will indicate errors. IMG.P is the pixel drawing command. This command takes 5 variables or constants indicating the XPOS and YPOS on the external screen to draw the pixel, as well as the R, G, B value of the color to draw. The R,G,B values may be any number from 0-255.

Conclusion

In conclusion, it is very easy and straight forward to use the Graphics API. Up to 9000, 64x64 images may be loaded total. This number may change in the future. A few things to note about the external screen, is that only one screen per world may be placed. Also, the screen may only be placed on a single chunk. The maximum external screen size is 32x32 cubes (512x512 pixel resolution). Breaking one cube of an external screen array will drop the whole screen as items located at the first screen cube broken. The external screen does not need to be touching a computer to have graphics drawn to it. Only complete rectangles are valid screens, and do not need to be square (widescreen). Images drawn to the screen will remain on the screen until the screen is broken, or an IMG.C command is executed. When placing an external screen array, the first cube placed is ALWAYS considered the top left corner of the screen, and the screen may only be built by placing cubes either on the right side of the screen cube array or under it. Each row of the screen array MUST be completed before placing the next row down, because of this, if a screen array needs to be expanded, the entire screen must be removed and rebuilt.

MP3 and WAV loading

Recently the in-game computer has been upgraded, and now allows for mp3 and wav file loading and playing with the in-game computer. To load and play mp3 files, simply place the file into the folder called MP3 within the install directory. The default install directory is Program Files/BIOCODE X™/, the wav file loading is the same except the wav file goes into the WAV folder.

First you need to load the files:

TRACK01 = MP3.L FILENAME
SOUND01 = WAV.L FILENAME

These commands will load the specified file, do not include the file extension .mp3 or .wav in the FILENAME.

After you have loaded the files, you can play the files using the following commands:

V = MP3.P TRACK01
V = WAV.P SOUND01

The variable V is to check for errors (not really), while the variables TRACK01 and SOUND01 are simply integer variables assigned to the filename.

Here is an example of using the MP3 and WAV functions, the filenames are track01.mp3 and sound01.wav.

The most recent update to the computer, is the ability to SAVE and LOAD the state of the in-game computer. This is necessary to allow saving and loading of an in-game game written with the in-game computer (demonstration coming soon). This is very powerful, as well as simple to use. The SAVE and LOAD state functions write and read all the in-game computer variables to a file within the SAV folder found in the game install directory.

V = SAVE SLOT
V = LOAD SLOT

The Variable V is used to check for errors (not really), while the variable SLOT, is the slot to save to. Currently there are only 9 slots available, more may be added in the future.