FPGARelated.com
Forums

Mounting a game On FPGA

Started by obenyaala 7 years ago6 replieslatest reply 7 years ago448 views

Hi, 

I don't know if I am allowed to ask this question, because it is complicated but I tried searching couldn't find anything that helped, so my question is stupid I am sorry.

My question is : is it possible to mount a game on FPGA (Xilinx Spartan-3) the idea is to creat a clone like the game RCR (Retro City Rampage) based on my city and mount is on FPGA that was the idea for my internship. If this is possible can someone put me on the right way like which language should i make the game with and and is it even possible mounting it on FPGA.

Thank you so much


[ - ]
Reply by apanellaAugust 9, 2017

Okay, I have not used FPGAs for games before but I can give you advice. I haven't heard of this game, but straight away I suspect you will not have enough logic cells/ LUTs to implement something this complicated. FPGA 'programming' is essentially done on low level i.e bit level rather than high level such as C or C++ etc that microprocessors use. 

I'm not sure I understand what you mean by mounting onto the FPGA - it would be possible to write the entire game onto the FPGA fabric, for this I would recommend a Spartan Dev board or evaluation board that has VGA/HDMI or displayport output, but I think something simple like Pong would be better. You could write a display controller for video output, use the dev board switches to control the game and do simple processing on the board. For a spartan, you still might not have enough logic elements. 

I am unfamiliar with specific game programming concepts but you could use Finite State Machines probably to drive the pixel level changes you would need to implement your Pong game. 

Languages for FPGAs: Verilog, VHDL are the two biggest ones. If you haven't done anything with HDL before and have only worked on high level, they will be confusing.

This is assuming that you wanted to build from scratch - porting a full PC game to an FPGA (especially a cheaper FPGA like Spartan) would probably be impossible due to memory and size etc. 

You could also check our r/fpgaGAMING https://www.reddit.com/r/fpgagaming/ for general advice.

[ - ]
Reply by obenyaalaAugust 9, 2017

Thank you for the explanation, i will stick first to learning VHDL and practice the basics, then try to do complicated designs. I really do appreciate your help. Thank you  

[ - ]
Reply by apanellaAugust 9, 2017

VHDL for Logic Synthesis is a good book for learning VHDL in general. Can probably find a .pdf on google. My advice would be to learn these things within VHDL: 

-Types such as STD_LOGIC and STD_LOGIC_VECTOR(x downto y);

-Outputting to LEDs

-Learning how the .xdc constraints file works for your Spartan FPGA

-Inputting from buttons

-VHDL structure: entity,components (and component port maps),processes

-Finite state machines in VHDL

-Using counters etc. 

Once you have a good understanding of these, you can start more interesting things like writing hardware interfaces or implementing a MicroBlaze soft processor. FPGAs are a fascinating area that can be lots of $$$ once you have 5 or 10 years experience in the field.

[ - ]
Reply by obenyaalaAugust 9, 2017

Sounds Perfect Thanks again. 

[ - ]
Reply by PtorruAugust 9, 2017

Hi @obenyaala.


I would not like to dis-encourage you by no means from getting into the world of FPGAs. However, given that this project is an internship project, I am assuming there is a mark associated to it, and if there is a mark then surely your future depends on it.

I just wanted to complement the comment by @apanella saying that, more often than not, you will have to rely on Hardware Languages like VHDL or Verilog to program the FPGA. If this is the case bare in mind that development on this languages will be considerably harder than C. This means, you would need to plan at least 5x or 3x the time you initially thought you had for this.

Bare in mind that you will need to implement the logic for the game, but also all the logic to interface and drive the peripherals, at least to drive the VGA/HDMI port for your screen.

Please do let us know how do you get on. 

Best of lucks!



[ - ]
Reply by obenyaalaAugust 9, 2017

Yeah! I will start first with learning the easy stuff then more complicated ideas. Thank you for your thoughts i will for sure post what i came up with.