mkarlsson

Snake game

4 posts in this topic

The GadgetFactory blog page has this story about the snake game written in Verilog so I decided to take a look at it.  Sadly to say it's pretty much a textbook example of how not to write HDL code.  However, this idea seemed pretty cool so I decided to do an almost complete rewrite of the code (basically the only thing left from the original code is the VGA controller) while still keeping all the functionality of the original code.  The new version uses about a 1/4 of the FPGA resources compared to the original code when compiled for Spartan6 and it now fits an LX9. 

The complete project can be found at https://github.com/Saanlima/Pepino/tree/master/Projects/Snake and should be easy to adapt to any LX9 based board like Papilio Pro or Duo with a VGA wing.

Snake2.jpg

 

Magnus

 

Share this post


Link to post
Share on other sites

Awesome! Thank you Magnus, I'll get this posted to the blog.

 

Jack.

Share this post


Link to post
Share on other sites

Here is a version for Papilio_Pro with LogicStart Megawing. 

The joystick controls the snake movement and switch 7 (the rightmost switch) is the run/stop input.
Complete project (including bit file in the ise directory) can be downloaded here: http://www.saanlima.com/download/Papilio_Pro/snake_papilio_pro.zip

(Unfortunately my upload allowance is maxed out so I can't post the project here)

Magnus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now