{"id":30373,"date":"2023-12-18T13:50:42","date_gmt":"2023-12-18T21:50:42","guid":{"rendered":"https:\/\/digilent.com\/blog\/?p=30373"},"modified":"2023-12-21T13:16:22","modified_gmt":"2023-12-21T21:16:22","slug":"fpgas-and-video-games","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/fpgas-and-video-games\/","title":{"rendered":"FPGAs and Video Games"},"content":{"rendered":"<p><span data-contrast=\"auto\">In the spirit of the holidays, this is some plain-old fun. We\u2019ve talked about video games implemented in FPGAs before \u2013 <\/span><a href=\"https:\/\/digilent.com\/blog\/?s=game\"><span data-contrast=\"none\">https:\/\/digilent.com\/blog\/?s=game<\/span><\/a><span data-contrast=\"auto\"> \u2013 but what about the other way around?<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">At this point there\u2019s a long history of video games incorporating principles of computer engineering, after all, the people working on them are all intimately familiar with these principles, many being programmers themselves. This article aims to go over some of these, with a particular interest in those related to the FPGA space.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:465,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"0\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Minecraft\u2019s<\/span><\/b><span data-contrast=\"auto\"> Redstone systems allow players to implement digital logic circuits in-game, allowing them to move blocks, route mine carts, and build entire computers. The <\/span><b><span data-contrast=\"auto\">MinecraftHDL<\/span><\/b><span data-contrast=\"auto\"> mod allows you to use the same hardware description languages used to describe circuitry to be implemented in FPGA fabric to design these complex pieces of in-game logic.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<div style=\"width: 735px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-30373-1\" width=\"735\" height=\"411\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/480p.mp4?_=1\" \/><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/480p.mp4\">https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/480p.mp4<\/a><\/video><\/div>\n<p><i><span data-contrast=\"auto\">Here, redstone circuits and pistons with varying activation timings push and pull blocks around, creating a walkway through an otherwise blocked off wall.<\/span><\/i><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:465,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"0\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Turing Complete<\/span><\/b><span data-contrast=\"auto\">, in addition to allowing users to play through what would otherwise be multiple semesters of electrical and computer engineering curriculum, by the end allows users to export the entire processor that they\u2019ve designed to Verilog. This description could then be imported into a tool like Vivado, synthesized, implemented, and loaded onto an FPGA board.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/turing-circuit-600x337.png\" alt=\"\" width=\"600\" height=\"337\" class=\"alignnone size-medium wp-image-30393\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/turing-circuit-600x337.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/turing-circuit-1024x574.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/turing-circuit.png 1280w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><i><span data-contrast=\"auto\">An unoptimized solution to one of the levels midway through the game, a 3 bit binary decoder built from logic gates.<\/span><\/i><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:465,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"0\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Factorio<\/span><\/b><span data-contrast=\"auto\">, in addition to its deep system-design focused gameplay (and excellent dev blog), features a circuit network system that is another case of video game designers implementing systems that use many of the core skills of digital logic design. Modders took this to the extreme and built tooling for these circuits to be written using hardware description languages: <\/span><a href=\"https:\/\/github.com\/Redcrafter\/verilog2factorio\"><span data-contrast=\"none\">https:\/\/github.com\/Redcrafter\/verilog2factorio<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/factorio-circuits-600x322.png\" alt=\"\" width=\"600\" height=\"322\" class=\"alignnone size-medium wp-image-30394\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/factorio-circuits-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/factorio-circuits-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/factorio-circuits.png 1278w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><i><span data-contrast=\"auto\">A simple circuit network used for resource prioritization \u2013 crystals are held on a belt unless a box is filled to a specified level.<\/span><\/i><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">For many, these games are a great entry point to the world of digital design and computer engineering and can build lifelong fascinations with these topics. If someone in your life is interested in these topics, any of these games could be a good way to build their interest and abilities. If they want to dig in further, the Basys 3 is well suited for future FPGA engineers, providing a variety of input\/output features to help flatten out the learning curve: <a href=\"https:\/\/digilent.com\/shop\/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users\/?utm_source=bing&amp;utm_medium=cpc&amp;utm_campaign=482334927&amp;utm_content=1230353848806309&amp;utm_term=basys%203&amp;msclkid=2f7b1e654c3b1ff193d77be1e6e094d4\">Shop the Basys 3 here<\/a>.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Have any other examples of games that highlight aspects of digital design? Sound off in the comments!<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-30373 jlk' data-task='like' data-post_id='30373' data-nonce='3c15ebf169' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-30373 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-30373 jlk' data-task='unlike' data-post_id='30373' data-nonce='3c15ebf169' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-30373 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-30373 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>In the spirit of the holidays, this is some plain-old fun. We\u2019ve talked about video games implemented in FPGAs before \u2013 https:\/\/digilent.com\/blog\/?s=game \u2013 but what about the other way around?\u00a0 &hellip; <\/p>\n","protected":false},"author":52,"featured_media":30404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1553,4267,35],"tags":[4608,4550,72,1662,1732,4606,4610,4609,4607,4605],"ppma_author":[4462],"class_list":["post-30373","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-around-digilent","category-featured","category-fpga","tag-circuit","tag-circuit-education","tag-design","tag-fpga","tag-fpga-design","tag-github","tag-minecraft","tag-system-design","tag-turing","tag-video-games"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2023\/12\/2023-December-NewsletterImages-FPGAsVideoGames-1080sq.png","authors":[{"term_id":4462,"user_id":52,"is_guest":0,"slug":"abrown","display_name":"Arthur Brown","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/0157dde33e86ff2f253098657a5a774e?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Brown","last_name_2":"","first_name":"Arthur","first_name_2":"","job_title":"","description":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/30373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=30373"}],"version-history":[{"count":6,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/30373\/revisions"}],"predecessor-version":[{"id":30410,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/30373\/revisions\/30410"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/30404"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=30373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=30373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=30373"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=30373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}