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

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.

主站蜘蛛池模板: 阜宁县| 江达县| 北宁市| 望谟县| 井研县| 石嘴山市| 大关县| 平昌县| 潍坊市| 兰坪| 鹤山市| 宝清县| 光泽县| 巴林左旗| 蚌埠市| 瑞安市| 广平县| 西乡县| 界首市| 安仁县| 城固县| 萨嘎县| 石河子市| 安图县| 襄城县| 永年县| 沅江市| 汝南县| 陆河县| 砚山县| 湄潭县| 台中市| 东至县| 长寿区| 西乡县| 永顺县| 翁源县| 青浦区| 琼海市| 咸丰县| 大同市|