官术网_书友最值得收藏!

Project setup

Launch Godot and create a new project, making sure to use the Create Folder button to ensure that this project's files will be kept separate from other projects. You can download a Zip file of the art and sounds (collectively known as assets) for the game here, https://github.com/PacktPublishing/Godot-Game-Engine-Projects/releases.

Unzip this file in your new project folder.

In this project, you will make three independent scenes: PlayerCoin, and HUD, which will all be combined into the game's Main scene. In a larger project, it might be useful to make separate folders to hold each scene's assets and scripts, but for this relatively small game, you can save your scenes and scripts in the root folder, which is referred to as res:// (res is short for resource). All resources in your project will be located relative to the res:// folder. You can see your project folders in the FileSystem dock in the upper-left corner:

For example, the images for the coin would be located in res://assets/coin/.

This game will use portrait mode, so you need to adjust the size of the game window. Click on the Project menu and select Project Settings, as shown in the following screenshot:

Look for the Display/Window section and set Width to 480 and Height to 720. Also in this section, set the Stretch/Mode to 2D and the Aspect to keep. This will ensure that if the user resizes the game window, everything will scale appropriately and not become stretched or deformed. If you like, you can also uncheck the box for Resizable, to prevent the window from being resized entirely.

主站蜘蛛池模板: 格尔木市| 芜湖县| 临高县| 宜春市| 封丘县| 仁怀市| 合江县| 大足县| 萨嘎县| 新巴尔虎左旗| 确山县| 青阳县| 松溪县| 资溪县| 南昌县| 潮安县| 博野县| 开阳县| 饶河县| 贵港市| 逊克县| 黎平县| 陈巴尔虎旗| 清原| 皋兰县| 抚州市| 鲁甸县| 丹阳市| 霍邱县| 博罗县| 泾阳县| 翁牛特旗| 喜德县| 岳普湖县| 西乌| 安国市| 扎兰屯市| 辽源市| 霍邱县| 包头市| 新平|