My 3d-ish engine

I have thought up and created a sort of 3d engine although there is some stuff kinda bugged (I think its something to do with the Y rotation)

Controls:
WASD for movement (if you rotate though it doesn’t move you in your straight direction)
YGHJ for rotation

I might work a bit more on it later but this is what I have for now

File: 3D_engine_v0-1.wick (6.1 KB)

Adding your own cube

You can use some code similar to this
let cubeData = {
center: {
x: 0,
y: 0,
z: 9
},
width: 2,
height: 2,
length: 2
};
main.AddCube(cubeData);

Width is width, everything like that. center is just the center point of the box

4 Likes

pretty neat! i like it!

I do have to mention that at the moment the adding your own cube doesn’t work. It technically creates a new cube/box, but it won’t have any dots to show since I just kinda made that code so it would only use the first 8 values in an array… So right now if you want to add your own cubes you’ll have to probably tweak the code a bit. I might work on this sometime soon a bit more so that it renders faces and works with the add cube code without anything extra.

1 Like

Have you seen this one? this could give you more ideas…

1 Like

I have look at that although I’m pretty sure that mine works differently but I can look at it again.

Oh and for mine I remember that the up and down rotation was kinda bugged so I might have to rework the base of the system to fix it.

At this point I need to add/fix

Up & down rotation not working correctly
Probably fix it by rotating the center instead of each corner cause that might work

Render faces
I already know the code for repositioning path segments so I can just use that. The harder/more annoying part is making sure that each face is rendered in the correct order

Moving in your actual local directions
I think I should be able to do this kind of easily…?

1 Like

upload as html pleas