Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Godot 4 Space Shooter #3: Moving the Ship with GDScript”.
Other ways we can help with Godot.
Learn with a mentor
Scheduled Game Development courses with live guidance and a certificate.

Course/Training Unreal Engine — Procedural Animation for Humans in Unreal Engine 5
★ 5.0 (60)

Course/Training Unity — Learn to Code by Making a 2D Platformer in Unity & C#
★ 5.0 (10)

Course/Training Construct 2 — Creating a Top-Down Shooter Game in HTML5
★ 5.0 (10)
Have it built for you
No time to learn Godot? Our team can do the project for you.

Development Service: Unity — Building a Battle Royale RPG Game Using Unity and Blender Ultimate Class
★ 5.0 (26)

Unity Development Services — Become a Unity Game Developer Learning Paths
★ 5.0 (12)

Development Service: Unreal Engine — Unreal Engine 4 – Build Your First Game with UE4!!
★ 5.0 (12)
Get notified about new Godot classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
In this episode, the plane can be moved in all directions using the arrow keys, its speed can be adjusted from the inspector, and the plane cannot go out of the screen. Hello, welcome back. In episode 3, we write our first GDScript script to move the plane. We get to know the underscore process function, which runs every frame.
Select the player node, then click the attack script button. Disable use template so that the script is empty. Name it player.gd, then create. The script editor opens. Type a speed variable with the add export tag, so its value appears in the inspector and can be changed without touching the code. Its initial value is 400 pixels per second. Then the underscore process function with the delta parameter, which is the time since the previous frame. Input get vector reads the 4 direction keys at once into 1 vector. Position is added with direction multiplied by speed multiplied by delta, so the movement is smooth on both fast and slow computers. To prevent the plane from going out of the screen, we get the screen size with gate view portrait, then limit the X and Y positions with the clamp function. Save with Ctrl+S, then press F6 to run this scene only. Press the arrow keys, the plane moves smoothly and stops at the edge of the screen.
Want to be able to make your own game? Cerdas Inovasi Digital offers game development courses with Godot, Construct 3, and Unreal Engine, game development services for education and promotional games for schools or businesses,
as well as selling the complete project file of this tutorial along with its assets. Want to master the entire series, from a blank project up to exporting the game as a Windows application? All 14 episodes, complete with PDF step-by-step guides, are available for premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →