Voici un exemple de programme !
Recopie le et execute le ... 
// DEBUT PROGRAMME
#include <allegro.h>
void monmenu();
void monjeu();
int main() {
// initialisation de base
int depth, res;
allegro_init();
depth = desktop_color_depth();
if (depth == 0) depth = 32;
set_color_depth(depth);
res = set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
if (res != 0) {
allegro_message(allegro_error);
exit(-1);
}
install_timer();
install_keyboard();
install_mouse();
srand(time(NULL));
int done=0;
int touche;
// on affiche le menu
monmenu();
while (!done) {
touche=readkey()>>8;
if (touche==KEY_ESC)
done=1;
if (touche==KEY_SPACE) {
monjeu();
monmenu();
}
}
return 0;
}
END_OF_MAIN();
void monmenu() {
clear_bitmap(screen);
textprintf(screen, font, 250, 50, makecol(255, 100, 0), "* Mon Menu *");
textprintf(screen, font, 250, 65, makecol(255, 255, 0), " SPACE - jouer");
textprintf(screen, font, 250, 75, makecol(255, 255, 0), " ESC - exit");
}
void monjeu() {
int done2 = 0;
// paramètres de la forme
int x,y; // coordonnées
int tx,ty; // taille
int px,py; // pas d'avancement en x et y
// initialisation des variables de la forme
clear_bitmap(screen);
tx=rand()%20+20;
x=rand()%(640-tx*2);
x+=tx;
px=(rand()%5)+2;
ty=rand()%20+20;
y=rand()%(480-ty*2);
y+=ty;
py=(rand()%5)+2;
rectfill(screen,x,y,x+tx,y+ty,makecol(0,255,0));
while (!done2){
textprintf(screen, font, 10,10, makecol(255,255,255),
"Appuyez sur les fleches haut,bas,gauche, droite et ESC pour quitter");
if (keypressed()){
//effacement aux anciennes coordonnées
rectfill(screen,x,y,x+tx,y+ty,makecol(0,0,0));
switch (readkey()>>8){ // recup sous la forme scancode
case KEY_UP : y-=py; break;
case KEY_DOWN : y+=py; break;
case KEY_LEFT : x-=px; break;
case KEY_RIGHT : x+=px; break;
case KEY_ESC : done2=1; break;// pour fin
default : break;
}
// contrôle des bords
x=(x+tx<0) ? 640-1 : x;
x=(x>640) ? -tx+1 : x;
y=(y+ty<0) ? 480-1 : y;
y=(y>480) ? -ty+1 : y;
// affichage
rectfill(screen,x,y,x+tx,y+ty,makecol(0,255,0));
}
}
clear_keybuf();
}
// FIN PROGRAMME
qu'en penses-tu ? 
Vince Le Fou !