Nearly a month has passed since my last post about the LED table so it’s well time for an update.
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.
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.
Control over the number of players for games, 0=AI vs AI, 1=Human vs AI, 2=Human vs Human.
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.
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.
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.
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…
3,166 total views, 1 views today