Creating a simple video game is not that difficult

About 30 Bachelor students participated in the 4th edition of the video games creation contest, organized by Prof. David Atienza of the Institute of Electrical Engineering. Each year this competition brings to a close the one-semester Microprogrammed Embedded Systems course, during which students learn to control every parameter of the game console.

This year, 15 teams of one or two students have been using their creativity to compete for the first prize – a Nintendo DS. "There were so many participants that we were forced to organise a public first round, where students from any section could rate the different games", says David Atienza, who teaches a very exciting Bachelor course for the Section of Electrical Engineering at STI. At the end of this first round, four teams of finalists were given the opportunity to proceed, and to appear before a jury comprised of several professors, and of the EPFL Vice President, Philippe Gillet. "The projects were impressive", David Atienza comments. "Some teams had implemented very advanced functionalities in the limited resources – memory and speed – of the NDs. Some students had connected their console to external devices, such as robots, and others had created complex artificial intelligence engines, to make the opponents in their games smarter. Some participants also presented a program capable of recognizing patterns of handwritten letters in real time."

"The jury liked our retro-style game"
Two very different games finished in joint first place. The first one was created as a tribute to arcade games. Entitled "Snac-Man", it is a mix of two classics. The famous Snake game, made popular by the Nokia phones, and the legendary Pac-Man, the blob-shaped yellow character eating dots in a maze.

With "Snac-Man", the snake’s mission is to swallow dots spread around the field, while avoiding the ghosts rising up at the end of each line. The opponents can be destroyed using the stylus to touch fruit that appear sporadically on the screen. "The jury liked the retro-style of this simple game. It reminded them of their childhood", says Eve Carletti, one of the game designers.

Control a robot via Nintendo DS
The other 2014 laureate is the "Robot" game, where the Nintendo DS is used as a remote control to guide a 30 centimetre long mobile robot, via Wi-Fi. Thanks to sensors placed at the front of the moving device, the player can see obstacles on the console, and he is warned by an alarm when the robot is getting to close to an obstacle. "As Mechanical Engineering students, we wanted to add an element that is more related to our studies", Maxime Moreillon explains. "We enjoyed this project so much that we might carry on programming our Nintendo DS, even though the course is finished", he adds.

Originally reserved for 3rd year Electrical students, the competition is now open to people from other sections such as Mechanical Engineering and Computer Science. The only prerequisite is to have attended the Microprogrammed Embedded Systems course, which includes more and more participants each year.

During the course, students learn to develop a program that makes the most of the console’s various features. At they end, they must be able to control all the parameters such as the directional arrows or the tactile screen, but also to create graphical elements and music. "Working on a Nintendo DS is highly motivating. We realise that creating a simple video game is not that difficult. Besides, thanks to this course, we understand that everyday items such as phones or appliances rely all on the same basis", says Eve Carletti. "Being able to create a project from A to Z and turning an abstract idea into practice constitutes the strength of this course", adds Maxime Moreillon.

From programming to building a console
Programming software on a console that is already available is restrictive, however. Students depend on a set  hardware structure, created by a third party. "I’ve been asked several times if it would be possible to work with a faster processor. Yet it all depends on the hardware limits", comments David Atienza. Together with Prof. Andreas Burg and Dr. Alain Vachoux, the scientist has therefore initiated a complementary Bachelor course aiming at acquiring the skills to create a whole console, starting from the design of the hardware.

The goal of this new course is to introduce students to the design of custom digital hardware and to study the anatomy of an embedded system, in order to understand the way it works. Once this knowledge is acquired, students are asked to compose their own complex embedded system

They work with a programmable integrated circuit (FGPA). This means that it is possible to define the way the different components of the circuit interact with each other. In parallel, students are also required to develop custom hardware components and to integrate them into the system. At the end of the course, it is possible to test the "hand-made" console by connecting the system to a computer screen. (see video clip)

"The two courses enable the students to create a simple console from scratch", says Andreas Burg. "This kind of knowledge – the capacity of building a complete embedded system, whether it be the software or the hardware part, is a real asset", he adds. "Several Swiss companies are using programmable integrated circuits for all kinds of prototypes and high-tech products, for example, for telecommunications infrastructure, robotics, and alike. They are very interested in hiring people who know how to use them".

Next step: the smartphones
Following on from these two Bachelor courses, the Section of Electrical Engineering (SEL) offers the possibility for students to go a step further. A course launched last year on apps development for tablets and smartphones is available at the Master level. "The idea of this laboratory is to show to the students that, based on the education they have received at the Bachelor level, they are ready to fully understand and develop the complete system, using the latest generation of embedded systems. Google Nexus 7 tablets and Android phones are the target platforms for this laboratory", says David Atienza.

Courses: Microprogrammed Embedded Systems / Lab in digital systems design / Lab on apps development for tablets and smartphones

Related articles: A class on the Nintendo DS? /A pocket synthesizer that also rides a motorcycle

Text: Laure-Anne Pessina
Pictures: Alain Herzog