How would I develop a simple 3d or 2d video game on the VF2 using opengl es, SDL2, and C?
It doesn’t use C but you should check out the godot engine.
Seriously then what is the entire operating system written in if it’s not C? I’m asking because I don’t think godot works yet because the board doesn’t have desktop GL.
Godot 3.x used GLES but unfortunately I think it only gained RISCV support in Godot 4.x which uses Vulkan.
It seems someone has got q3 running at a decent frame rate on the VF2 using OGLES. Hack the q3 engine?
If you want to learn C for 2D game dev I’d recommend you build a Uzebox or at least try its emulator cuzebox and then write a game for it like I did.
Its nice being able to know everything about a platform. You can’t say that about anything running Linux because not even Linus Torvalds knows everything about Linux.
I was the one who ran quake 3. I just used Z turtle man’s code for a GLES 1.x renderer using an obscure branch from 2019. I would have vastly preferred it if we could just run crude desktop OpenGL natively so someone could just use mainline ioq3.
I want to learn how to use C and basic GLES because the vf2 supports it and I can’t just use fixed pipeline desktop GL.
Ah yes it was you wth the q3 post! Good one! I will have to try that soon.
Its really only the NVIDIA SBCs that have decent GPUs but unfortunately they’re made by NVIDIA so don’t expect to get more than 2 years support, if that. My Jetson Nano received 1 officially supported Ubuntu release from NVIDIA before they got bored and moved onto the next product.
I prefer a weaker GPU with an open source driver rather than a higher spec one with a closed source driver than only works with one specific kernel. The VF2 ain’t too hot as a 3D gaming device, make no mistake. I hope you didn’t buy it for that?
I bought it for the RISC-V. On any SBC though I want to run games and maybe develop them.
Says we can expect Vulkan support which should enable us to run Godot.
Note that its possible to use C(++) or whatever you prefer under godot by using gdnative
https://docs.godotengine.org/pt_BR/stable/tutorials/scripting/gdnative/gdnative_c_example.html
Godot may lack a few triple A features of its rivals but its inifinitely less bloaty than Unity and Unreal, which really appeals to me.
If someone can compile and run Godot on this bad boy count me in.
I’ve already been successful in bulding godot 4 on my VF2 but it didn’t run due to GPU driver issues, I expect, last time I tried a few months back. It segfaulted before showing the editor.
You just need to build it with clang instead of gcc on the VF2. Building godot with gcc wasn’t supported under rv64 last time I checked. We’ll have to try godot again when Vulkan support arrives.
When configuring godot on the VF2, use:
scons use_llvm=yes
I guess a segfault is better than nothing but it’s still not great.
Godot doesn`t work, I submitted an issues
Does not run on the RISC-V64, VisionFive2 SBC, · Issue #80676 · godotengine/godot (github.com)
I think Godot will be too slow to run anything interesting on the Vision Five 2.
Currently nothing except the demos Star Five / Imagination made sure have to run (WebGL aquarium, Quake 3 and SuperTUX run at all at any performance)…
I’m a little worried that the performance once drivers are fixed will be below Raspberry 4. If so we need a JH7111 with the same GPU as the TH1520.
One CPU core has to be able to saturate the GPU exactly which on 4 CPU cores should mean a GPU of ~2W for maximum 6W total SoC when all cores are max! So the Raspberry 4 is too much CPU (1W GPU) and the Jetson Nano is balanced BUT too hot 15W (if you run it at half mode = half the GPU/CPU cores it’s almost cool enough but then you can’t make interesting gameplay because you only have one core left and the compositor in their linux takes like 50% of that last core)… jesus this is turning into a book!
What I’m trying to get at is still 10 years after the first SBC we don’t have a silver bullet for games.