2.3 KiB
2.3 KiB
Screen
middle
- 2D view
- 3D view (default)
- Script
- AssetLib / Asset Library
left
- inspector menu
- node menu
right
- scene
- filesystem (below scene menu)
how to start
define root node of player
- go to scene menu
- click 'other node'
-
in create new node dialo,g select CharacterBody2D
- characterbody2d is what we use when we want to script
- note the yellow warning triangle to the right of the node name
- rename by clicking on the name and rename Player
-
save the scene
- will appear in filesystem dialog on lower left corner
create a sprite node
- select the player node
- right click and select 'add child node'
- in the dialog search for Sprite2D node
- click on the Sprite2D node, look at inspector menu
add art to project
- go to filesystem
- right click and add new folder 'art'
- from a finder window, select whatever media files you want and add them to the art folder
add art to the sprite
- select the Sprite2D node
- click and drag the media to the 'texture' property in the inspector menu
- move the camera over to the center of the window
- zoom in by clicking the + button at the upper left portion of the view screen
fix pixel art
- under 'canvasitem-texture-filter' in the inspector
- select 'inherit' (unless the changes are only to this sprite)
- go to player node
- go to 'canvasitem-texture-filter'
- change to 'nearest'
change sprite into frames
- go to sprite2D-animation
- modify HFrames and Vframes so they have the correct number of rows and columns
- you can change which frame you want to use, by going to the sprite2d-animation-frame and incrementing or changing the number to refer to which frame you want to use
set size of viewport
- go to project settings
- scroll down to display settings
- next select 'window' under display submenu
- set viewport width and height
- note that viewport doesn't mean window
set stretch settings for game window so it doesn't affect items when the window is changed
- project settings
- go to display-window-stretch
- set mode to 'canvas_items'
- set aspect to 'keep'
set window size
- project settings
- go to display-window
- click 'advanced settings' in upper right corner of dialog box to the right of the search tool
- go to 'window width override' and 'window heigh override' (1920, 1080)