#FPGA-based Minecraft Clone

76 messages · Page 1 of 1 (latest)

rancid torrent
#

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

GitHub

(In development) Converts a subset of the Nim programming language into PipelineC - fl4shk/nim-to-pipelinec

GitHub

Fixed function GPU being implemented with nim-to-pipelinec, based upon my_software_3d_renderer - fl4shk/pipeline-nim-gpu

tacit salmon
#

Super cool!

#

Are you going to run it on physical hardware or an emulator?

rancid torrent
#

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

tacit salmon
#

That sounds awsome

#

Keep us updated

rancid torrent
#

oh cool, thanks

rancid torrent
#

this explains the methodology

#

(I asked permission from my friend to relay these DMs here)

rancid torrent
#

so I'm making some good progress again

rancid torrent
#

new progress update: I have finally figured out (and gotten a little help with) my algorithm for optimizing the voxel models I create

rancid torrent
#

anyone here think Simplex Noise would work for my Minecraft clone's terrain generation?

#

hm I'll ask in #bikeshed-😇

rancid torrent
#

I'm writing a voxel model optimizer thing in the Nim language

rancid torrent
#

had to implement a flood fill thingy

tender spade
#

did u get it to render stuff?

#

i also want to do an fpga gpu at some point seems pretty cool frogapprove

rancid torrent
#

It's software I'm writing to optimize the assets I use in the game

#

for mobs mostly

#

It's almost finished

tender spade
#

oh i seee

rancid torrent
#

this being said I do intend to reuse some of the algorithms I developed as software

#

for the FPGA code

tender spade
rancid torrent
#

... 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

tender spade
#

software rasteriser?

tender spade
rancid torrent
#

well, I wrote a software rasterizer so I could figure out how 3D graphics work

tender spade
#

the Minecraft clone is a test scene for the fpga gpu

rancid torrent
#

more than that

#

The Minecraft clone is to be implemented as FPGA code

#

The GPU is going to be included in the project

tender spade
#

i c

rancid torrent
#

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

tender spade
#

pretty cool

rancid torrent
#

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

tender spade
rancid torrent
#

but it should also be a fun game

tender spade
#

it's a neat idea

#

i know very little about this stuff atm

rancid torrent
#

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

tender spade
#

i only heard of verilog

rancid torrent
#

I'm getting most of the code and assets for a PC version from using nim-to-pipelinec

rancid torrent
#

SpinalHDL is my favorite regular HDL

tender spade
#

i probably want the one with the most resources as I'm learning

rancid torrent
#

SpinalHDL helps prevent a lot of common pitfalls in FPGA development

#

I can recommend it highly

rancid torrent
#

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.

rancid torrent
rancid torrent
#

it's working!

rancid torrent
rancid torrent
#

and I'm officially actually working on the hardware itself again

rancid torrent
rancid torrent
#

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.