- Functional Specifications
- Document control
- A. Introduction
- B. Functional requirements
- C. Non functional requirements
- D. Glossary
Document name | Document owner | Date of last update |
---|---|---|
Functional specifications | Evan UHRING | 10/7/2024 |
Role | Name | Signature | Date |
---|---|---|---|
Project Manager | Enzo GUILLOUCHE | ✅ | 10/07/2024 |
Technical Leader | Maxime CARON | ✅ | 10/07/2024 |
Software Developer | Elone DELILLE | ✅ | 10/07/2024 |
Quality Assurance | Axel DAVID | ✅ | 10/07/2024 |
Technical Writer | Pierre GORIN | ✅ | 10/07/2024 |
We were tasked top recreate the game Frogger using an FPGA[1] using the verilog[2] language.
Make a recreation of the game Frogger while adding our own touch to it.
- Recreate the game Frogger
- Has to be made using an FPGA
- The programming language has to be verilog
In scope |
---|
Deliver a playable Frogger with increasing levels |
Must run on an FPGA |
Be programed using verilog |
Be made using a 20x15 grid |
Each cell of the grid has to be 32x32 pixels |
Each button of the FPGA has to be one of the four direction movement |
The game can be reset to the beginning by pressing the four buttons of the FPGA at the same time |
The display has to be a VGA[3] display |
The level number has to be displayed using the two seven segment displays[4] of the FPGA |
Out of scope |
---|
Each level doesn't increase in difficulty |
Publish the game for commercial purposes |
Implement scoring mechanic |
Name | Type | Deadline | Link |
---|---|---|---|
Functional specifications document | Document (markdown) | 10/07/2024 | functionalSpecifications.md |
Technical specifications document | Document (markdown) | 10/14/2024 | technicalSpecifications.md |
Weekly reports | Document (markdown) | Every Friday | weeklyReports/ |
Test plan | Document (markdown) | 10/21/2024 | testPlan.md |
User manual | Document (pdf) | 10/21/2024 | userManual.md |
Name | Occupation | Links |
---|---|---|
ALGOSUP | Client | Website |
Role | Description | Name |
---|---|---|
Project manager | Is in charge of organization, planing and budgeting. Keep the team motivated. |
Enzo GUILLOUCHE |
Program manager | Makes sure the project meets expectation. Is in charge of design. Is responsible for writing the Functional Specifications |
Evan UHRING |
Technical leader | Makes the technical decision in the project. Translates the Functional Specification into Technical Specifications. Does code review. |
Maxime CARON |
Software engineer | Writes the code. Writes documentation Participate in the technical design. |
Elone DELILLE |
Quality assurance | Tests all the functionalities of a product to find bugs and issues. Document bugs and issues. Write the test plan. Check that issues have been fixed. |
Axel DAVID |
Technical writer | Is in charge of writing a user manual | Pierre GORIN |
Frogger is an arcade action game developed by Konami[5] in the year 1981, then published by SEGA[6] outside of Japan.
In Frogger, the player plays a frog and try to cross the road and the river all the way to the top of the screen in a limited period of time to gain points. Reaching the finish line with a "lady frog" and/or stepping on an insect gives more points. The player as limited lives, if he looses each one the them, the game is over. The levels keeps increasing the difficulty if the player finishes them.
Frogger uses a grid 14x16. Each cell is 16x16 pixels, which makes a total of 224x256 pixels.
It uses the monospace sans-serif font in uppercase, the same font as the game Pac-Man. It also uses it in multiple colors such as white, red, yellow, blue and pink. There is also a sprite[7] of five letters used for the title of the game with a special color style.
The score display is made into two parts: the first one being the current score entitled "1-UP", and the second one being the highest score entitled "HI-SCORE". The scores are shown using five numbers each. The high score is placed at the top of the screen right in the middle while the current score is placed at the left of the high score.
A special mechanic to the game is the timer. Each time you try to get to the finish line, the player has a limited period of time. It is shown at the bottom of the screen, using a text to tell that it is the timer with the yellow font, and a green bar that decreases in length to tell how many time is left before loosing.
The timer lasts for 30 seconds, translated into 60 "beats" or "ticks" (the term beats will be used for the rest of the document). Every time the player gets to the finish line before the end of the timer, a message in the middle of the screen tells how many beats was left, which then gives certain number of points (described in Scoring).
Example of the time left message, here the player got to the finish line 26 beats before the end of the timer
The game is created in two times: first there is the background, then we add the different sprites that moves on the screen.
First image is only the background, the second is with the moving sprites
The finish line is described by the green area at the top:
To win the level, the player has to go on each of the five water cells, and not on the grass.
Every animation steps when stepping on a finishing cell
Sometimes, an insect can spawn on one water cell of the finish line.
When going on it, the player gains extra points (see points table).
As well as the insect, a lady frog can spawn randomly.
When the player steps on it, he grabs the lady frog, to escort it to the finish line. If the player successfully escorted the lady frog, the player gains extra points (see points table).
The lady frog has the same movement animation than the frog the player is playing.
The road is a part of the environment where cars pass by.
It takes five rows of the grid.
There are five types of car, each one using its own row of the road.
Each type of car has a pattern, which is not random.
Slightly like the road, the river is also a part of the environment, but this time wood logs, turtles, crocodiles, otters and snakes go through it.
Same as the road, the river takes five rows of the grid.
The wood logs appear in the river, and go from the left to the right. They come with different width.
The player can step on them to cross the river, but because the wood logs move along the river, so the player can't stay on them.
The turtles work like the wood logs with one exceptions: they can go under water, and so the player can't step on them.
The movement animation is separated into three sprites, playing in one way then in the other way to get back at the beginning of the animation for a smooth animation.
They also have an animation when going under water, separated into two sprites.
The first sprite is to tell to the player that the turtles are going into the water, so the player is still able to step on it. But on the last one the player is no more able to step on the turtles. After few seconds, the turtles get back to their original movement animation.
The crocodiles also work like the wood logs with as well one difference: if the player tries to step on the face of a crocodile, the player dies.
The crocodiles sprites are separated into two sprites: the body and the head. The body never changes but the face can have an open or a closed mouth to animate it.
Crocodiles start to appear at the second level, and replaces some wood logs.
Otters can sometime appear in the river. If the player steps on them, the frog dies. They use two sprites: one when moving and one when attacking the frog.
Left, moving sprite. Right, attacking sprite
The snakes appear randomly on the river or on the line between the river and the road. If they touch the player, the player will die.
The snakes have a movement animation separated into three different sprites, playing in one way then in the other way to get back at the beginning of the animation for a smooth animation.
The "safe zones" are the area where the player can stay without getting killed by anything. They are the purple grass zones below the road and between the road and the river.
But after finishing the first two levels, snakes appear and the "safe zones" are no longer safe, can snake can sometimes go through them, and kill the player.
The player incarnates a yellow and green frog, which goal is to get across the road and the river alive.
The player will be able to move in four directions: up, down, left and right. It has six different sprites, 2 for the static position looking to the left and to the top, 4 for the movements with two looking to the left and two looking to the top.
The sprites are then rotated correctly to the direction the player is going, the sprites looking to the left are also used for when the player goes to the right, and the sprites looking to the top are also used when the player goes down.
The movement animation is composed of ten steps. The first 3 steps uses the static sprite, then for the next four steps, the sprite changes to the first jumping sprite, then changes for two steps with the last movement sprite, finally getting to the end position, it changes back to the static sprite. On each step, the sprite goes to the direction where the player is going to two pixels, getting to 16 pixels at the ninth step.
Each of the ten steps when doing a movement
The player starts with three lives. He can gain one life after getting enough points. The lives are displayed at the bottom left of the screen.
The player can die by either getting run over by a car, falling into the river, getting bitten by the crocodiles and snakes. When the frog dies, the number of lives decreases by one. There are two different death animations: one when the player falls into the river, and one for every other deaths.
Drowning sprites for falling into the river
Squash sprites for every other deaths
The player has multiple way to get points:
Actions that give points | How many |
---|---|
Getting closer to the finish line | Each row crossed gives 10 points once per frog |
Getting to the finish line | 50 points every time |
Beating the timer | 10 points per beats saved |
Escorting a lady frog | 200 points |
Eating an insect | 200 points |
Saving five frogs (getting to the finish line five times) | 1000 points per level |
In Frogger, a second player can play the game, but the two players play separately: when one finishes his level, the other player can now play his level, until he finishes to let the first player play again the next level.
They are multiple sounds for the different event as listed below:
- player moving
- cars moving
- main music (2 different)
- getting to the finish line
- eating an insect
- grabbing a lady frog
- successfully escorted a lady frog
- falling into the river
- dying
For our Frogger, our requirements are to create it using VGA, which gives us a resolution of 640x480 pixels. This resolution while be divided into a grid of 20x15 cells, with each cell having a resolution of 32x32 pixels.
Following our requirement, we will not have a timer nor a score, but the level number will be displayed using the two seven segments displays of the FPGA.
The font that we will use will be a redesign of the original font, in blue, white and red.
They are shown in black but they will be recolored in the program using the correct colors
When starting the game, the player will get to a menu, where he can choose to play or to quit. While in game, you can open a pause menu, to either go back to the main menu, restart or continue.
Because we are using a VGA display, we will not implement sounds in our game.
The environment, following our requirements and our possibilities with the hardware we are using, will be separated into three different types of zones: the safe zones, the road and the river. They are distributed on every 15 rows that are available (described here). On the roads, cars will go from left to right or right to left, depending on how it will be set for each row, and the same with snakes, wood logs and crocodiles in the river(described here).
We will use 3 different sprites for the cars, each of them fitting in one cell of the grid. Tow of the cars that we will use are up-scales from the original sprites, and one has been created by us. Each car will have its own row (described here). They will also have different speeds, defined by lowest, medium and highest. The car 1 as a medium speed, the car 2 has the lowest speed and the car 3 has the highest.
Car 1, 2 and 3 in this exact order
To stay close to the original game, we decided to add the river, in which we will implement wood logs and crocodiles, as well as a snake, that works differently from the original game compared to the wood logs and the crocodiles. The snakes will take multiple cells, on which the head will be the lead of the movement, and the body will follow the head. Like the crocodiles, the player will be able to step on the snakes' body but not on the head.
For the wood logs and the crocodiles, the sprites that we will use are redesign of the original ones, but the snakes' sprites will be our own creation, and will be able to be shown in different sizes. They also will have different speeds, differentiated into three speeds, low, medium and high. The snakes has a low speed, crocodiles has a fast speed and wood logs has a medium speed.
Back of the log, middle, front in the correct order
Crocodile with closed or opened mouth
Snake's head, body and tail sprites in the correct order.
Distribution of the zones:
Safe zone (Finish line) | ||
River (left to right) Snake | ||
River (left to right) Wood logs | ||
River (right to left) Wood logs | ||
River (left to right) Crocodile | ||
River (right to left) Snake | ||
River (right to left) Wood logs | ||
Safe zone | ||
Safe zone | ||
Road (right to left) Car 3 | ||
Road (left to right) Car 1 | ||
Road (right to left) Car 2 | ||
Road (left to right) Car 3 | ||
Road (left to right) Car 2 | ||
Safe zone (Start line) | ||
We will use sprites to show the different zones, one is a road, one is grass and one is a river:
Road on the left, grass in the middle, river on the right
To be recognizable from the frog and to have an autumn vibe, the grass has been colored in orange.
When getting to the top safe zone, the player will have to go forward once more to get to the next level. He will be then teleported back at the bottom to begin the next level, with a higher difficulty represented by the increased speed of the cars as well as the number of car shown at once increased.
The player will incarnate a frog that will try to get across the roads without getting run over a car.
The frog will be a redesign of the original from, to fit the up-scale of the game compared to the original game. It will have two other sprites for the animation of movement, and we will use sprites that only look into one direction, so we will have to flip them to the direction where the player is going. The movement animation is separated into three sprites, the first sprite being the one when the player doesn't move:
The player will be able to move in four directions: up, down, left and right.
When the player gets ran over by a car, he will get a game over menu where he can either restart or quit the game.
To make the project a part of our attention, we will create everything needed to make it looks like a console, named "Lilypad" n reference of the player playing a frog. 3D models of the housing for the FPGA are made, as well for a controller that will be able to be plugged to the FPGA, to have something more comfortable to hold.
3D model of the housing for the FPGA
- Runs on an FPGA
- The game program will be available on our GitHub.
- Commented and documented code
Word | Definition | Source |
---|---|---|
[1]: FPGA | Short of Field Programmable Gate Array, it is a type of configurable integrated circuit that can be repeatedly programmed after manufacturing. | wikipedia.org |
[2]: verilog | It is a hardware description language (HDL) used to model electronic systems (like an FPGA). | wikipedia.org |
[3]: VGA | Short of Video Graphic Array, it is a video display controller. | wikipedia.org |
[4]: seven segment display | It is a form of electronic display device for displaying decimal numerals. | wikipedia.org |
[5]: Konami | It is a japanese corporation focused on digital entertainment and sport businesses. | konami.com |
[6]: SEGA | It is a japanese corporation focused on the video game business. | sega.com |
[7]: sprite | In computer graphics, it is a two dimensional map used to texture models of a 2D game. | wikipedia.org |