element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs RGB LED Pixel Touch Sensitive Games Table – Part 2
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: benmatrix
  • Date Created: 26 Nov 2015 5:07 PM Date Created
  • Views 442 views
  • Likes 2 likes
  • Comments 0 comments
  • Table
  • flowcode
  • touch
  • led
  • graphical
  • rgb
  • display
  • ir
  • dspic
  • pic
Related
Recommended

RGB LED Pixel Touch Sensitive Games Table – Part 2

benmatrix
benmatrix
26 Nov 2015

Nearly a month has passed since my last post about the LED table so it’s well time for an update.

Title-300x190.jpg

In part 1 I went through some of the specifics of the table hardware, it’s features and a start at the software including a playable version of Tetris in the Flowcode simulator.

 

I am pretty pleased with the hardware at the minute so my current focus is blasting through the features I want to include in the software.

 

As you cannot create all your code in one go I like to use the Flowcode comment icon to add in simple TODO style reminders in the code to allow me to remember where I was, where the problems are and what features I want to achieve.

 

Comments-300x85.jpg

As I go along I make notes and add comments to any code. I also look at ways to try and make things easier by creating little helper macros that can be called here and there to do a specific job. A good example of this is the GOLCellControl and GOLParamControl macros which allow the various Game Of Life settings to be altered without having to worry about randomising and checking for roll overs each time you want to change a value.

 

Here are some of the new features I have already managed to pack into the software.

 

Fade in and fade out routines to aid in look and feel.

 

Graphical based icon menu to access the various functions – Snake / Pong / Tic-Tac-Toe / Tetris / Animation1 / Animation2 / Game Of Life / IR Visualisation.

 

Menu-300x190.jpg

 

Control over the number of players for games, 0=AI vs AI, 1=Human vs AI, 2=Human vs Human.

 

PlayControl-300x190.jpg

 

Pong and table hockey games modes – slightly buggy and incomplete but playable in the simulation. I’ve covered Pong recently in a graphical LCD games blog so I won’t go into this here. The controls for this are cursor left / right for player 1 and z / x for player 2.

 

Pong-300x190.jpg

Another recent addition is the game of life cellular automation mode (GOL). This generates a random statistic for each pixel (cell) based on the amount of food, water, resource and radiation. Food and water are needed for life to grow and if they are used too much they will dwindle. Resources are needed to travel from one cell to another and are consumed whenever cell travel is attempted. Radiation can kill or mutate the cell’s population and builds up over time as the population increases. If a cell is empty of life then food, water and resources increase while the radiation decreases. The cell type is indicated by the colour and the population indicated by the intensity. The game begins with a random population being injected into one or more cells and the game then runs from there until the entire population has expired.

 

This all results in a animated display. At the moment I’m running the GOL animation with no delays to make sure the animation is eventful, random and looks good. On the finished table I will likely add a random delay between steps to slow everything down to make it flow better and less distracting if your trying to watch TV.

 

GOL-300x190.jpg

 

More importantly Tetris now tells you how many lines you destroyed allowing you to play with friends and compare your scores.

 

So lots of bits have been done but many still remain. This is the current state of the Tic-Tac-Toe game, an empty playing field and that’s about it.

 

TTT-300x190.jpg

 

Still to follow in part 3 are the specifics on the table’s hardware and hopefully the finished and polished software.

 

Here is a link to the current Table Flowcode project so far…

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube