Replies: 5 comments 1 reply
-
As you have already said, Ebiten won't support 3D. However, it is fun to brainstorm what are needed for 3D programming with Ebiten. Here is my random notes: My vague idea is, if Ebiten supported 4D vectors at My concern is that we don't have 'a crystal clear idea' for 3D, like 'everything is an image' for 2D in Ebiten. I don't think 'everything is a cube' for 3D would work :P While we might be able to offer a very fundamental API, we can't offer good API sets for 3D. Probably it is impossible to have as simple APIs as 2D. |
Beta Was this translation helpful? Give feedback.
-
There is the SDF (signed distance field) way if we want to be inspired by shadertoy examples. Though representing complex 3D models, etc.. might need an additional vertex shader like @hajimehoshi mentioned |
Beta Was this translation helpful? Give feedback.
-
Raycasting a faked 3D perspective is possible with Ebiten (like Wolfenstein 3D/Doom): I haven't gotten to do much with it in a couple years but I did recently upgrade it to Ebiten v2. Performance is pretty good now too, can max at 200FPS at 1024x768 on my laptop which has only Intel Iris GPU. |
Beta Was this translation helpful? Give feedback.
-
scalar type:
vector:
matrix:
(and all multidimensional data structures must be duplicated for each scalar type) texture:
pixel format:
it already seems to me that this is a large amount of work and planning of architecture |
Beta Was this translation helpful? Give feedback.
-
I ended up making that 3D software renderer with Ebiten, lol. It's a modest, relatively crude renderer, but it's good enough for the kind of stuff I was aiming for (3D objects in primarily 2D games, primitive 3D environments, etc). |
Beta Was this translation helpful? Give feedback.
-
Hello!
I wanted to start a discussion to breach this topic, as Ebiten is a well-known and well-used 2D gamedev solution for Go. I figured it'd be interesting to ask about how one could do true 3D with Ebiten.
Being that Ebiten currently is geared towards 2D games, I'm not asking to support 3D fully with Ebiten - I know that would be way too much. Instead, I'm just wondering what options are available and if it's feasible to springboard into 3D while using Ebiten as a base. While I do appreciate a good perspective trick and the airship demo is fantastic as always, I'm wondering if it's possible to do actual simple 3D using parts of the API already available, or maybe parts that Ebiten just doesn't yet expose to the user.
I'd be OK with relatively rudimentary 3D (as is to be expected from an engine that is 2D-focused) - maybe on the level of a 3D object in a primarily 2D game, or very simple 3D worlds like something from PS1 / Nintendo 64 / DS-era games.
Any thoughts? I actually have half a mind to slowly chip away on some kind of pseudo-3D rasterizer using Image.DrawTriangles(), but I'm unsure if that's the wisest thing to embark on when we clearly must have an OpenGL context and be executing OpenGL calls for the backend, right?
EDIT: I ended up making a 3D renderer using Image.DrawTriangles, lol. It's called Tetra3D, and can be found here: https://github.com/SolarLune/Tetra3d
Beta Was this translation helpful? Give feedback.
All reactions