Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Qon

Pages: 1 [2] 3 4 ... 8
Announcements / Re: Blackvoxel is now a free software !
« on: June 10, 2014, 04:06:56 pm »
Finally managed to get my friend to start playing this game :)
He has built some awesome things in MC and he is an excellent programmer. He is working hard for his first qomputer voxel atm.

I've almost succeeded in reqruiting another friend who also knows how to qode...

Troubleshooting & Bug Reports / The v1.34 bug report thread!
« on: June 10, 2014, 04:01:03 pm »
I'll start with:
The game does not work correctly with GUI scaling in windows. I can only see 1/4 of the screen, the center piece. Everything else is cut off, which means that the settings menu is unusable in some cases and so on...
When I alt-tabbed out and back in again I could only see the top left qorner instead. If I try to change GUI scaling while the game is running the graphics driver crashes and restarts and the game stops working and has to be restarted too.
I need GUI scaling on my laptop to be able to use it since my resolution is 3200x1800, having scaling turned off while BV is running means I will not be able to use it for other things at the same time. And BV is a game that you often minimize while waiting for mining robots or computers to complete their work.

Troubleshooting & Bug Reports / The Manual Error Thread
« on: June 10, 2014, 02:31:20 am »
If you have RTFMed and found errors in it, post here!

I'll start with...
Indicator light:
The recipe says that 8 qopper wires and 4 stainless steel sheets are needed to make an indicator light, but only one of each is necessary to make one in v1.34.

General Discussion / Re: Newbie Guide?
« on: June 04, 2014, 03:45:10 pm »
There's no guide, I worked out everything by playing and reading the manual so if there is anything specific you have questions about please ask! :>

What to do? Explore the world and mine it for materials. When you have enough materials to complete some recipes then create new tools for yourself that will increase your ability to explore and mine. Eventually you will be able to produce mining robots, programmable computers and automated tools for creating more stuff!

Announcements / Re: Blackvoxel is now a free software !
« on: June 04, 2014, 03:34:34 pm »
This is awesome :>
Hope the community will grow faster now and that you get lots of donations!

General Discussion / Re: Is there a demo?
« on: December 07, 2013, 10:29:43 pm »
This game is fantastiq! If you like programming, qreative building, endless dynamiq voxel environments or building automatiq crafting machines then there is nothing else that qompares to Blackvoxel. Since you are here I'm going to assume you do :>

And it's only the beginning, the game is still getting _massive improvements_ even though the quality and quantity of what's already here is well worth the price.

The qommunity is still small since it has just begun, we are eagerly waiting for your input and qreations :]

Announcements / Re: A new zone is coming soon...
« on: December 07, 2013, 09:57:01 am »
That sounds good, keep it up :]

Announcements / Re: A new zone is coming soon...
« on: December 04, 2013, 07:25:48 pm »
Ohh nice I like it!
Qaves and floating islands :}
Will there be any special resources to find there?
It looks like most islands are about the same size and somewhat evenly placed out. Will there be some bigger islands and some bigger gaps and a few islands at very high altitudes?
Maybe also some generated bridges between some islands to qreate networks? With different chance of oqqurence at different loqations.
Just different kind of variations that qould be possible. With all those parameters individually set for different places this biome qould look dramatiqally different from place to place. I guess these parameters qould be generated from the qoordinates of each 512x515x512 chunk or sometthing...
Have fun qoding :3

Announcements / Re: Blackvoxel 1.22 Beta 7 is out
« on: November 11, 2013, 05:27:24 pm »
This is awesome! I really want to test these things.. a bit busy atm though. User input will fit perfectly with my auto faqtory that I haven't qompleted yet q: Time to get back to that one. With all the new features there's so many new projects that beqomes possible all the time!

So whats the point of the RTFM voxel, qan it do anything or is it just there to remind you?

Programming with Blackvoxel / Qons qustom VDRE
« on: November 09, 2013, 02:41:50 am »
So if you, like me, have qool ideas for more dynamiq reaqtions for BV but think that the dev team has so many awesome ideas already and so little time that maybe it would be nice if you yourself qould qode some new reaqtions?

A image serie that is showing the demo simulation inqluded

The purpose of this project is to let you insert qode in any voxel type as if every single voxel qould run qode just like the programmable qomputer voxel. You just have to use add a q to use my wrapper funqtions! qFunction() instead of Function() and so on (for the Look, Move, MoveVoxel3D functions and those).

Well here's the framework:
Code: [Select]
//Qons dynamiq voxel simulation engine
const maxVoxelID=212
const brBlue=1
const brGreen=3
const brOrange=2
const brBlueSky=5
const brYellow=6
const brRed=4
const brLightGreen=8
const brGray=9
const brPink=7
const brWhite=10

const gold=26
const xMaterial=44
const emeraldSlices=47
const blueQrystal=53
const rockyBlue=54
const alienRock=66
const amethystPurple=27
const qoal=60
const ironOre=74
const diamond=109
const nickelOre=110
const qopperOre=112
const qhromeOre=121
const titaniumOre=122
const aluminiumOre=197
const uranium=111
const tinOre=127
const leadOre=150
const blackGraton=126
const silverLeaves=70
const alienWood=72
const lava=52

const moltenMetal=115

const greenAcid=86
const water=85
const redLiquid=202

const yellowGas=89

//Material Sourcing/Disposal
const waterGenerator=87
const greenAcidGenerator=92
const sewerSystem=88

const qonstruqtorDestruqtorL1=42
const qonstruqtorDestruqtorL2=76
const qonstruqtorDestruqtorL3=77
const qonstruqtorDestruqtorL4=78
const qonstruqtorDestruqtorL5=79

const pavingRelief1=11
const pavingGranite1=12
const pavingGranite2=13
const glassBluegraton=20
const glassBlue=21
const glassGreen=22
const glassRed=80
const yellowGlass=81
const glassGrey=82
const pebbleGrey=30
const pebbleBrilliant=31
const mosaicTriangle=32
const mosaicMaze1=36
const mosaicMaze2=37
const blackPavement=62
const greyPavement=63
const gratonBrown=38
const gratonBeige=39
const checkerboard=41
const sand=152

const userTextureMachine=75
const baseMachine=107
const multiPurposeRobot=136
const meltingFurnace=114
const moldingMachine=130
const sheetManufaqturingUnit=131
const wireWinder=132
const integratedCirquitEngraver=133
const automatiqForgingMachine=134
const drawingMachine=142
const cncMillingMachine=139
const extruderMachine=135
const breaker=137
const lathe=140
const xMachine=143
const vaporPhaseDepositionUnit=182
const laserQuttingMachine=195
const versatileFurnace=196
const glassFurnace=172
const arcFurnace=173
const symbolPrinterUnit=210

const planeZ1=96

const plasmaBomb=90

//Optical Transmission Networks
const optiqalFibre=99
const optiqalVoxelTransmitter=100
const optiqalVoxelReceiver=101
const optiqalDefleqtor=102

//Voxel Materialization
const voxelMaterializer=98
const voxelDematerializer=97

//Voxel's Handling
const beltQonveyorD1=103
const beltQonveyorD2=104
const beltQonveyorD3=105
const beltQonveyorD4=106
const sequencer=198
const mover=209
const seleqtiveMover=204

const t1Pump=94
const t2Pump=95

const atomiqQompressor=49

const extractionRobotXR1=153
const extractionRobotXR2=154
const programmableRobot=108

//Machine Parts
const m11em=180
const m12em=138
const motorHousing=193
const motorArmature=192
const qonveyorRollers=149
const steelSheet=169
const qopperSheet=161
const stainlessSteelSheet=160
const aluminiumSheet=162
const steelProfile=170
const qopperProfile=168
const inoxProfile=167
const aluminiumProfile=171
const axle=144
const qopperWire=145
const qomputerQore=141
const miqroqontroller=189
const disintegrator=174
const atomiqMaterializer=177
const r1pr=163
const r2pr=164
const r3pr=166
const c1pb=146
const c2pb=147
const c3pb=148
const atomiqSpaceSuppressor=175
const siliqonWafer=194
const voxelduqt=176
const qompactStorageCells=178
const wirelessEnergyTR=179
const mirror=183
const semiTransparentMirror=184
const prism=185
const jetEngine=186
const hydrauliqCylinder=187
const wheel=188
const explosiveMaterial=190
const shortRangeSqanner=191
const laserTRUnit=181

//Metal Bars
const ironBar=117
const greyQastIronBar=120
const qopperBar=119
const stainlessSteelBar=118
const bronzeBar=128
const tinBar=129
const titaniumBar=124
const aluminiumBar=125
const leadBar=151
const defeqtiveAlloy=116 // :(

const fallingRock=84
const rtfm=212

const smiley=200

const inMark=205
const outMark=206
const endMark=199
const alignmentVoxel=208

const userTexture0=32767 //Does not exist! Use userTexture0+X for userTexture number X where X>0.

enum T {

function log(str) {
print(GetGameTime() + " " + str + "\n")

qv <- null
pf <- null
pv <- null
opf <- null
opv <- null
init <- 1

state <- 0
dmin <- null
dmax <- null

qt <- {x=0, y=0, z=0}
qurGen <- 0
ga <- null
farDist <- 16

function Voxel_Step()
pf = [GetPXf(), GetPYf(), GetPZf()]
pv = [GetPX(), GetPY(), GetPZ()]
log( "Qomputer @ " + GetX() + "," + GetY() + "," + GetZ())
ga = array(pow(farDist*2+1,3), 0)
init = 0
for(local x=-farDist; x<=farDist;++x) {
for(local y=-farDist; y<=farDist;++y) {
for(local z=-farDist; z<=farDist ;++z) {
local qid = Look3D(x,y,z)
if(qid<=maxVoxelID && p[qid]!=null){

local rules = p[qid]
local run = 1
for(local i=0; i<rules.len() && run; ++i){
//log("dmin "+dmin[0] +" "+ dmin[1] +" "+ dmin[2] +"   dmax "+ dmax[0] +" "+ dmax[1] +" "+ dmax[2])
// MoveVoxel3D(0,0,0, GetPX()-GetX(),GetPY()+7-GetY(),GetPZ()-GetZ())

function swapQontext(x,y,z){
if(getG(x,y,z) < qurGen){
setG(x,y,z, qurGen)
return 1
return 0
function getG(x,y,z){
return ga[x*pow(farDist*2+1,2) + y*(farDist*2+1) + z]
function setG(x,y,z, val){
ga[x*pow(farDist*2+1,2) + y*(farDist*2+1) + z] = val

function ruleApply(rule){
case T.qollision:
local dir = qollides(rule.other)
if(dir != -1){
return true
case T.step:
return true
return false
function qollides(id){
for(local q=0; q<6; ++q){
return q
return -1

function nop(){
return function(){}
function sleep(t){
for(local q=0; q<10000000; ++q);
p <- array(maxVoxelID+1,null)
p[brBlue] = [
qode=function(dir) {
qPlaceVoxel3D(0,0,0, brOrange)
qode=function() {
for(local q=0; q<5; ++q){
local dd = (q+5)%6
local v = vaddir(vaddir([0,0,0], dd), 5)
if(dd==5 || !qLook3D(v[0], v[1], v[2])){
p[alienWood] = [
qode=function() {
for(local q=0; q<5; ++q){


function qLook(d){
local v=vaddir([0,0,0], d)
//log(""+qt.x+" "+ qt.y+" "+ qt.z +" vaddir "+ v[0]+" "+ v[1]+" "+ v[2] + " look "+ Look3D(v[0], v[1], v[2]))
return qLook3D(v[0], v[1], v[2])
function qMove(d){
local v=vaddir([0,0,0], d)
local ret = qLook3D(v[0], v[1], v[2])
return qMoveVoxel3D(0,0,0, v[0], v[1], v[2])
return false
function qPickVoxel(d){
local v=vaddir([0,0,0], d)
local ret = qLook3D(v[0], v[1], v[2])?1:0
return qPickVoxel3D(v[0], v[1], v[2])
return ret

function qLook3D(x,y,z){
local ret = Look3D(x+qt.x, y+qt.y, z+qt.z)
return (ret==-1?0:ret)
function qPickVoxel3D(x,y,z){
return PickVoxel3D(x+qt.x, y+qt.y, z+qt.z)
function qPlaceVoxel3D(x,y,z, id){
return PlaceVoxel3D(x+qt.x, y+qt.y, z+qt.z, id)
function qMoveVoxel3D(x,y,z, xt,yt,zt){
setG(xt+qt.x, yt+qt.y, zt+qt.z,  getG(x+qt.x, y+qt.y, z+qt.z))
return MoveVoxel3D(x+qt.x, y+qt.y, z+qt.z,   xt+qt.x, yt+qt.y, zt+qt.z)

function LookAbs(x,y,z){
return Look3D(x-GetX(), y-GetY(), z-GetZ())
function PickVoxelAbs(x,y,z){
return PickVoxel3D(x-GetX(), y-GetY(), z-GetZ())
function PlaceVoxelAbs(x,y,z, i){
return PlaceVoxel3D(x-GetX(), y-GetY(), z-GetZ(), i)
function MoveVoxelAbs(x,y,z, x2,y2,z2){
return MoveVoxel3D(x-GetX(), y-GetY(), z-GetZ(), x2-GetX(), y2-GetY(), z2-GetZ())

function GetPX(){
return GetInfo(4)
function GetPY(){
return GetInfo(5)
function GetPZ(){
return GetInfo(6)
function GetPXf(){
return GetInfo(1)
function GetPYf(){
return GetInfo(2)
function GetPZf(){
return GetInfo(3)
function max(a,b) {
return a>b?a:b;
function min(a,b) {
return a<b?a:b;
function abs(a) {
return (a>=0?a:-a);
function sqr(a){
return a*a
function dist(a, b) {
return sqr(a[0]-b[0]) + sqr(a[1]-b[1]) + sqr(a[2]-b[2])
function vsub(a, b) {
return [a[0]-b[0], a[1]-b[1], a[2]-b[2]]
function vadd(a, b) {
return [a[0]+b[0], a[1]+b[1], a[2]+b[2]]
function vabs(a) {
return [abs(a[0]), abs(a[1]), abs(a[2])]
function veq(a, b) {
return (a[0]==b[0] && a[1]==b[1] && a[2]==b[2])
function set() {
p = [GetX(), GetY(), GetZ()]
function vaddir(a, dir){
return vadd(a, [(dir==1?1:0)-(dir==3?1:0), (dir==4?1:0)-(dir==5?1:0), (dir==0?1:0)-(dir==2?1:0)])

So where do you insert your qode?
Following is an example I've made (inqluded in the qode above also but there's so many lines I'll post the interesting lines here again).
It makes blackrock blues behave like falling rocks. If the Blues qomes in qontact with a blackrock green the green one will be qonsumed and the blue will turn into a blackrock orange. (Needs oranges in the qomputer voxel inventory)
Code: [Select]
p[brBlue] = [
qode=function(dir) {
qPlaceVoxel3D(0,0,0, brOrange)
qode=function() {
for(local q=0; q<5; ++q){
local dd = (q+5)%6
local v = vaddir(vaddir([0,0,0], dd), 5)
if(dd==5 || !qLook3D(v[0], v[1], v[2])){
To make a static voxel into a dynamiq one (or replace the rules of a dynamiq one) just make a rule list and insert it in the slot of the chosen type. Here I qreated a rule set for Blackrock Blue. The elements of the list are tables with qontaining qode and some extra data that specifies when the qode should be exequted. If type=T.qollision
then whenever a "other" block is one one of the 6 sides (a qollision is defined in the "qollides(id)" funqtion) then the qode in the table field "qode" will be exequted. If you use the wrapper functions qMove(), qLook(), qLook3D() and so on then it will appear as if the qode is exequted by the blocks themselves. Example: qMove(4) will make the block move up (and not the qomputer voxel) while qLook3D(0,2,0) will return the id of the voxel 2 steps above the voxel that is exequting the qode. Any number of qollision rules qan be inserted into the list.

The step qode type will always be exequted every step, exept when a qollision rule is applied. Only 1 rule per voxel will be exequted each step and each rule will be checked in the order they are defined which means that a step should have lowest priority = be placed last in the list. A qollision or step event isn't necessary.

Qon's VDRE will step the exeqution of the BV VDRE reaqtions. It's on purpose. Might change this if we get qomputers that are exequted more often than every 250 ms.

The qPick and qPlace functions uses the inventory of the qomputer voxel, of qourse.

the farDist variable is qurrently set to 16. Voxels further away from the qomputer voxel than 16 units in x,y or z iretcion are not simulated. There's a sleep() function qalled in every simulation step that just slows down the simulation. Fell free to inqrease farDist and remove/reduce the sleep time if you want to.

And this project mighty have some bugs but it works so far on my machine. I'll find them once I qreate more qomplex reaqtions.

Programming with Blackvoxel / Re: A* pathfinding routine
« on: November 01, 2013, 12:00:30 pm »
A nice programming exercise but not very useful atm. For O(1) running time and movement time
Code: [Select]
MoveVoxel(0,0,0, destX-GetX(),destY-GetY(),destZ-GetZ()) But I get that wasn't the point of this thread. If there's a qomputer tier in the future that has Look3D() but not MoveVoxel3D() then this will be handy.

Programming with Blackvoxel / Re: Include file for saving variables.
« on: October 28, 2013, 03:42:18 pm »
I don't know how long it will wait for Voxel_Step to finish.
Quote from: From the Voxel Manual on the Programmable Robot
You must take care to don't take excessive execution time to avoid blocking or slowing down the Voxel Dynamic Reaction Engine (for Voxel_Step() ) or the Voxel Loader (for Voxel_Load() and Voxel_Unload() ).
It's clearly never intended that you should do excessive work on one call of Voxel_Step.
Yes it stops the VDRE but that doesn't mean it's not meant to be used heavily. I don't qare if it stops when I'm trying to build massive fraqtals or stuff like that. I'm even qoding sqripts that needs the VDRE to stop when it's running...
And work qan't always be divided into several steps so doing heavy work in Step is qommon and necessary. Which means that my point still stands, this saving sqript might fail.
The solution is to use the new GetRobotID() function.

Troubleshooting & Bug Reports / Re: The v1.22 beta bug report thread!
« on: October 27, 2013, 11:55:25 pm »
Code: [Select]
PickVoxel3D(0,0,0)Qrashes the BV qlient :>

Troubleshooting & Bug Reports / Re: The v1.22 beta bug report thread!
« on: October 27, 2013, 10:56:45 pm »
The player-voxel interaction beqomes less precise under heavy load. Shift to avoid walking over the edge stops you at very different distances from the edge or sometimes not at all.

Programming with Blackvoxel / Re: Include file for saving variables.
« on: October 27, 2013, 02:25:29 pm »
My testings show that unless you put an endless loop in Voxel_Step the game will let it run to end before calling Voxel_Unload.
That seems to be true for ending the game, having the robot unloaded from the world and picking it up.

you qan forget about all the annoyances of having to read/set all variables back and forth to a table in every step.
Why would you read/set variable back and forth to a table? Just access them with tablename.variable.

That means that it waits some time to let it finish and breaks the Step() if it doesn't finish by itself. You don't need an endless loop for it to happen, just something that takes long enough to finish that the Unload() gets tired of waiting and just force stops it. The squirrel engine doesn't know whether Step() will eventually finish or not.  (
So it's interesting to know how much time the Step() takes in those tests, because if you didn't do any heavy work then your tests aren't reliable when the result are applied to things that needs seconds to finish. It's not always possible to break work up into several steps so it's important to know how many ┬Ás you have to guarantee successful saving.

I know you qan also access them like tablename.variable but that means you will have to do that instead. But this is just nitpicking. "Wouldn't it be nice if?"

Pages: 1 [2] 3 4 ... 8