Seite anzeigenÄltere VersionenLinks hierherNach oben Eine ältere Version des Dokuments wurde geladen! Beim Speichern wird eine neue Version des Dokuments mit diesem Inhalt erstellt. Dateiauswahl====== Godot 3 - Platformer Tutorial (UmaiPixel) ====== ===== Getting started ===== {{youtube>MMsMtPVUtUE?}} * Projekt erstellen{{ :tutorial:schnappschuss_070323_051912_pm.jpg?200|}} * Einstellungen (Project Settings) * Rendering | 2D | Use GPU Pixel Snap = on * Display | Window | Size (16:9) z.B. 320 x 180 * Test Width & Height = 1280 x 720 (vier mal Originalgröße) * Stretch Mode = 2d * Aspect = keep * erste Szene erstellen * Hauptszene erstellen (Node2D) und speichern * Playerszene erstellen * KinematicBody2D * Sprite\\ Sprite Reimport mit Preset 2D Pixel\\ Sprite Einstellungen für CharacterMap * CollisionsShape2D * Group Selected Nodes\\ {{ :tutorial:schnappschuss_070423_075207_am.jpg?400 |}} ==== First Script ==== Version 1.0 <codedoc code:c++> extends KinematicBody2D var velocity = Vector2() func _physics_process(delta): if Input.is_action_pressed("ui_right"): velocity.x = 30 move_and_slide(velocity) </codedoc> Version 1.1 <codedoc code:c++> extends KinematicBody2D var velocity = Vector2() func _physics_process(delta): if Input.is_action_pressed("ui_right"): velocity.x = 30 elif Input.is_action_pressed("ui_left"): velocity.x = -30 else: velocity.x = 0 move_and_slide(velocity) </codedoc> Version 1.2 - links, rechts, stop <codedoc code:c++> extends KinematicBody2D var velocity = Vector2() func _physics_process(delta): if Input.is_action_pressed("ui_right"): velocity.x = 30 elif Input.is_action_pressed("ui_left"): velocity.x = -30 else: velocity.x = 0 move_and_slide(velocity) </codedoc> Version 1.3 - alle Richtungen <codedoc code:c++> extends KinematicBody2D var velocity = Vector2() func _physics_process(delta): if Input.is_action_pressed("ui_right"): velocity.x = 30 elif Input.is_action_pressed("ui_left"): velocity.x = -30 else: velocity.x = 0 if Input.is_action_pressed("ui_up"): velocity.y = -30 elif Input.is_action_pressed("ui_down"): velocity.y = 30 else: velocity.y = 0 move_and_slide(velocity) </codedoc> ===== Jumping and gravity ===== {{youtube>xAXyHxxYPrQ?}} ===== Tilsets and Tilemaps ===== ===== Character animation ===== ===== Fireball alright! ===== ===== Fireball alright and left ===== SpeichernVorschauAbbrechen Zusammenfassung Hinweis: Durch das Bearbeiten dieser Seite geben Sie Ihr Einverständnis, dass Ihr Inhalt unter der folgenden Lizenz veröffentlicht wird: CC Attribution-Share Alike 4.0 International tutorial/umaipixel-2dplatformer.1688451505.txt.gz Zuletzt geändert: 2023/07/04 08:18von 185.38.49.0