Level Up Your Snake, Part 2: A Title Screen for Your Snake
- Marcel Pflug
- 54 minutes ago
- 3 min read
In Part 1 we drew a start-screen picture and a small font. A picture, though, is not yet a title screen. A real one appears the moment the console boots, sits there looking inviting, and waits for the player to decide when to begin. In this part we bring the design to life: the game will show our SNAKE screen on start-up and hold there until START is pressed. As before, we will read every line together, so no coding background is needed.
Painting the Title Screen
Drawing the title screen is just placing tiles, using the draw_text helper from Part 1 for the words and the plain body tile for a little coiled snake.

We gather it all into one reusable instruction we can call whenever we want to show the title:
void title_screen(void) {
clear_screen();
draw_text(7, 5, "SNAKE");
// a small coiled snake, drawn from body tiles
set_bkg_tile_xy(7, 8, T_BODY); set_bkg_tile_xy(8, 8, T_BODY);
set_bkg_tile_xy(9, 8, T_BODY); set_bkg_tile_xy(9, 7, T_BODY);
set_bkg_tile_xy(12, 8, T_FOOD);
draw_text(4, 12, "PRESS START");
}Let us read it from the top. The screen is a grid twenty columns wide and eighteen rows tall, and we count from the top-left corner, so a position is written as (column, row). clear_screen() first wipes the display to a blank field so nothing old is left behind. draw_text(7, 5, "SNAKE") writes the word SNAKE starting at column 7, row 5, using the font we made in Part 1. The four set_bkg_tile_xy lines that follow each drop a single snake-body tile at one named square, and by choosing squares that sit next to each other we draw a little coiled snake by hand, one segment at a time. The next line places one food tile beside it. Finally, draw_text(4, 12, "PRESS START") writes the prompt lower down the screen. Nothing here is clever; the whole function is simply a list of what goes where.
Waiting for the Player
Now the game shows the title and simply waits. There is also a neat trick hidden in these few lines that gives us randomness for free:
title_screen();
seed = 0;
waitpad(J_START); // hold here until START is pressed
while (joypad() & J_START) seed++; // count while the button is held
initrand(seed); // seed the randomness
waitpadup(); // wait for release, then beginHere is what each line is doing. title_screen() paints the screen we just built. seed = 0 sets a counter to zero, ready to use in a moment. waitpad(J_START) is the important one: it freezes the whole game on the title screen until the player presses START, so nothing moves until they are ready. The next line, while (joypad() & J_START) seed++, then runs over and over for as long as START is still held down, adding one to seed each time, so seed ends up holding roughly how long the button was pressed. We hand that number to initrand(seed), which uses it to decide where food will appear; because every player holds the button for a slightly different moment, every game gets a different pattern of food. Lastly, waitpadup() waits for the player to actually let go of START before the snake springs to life, so a long press does not accidentally carry over into the game.
A Game That Greets You
Build the ROM now and the difference in feel is out of all proportion to the few lines we added. Instead of dropping you straight into a moving snake, the game opens with a calm, confident title screen and lets you begin in your own time. It is a small courtesy that instantly makes the project feel finished rather than experimental, and it gives us a home to return to whenever a game ends.
Coming Up in Part 3
Our game looks inviting, but it still does not tell you how well you are doing. In Part 3 we add a score: a counter that starts at zero, climbs with every piece of food the snake eats, and is drawn live at the top of the screen using the font we designed in Part 1.
The console this all runs on is documented, with photographs, in the collection.









Comments