- Scratch 2.0 Game Development HOTSHOT
- Sergio van Pul Jessica Chiang
- 474字
- 2021-07-19 18:17:00
Drawing a racetrack
We will start by adding a racetrack to the Stage backdrops. This way, we have some guidelines for the rest of our program. We know how the road is shaped and where the curves, corners, and walls are.
Prepare for lift off
For the background, we will use an original Mario Kart map. You can find game images such as these all over the Internet. What's important to remember here is that the image you choose should fit your game screen. In this case, the game screen is 480 pixels wide and 360 pixels high, so a background image should be at least that size.

Another thing to note is that although these images may be freely available, it doesn't mean that they are completely free. The original artists put time and effort in creating them. Also the game studio and/or producer (Nintendo, in this case) invested money to promote and sell their game.
Engage thrusters
We will get a good-looking race map and place it as a background image in the Stage sprite:
- Find a Mario Kart map online or use the image file that comes with this project. Download the image to your computer if you're looking for an image on your own.
- Start a new Scratch project and remove the cat sprite.
- Click on the folder icon underneath the Stage thumbnail. This will open the file browser of your computer.
- Navigate to the folder where you saved your map image.
- Click on the image and select Open. This image will now be loaded as a backdrop.
The image will be shown in the Backdrops editor in its actual size or as big as possible if it's bigger than the stage area.

Your image might have different proportions than the stage area. In this case, you'll have to resize the image to fit the entire screen. To do this, follow these steps:
- Click on the Select tool, then on the image. You'll see the scaling widgets show up around the edges of the image.
- Pull the scaling widgets to fit the image to the screen. Take note that this will stretch the image, somewhat changing the shape of the track. But this shouldn't be too much of a problem.
- Perhaps you also need to clean the image, removing any unwanted details, such as coins and question blocks. You can do this in the Scratch editor, but this is where an external image editor might also be useful.
Objective complete – mini debriefing
When we're done editing the image, we'll have a racetrack which fills the entire stage. The track contains a well-defined road, some sandy areas around it, and some colorful borders and grass that a kart won't be able to cross. These different elements will become important later in the project. That's why we're taking note of them.
- 大規(guī)模數(shù)據(jù)分析和建模:基于Spark與R
- Voice Application Development for Android
- 商業(yè)分析思維與實(shí)踐:用數(shù)據(jù)分析解決商業(yè)問(wèn)題
- Creating Dynamic UIs with Android Fragments(Second Edition)
- 大數(shù)據(jù)架構(gòu)和算法實(shí)現(xiàn)之路:電商系統(tǒng)的技術(shù)實(shí)戰(zhàn)
- Python數(shù)據(jù)分析與挖掘?qū)崙?zhàn)(第3版)
- 云數(shù)據(jù)中心網(wǎng)絡(luò)與SDN:技術(shù)架構(gòu)與實(shí)現(xiàn)
- 數(shù)據(jù)科學(xué)實(shí)戰(zhàn)指南
- Hadoop大數(shù)據(jù)開(kāi)發(fā)案例教程與項(xiàng)目實(shí)戰(zhàn)(在線(xiàn)實(shí)驗(yàn)+在線(xiàn)自測(cè))
- Python數(shù)據(jù)分析從小白到專(zhuān)家
- 大數(shù)據(jù)技術(shù)原理與應(yīng)用:概念、存儲(chǔ)、處理、分析與應(yīng)用
- 大數(shù)據(jù)與機(jī)器學(xué)習(xí):實(shí)踐方法與行業(yè)案例
- 數(shù)據(jù)中心經(jīng)營(yíng)之道
- 大數(shù)據(jù)技術(shù)體系詳解:原理、架構(gòu)與實(shí)踐
- 掌中寶:電腦綜合應(yīng)用技巧