what is the thing we put in to the extension finder bar to get it and is it work with blocks
thereâs no blocks support yet, but in the extension in main.ts, there is some code that shows all that it does so far.
thats there because when you make a extension you have to add a file to your project and thatâs where you make the blocks and if your project has say the Browser Events Extension added when you post the extension it will be added as well
yes because it needs it to left/right click, and it has no blocks support. sorry!
you put the entire github url, or just c-minusminus/arcade-voxel-engine. It had no block support, but I might add some next update
That would be great!!!
next update theoretically on Apr 24th! Adds many stuff :ó Ș)
finished the next update, the blocks are a little finicky. Everything else works fine though!
Canât wait to try it!
hmm⊠could you please help with my voxel engine a bit? The blocks for the player are acting kinda funny, specifically the getters/setters. I think its because there static but Iâm not sure. The extension is https://github.com/c-minusminus/arcade-voxel-engine
@richard, whats the biggest number array length the settings extension can save/load, and are there better ways to save huge number arrays? i tried saving a 200x200x200 (8,000,000 in length) and the game crashed every time i tried. I know 8,000,000 is an unresonable amount, but it would be nice to know.
@richard is it possible to have getters/setters in namespaces? im talking about how in the Sprites class it has
//% group="Physics" blockSetVariable="mySprite"
//% blockCombine block="x" callInDebugger
//% blockCombineGetHelp=sprites/sprite/x#get
get x(): number {
return Fx.toFloat(Fx.add(this._x, Fx.div(this._width, Fx.twoFx8)));
}
//% group="Physics" blockSetVariable="mySprite"
//% blockCombine block="x"
//% blockCombineSetHelp=sprites/sprite/x#set
set x(v: number) {
this.left = v - (this.width / 2)
}
And when i tried doing the same in namespaces for my voxel engine, it didnt work. Is there a way to do something like this, without doing it like this:
//% group="..."
//% block="..."
export function getX() {
return x
}
It organizes the code so much, and i dont want to not have it. Also, this is for the player which i donât want to be a class, because there should only be one player. I could make it a class it just doesnt make much sense to me.
Can you expand on âacting kinda funnyâ?
hi Iâm using you extension in blocks and I cannot work out how it works can you Maby please make a demo in blocks so I can see how it works
the limit on storage is roughly 16 kilobytes.
no, itâs not possible to do that in TypeScript, though you can have static getters/setters on classes:
class Whatever {
static get x(): number {
return 0;
}
}
console.log(Whatever.x)
thanks! I did start to try that, and doing that is the error @WoofWoof . For some reason, the getters/setters want a variable for an input. rather than a Player, it wants the whole Engine! obviously the player has a position and the engine doesnât, so itâs causing it to cause errors. doing VoxelEngine.Player.x works fine though. itâs that the blocks are doing VoxelEngine.x. Also it shouldnât even be asking for an input, itâs a static class!
hi how do you use the engine in block code I canât get it to work
might make a tutorial or spring one I finish making sure it works
would this help?
MakeCode Blocks Playground
omg how is it so FAST? this is amazing!