I am using a subset of the Nim language via https://github.com/fl4shk/nim-to-pipelinec to create an FPGA-based Minecraft clone. It will use only voxel-based models, and it involves creating a fixed function GPU as well. The fixed function GPU is incomplete and being implemented here: https://github.com/fl4shk/pipeline-nim-gpu
#FPGA-based Minecraft Clone
76 messages · Page 1 of 1 (latest)
"both"
the physical hardware will be my MiSTer FPGA
but for "emulation" it'll really be compiling the game for my laptop
There will effectively be two versions of the game
here's how this works
really there's multiple stages of compilation. PipelineC, which I should probably link to, is the main heavy lifter here as far as compilers go
some small code changes will be necessary for managing both versions of the code
Since nim-to-pipelinec compiles a pure subset of Nim language code into PipelineC, I get to just do everything as Nim code.
There may also be a need for a miniature CPU of some sort to handle access to file IO but I'm not entirely sure about that
oh cool, thanks
this explains the methodology
(I asked permission from my friend to relay these DMs here)
so I'm making some good progress again
new progress update: I have finally figured out (and gotten a little help with) my algorithm for optimizing the voxel models I create
anyone here think Simplex Noise would work for my Minecraft clone's terrain generation?
hm I'll ask in #bikeshed-😇
I'm writing a voxel model optimizer thing in the Nim language
had to implement a flood fill thingy
did u get it to render stuff?
i also want to do an fpga gpu at some point seems pretty cool 
this is actually an offline thing
It's software I'm writing to optimize the assets I use in the game
for mobs mostly
It's almost finished
oh i seee
this being said I do intend to reuse some of the algorithms I developed as software
for the FPGA code
i thought it was like https://www.furygpu.com/
FuryGpu
... I need something to display with the GPU
yeah it will be eventually
When I get to that part of the project
Which I'm almost started on
software rasteriser?
cool
well, I wrote a software rasterizer so I could figure out how 3D graphics work
ohh i get it now
the Minecraft clone is a test scene for the fpga gpu
more than that
The Minecraft clone is to be implemented as FPGA code
The GPU is going to be included in the project
i c
So like, the game logic and driving of the GPU will be implemented as FPGA code too
no CPU involved if I can help it
pretty cool
I have a CPU I developed that I could use if I wanted, but I'm saving that for another project
I wanted to do something weird/a stunt
i was thinking of doing like an operating system and and a fpga gpu and hooking it up but that's well in the future
but it should also be a fun game
that's also neat!
FPGA development is something I normally do in a language like SpinalHDL
but I'm making my GPU and my Minecraft clone with nim-to-pipelinec because it'll greatly speed up the development loop
i only heard of verilog
nicee
I'm getting most of the code and assets for a PC version from using nim-to-pipelinec
there's a great many FPGA languages now
SpinalHDL is my favorite regular HDL
i will look into it
i probably want the one with the most resources as I'm learning
SpinalHDL helps prevent a lot of common pitfalls in FPGA development
I can recommend it highly
I want to mention this about my project: most of the code will be a polyglot of FPGA code and software written in the Nim programming language.
and I'm officially actually working on the hardware itself again
https://github.com/MiSTer-devel/Wiki_MiSTer/wiki/USB-Blaster-(debugging) this is going to be helpful for debugging!
Well I learned something important about my MiSTer projects today. I can actually use my VGA signal generator with the HDMI output of MiSTer. The same FPGA code variables are used for both video outputs.