Hello every one.
This post is about what i call “EMBEDDEDGAMING“. yeah its about writing games for your PC and controlling the using the embedded hardware.
It all started when i joined THINKLABS @SINE IITB .During the first few months of my professional life here was quite exited about my work.it was during this period where i tried to started learning how to write simple 2D games with the help of web and obviously the documentation of the open source API’s which i used.
During the initial days it was quite tough to write the games, embedding the game logic in the code.Tough i was was not from a comp science background finally tried and mastered this skill embedding the game logic into the code.
Before i start talking about the 2D games .i would also like to mention about VT102 control sequences.Using this control sequence we can print characters on the terminal with any of the six supported colors in foreground and background of the character.most of the standard terminals available support this protocol.using this control sequences is very easy just sent the control sequence string on to the terminal serially and get the character of your choice printed with preferred colored .
The video bellow shows a simple game written using AVR and controlled using an analog joystick connected to the ADC port of the AVR and the rendering is happening on the hyperterminal using the vt102 control sequences using the UART.
The following video demonstrates a simple game written on AVR
Coming to the part of writing 2D games .I have opted to use SLD gaming API is a cross-platform, free and open source multimedia library written in C.its a properly documented and lots of community support is also available online.
The paradigm which i choose to develop and control the game is as follows
The 2D game will be running on the PC and will receive control information serially through the comport available on the pc if a laptop is used we can use USB to serial converter to get a comport on your laptop.
The embedded hardware connected to the pc will send the control information according to the position of the joystick.
Many other interfaces can be done to the AVR like accelerometer and RC5 remote to controle the game.
The following video shows game Control using joystick interfaced to AVR:
Now how about controling the game Control using RC5 Remote interfaced to AVR:
Finally we have game Control using accelerometer interfaced to AVR: