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

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.

主站蜘蛛池模板: 沂源县| 沛县| 新乡市| 民权县| 建平县| 论坛| 宁陵县| 石泉县| 武陟县| 宣汉县| 怀宁县| 田阳县| 大关县| 若羌县| 池州市| 工布江达县| 益阳市| 巩义市| 揭东县| 罗定市| 肥城市| 遂川县| 衡阳县| 南澳县| 高州市| 嘉兴市| 霍林郭勒市| 宝山区| 安达市| 台湾省| 静宁县| 英德市| 扎囊县| 南丹县| 襄汾县| 林芝县| 宝应县| 女性| 塘沽区| 韶山市| 耿马|