This page is kept for historical purposes only. Please see the home page for my current situation. —Luca Saiu.

DEVL 2009 - Big project

The final big project requires some competence with Scheme, at least at the level of the last TP. If you are still weak in the Scheme syntax or you can't understand the demos in guile-network-game then the big project is too difficult for you at this stage: you should get acquainted with Scheme first.

- Rattrapage -

Deadline: 48 hours before the written exam.

2010-08-30: Exposés écrits pour le rattrapage: les détails sont expliqués ici.

Please notice that the list of games has changed for the rattrapage (see below).

There will also be a written exam and its mark will be summed to your project bonus, just as explained in the course page: the only difference is that there is no bonus now. Of course it is still possible to have 20/20, particularly if you do both the project and the written exam.

Don't waste too many resources on beautiful graphics; for example you can draw a square instead of a spaceship.
Also, don't write elaborate documentation; I just need to understand how to run your Scheme program, and I will read the source code anyway.

Please don't send me implementations of something different from what is requested here.

The task

You have to implement a classic game in Scheme by building on gnome-network-game, which already includes graphic primitives and ways to support keyboard and mouse input.

You can choose one of (in approximate order of difficulty):

If you want to implement another different game I have not thought of, please ask me before. Please notice that I will not accept implementations of Pong or Arkanoid/Breakout for the rattrapage; the solution is known by now.

You can modify some details of the traditional rules if you want.

Here is guile-network-game version 0.0.2. You shouldn't use the older version.

No more than three people per sumbission, and everybody in a group must understand all the code.

Don't try to cheat or I will get very angry. It's ridiculous that I actually have to write this: sorry, no offense is intended to honest students, but not everybody has behaved like a mature person in the past.


The game should have at least two players, and at least one player should be controllable by the computer (this is called Artificial Intelligence or AI, even if it's just a trivial version of what you may study in an Artificial Intelligence course).

If your game is traditionally a one-player game, you can find some way to extend it to multiple players: for example you can have more than one paddle in Arkanoid (for example one on the top and one on the bottom, each one controlled by a different player; this in fact will turn Arkanoid into something similar to Pong). In Tetris every time a player fills a line (or two), the other player could get a new partially filled line at the bottom of his/her field (xtris does this). Otherwise you can invent some different rule.

You have to write an AI, but it doesn't have to be very good. In some games it's necessarily trivial - for example an "intelligent" player in Pong just follows the ball. In the "harder" games an AI playing random moves is acceptable.

If you satisfy the requirements above and your program works well, even a solution for Pong - the simplest game - will get you at least a +10 bonus; and of course more complex games are worth more points. Your bonus will also be higher if your solution is more general; for example, allowing an arbitrary number of players is a good idea. Writing a decent AI for Tetris or Asteroids will get you a very good bonus. The quality of your code counts.

If you are a good programmer then this is a good opportunity to do something complex and original. Write a glorious hack. Surprise me.
If you don't feel that strong, you can still do something good. Pong has very simple solutions, and Arkanoid is not much more difficult.

A client/server architecture is not required any longer!

At the beginning I had requested to implement a client/server application, with the game "physics" in the server. Later, as I have said in class, I have changed my mind about that: a client/server solution is not required any longer. Reasonable client/server solutions also require multi-threading, which I recognize to be too much work for our course. Of course you can still do it if you want, for a very big bonus (most likely +20).

The client/server version is only for strong programmers.

My demo

My demo game is somewhat similar to Asteroids (the artificial intelligence in my demo works well but is much simpler than a good Asteroids AI; I don't expect your AIs to play Asteroids as well as my AIs work in the demo: Asteroids is significantly more difficult from this point of view). It's in the directory scm/big-project-demo of the guile-network-game sources. There is also a client/server version, but you are probably just interested in the standalone game -- the main file is scm/big-project-demo/big-project-demo-standalone.scm.


In order to run the demo, type:

./guile-network-game scm/big-project-demo/big-project-demo-standalone.scm

from the guile-network-game-0.0.2 directory. Of course you must hace configured and compiled the software before.


This project is about programming, not game design. Of course I'm not particularly interested in the "playability" of the game itself; it doesn't have to be very fun, or to employ very elaborate graphics. For example, even if my demo looks quite good, it only uses circles.

You are strongly encouraged to use the Guile manual. It's very well-written.

Write many small functions instead of few big ones. Give each variable and each function a reasonable name, so that I (and, much more importantly, you) can understand exactly what it does. Names can be as long as you want in Scheme, so it's perfectly good to call a variable something like ball-horizontal-speed. Keep your source code clean.

Particularly at the beginning, don't worry too much about efficiency (as soon as you don't do something extreme like using an exponential algorithm!). I will test your project on the computer in my office, which is very fast.

Using the console might be a good idea, for example to show scores.

For some games including Tetris and Arkanoid and most of the new ones, using arrays is a good idea; look for make-array in the Guile manual. I said "arrays", not vectors: it's easy to manage matrices with arrays, but it's much less convenient with vectors.

You can reuse my code. Of course you should pay attention to the license.

This is a course about free software: pay attention to license and copyright headers.

Back to my home page...

Luca Saiu
Last modified: 2010-08-30
Copyright © 2009, 2010 Luca Saiu
Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.