• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

[Lập Trình Game] Display FPS for games using Godot Engine

AnonyViet by AnonyViet
January 16, 2025
in Tips
0

FPS (frames per second), also known as frames per second. The more frames your computer displays per second, the smoother the game. FPS depends on network speed and computer hardware. To display the FPS of the Game you programmed with Godot Engine, follow the instructions below.

Join the channel Telegram belong to AnonyViet 👉 Link 👈

Display FPS for games using Godot Engine

FPS

First, you create 2 Nodes for yourself CanvasLayer and label.label. Label is a child node of canvaslayer

And I changed the label name -> fps label

Display FPS for games using Godot Engine

You create yourself a script in Node World

In the declaration section, you declare yourself as follows

onready var fps_label = get_node("CanvasLayer/fps_label")

get_node() is to get your node address

onready var is to declare a variable that is always available, for example like this:

  • A normal Var is a gun without bullets
  • Onready var is a gun that is ready to be loaded
  • Declare var in _physical_process then only when physical_process works, then var will work

Add your own function func _process(delta):

_process(delta): is the function called on each idle frame

_ physical _process: is a function called on every physical frame

You can look it up in the godot documentation: https://docs.godotengine.org/en/3.0/classes/class_node.html#class-node-process

And if you use functions _process(delta): you need to enable it in function func _ready by command set_process(true)

And let's go back to the main part.

LIVE _process Please type for yourself

code programming Godot Engine FPS Display

func _process(delta):

fps_label.set_text("FPS: " + str(Engine.get_frames_per_second()))

After typing and running the game, you will see the fps displayed

[Lập Trình Game] Display FPS for games using Godot Engine

Note: You must adjust the position of the label if you want to see fps

And you can also print FPS to the debug section in the following way

Project > Project Setting > Find FPS > click Debug Settings > Click Print FPS On > run the game and pay attention to debugging to see the fps displayed

debug game godot engine

Previous Post

Revealing 3 ways to rescue the brain from “Brain rot”

Next Post

Instructions for turning off automatic video translation on Facebook

AnonyViet

AnonyViet

Related Posts

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models
Tips

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
How are Windows 11 Pro and Windows 10 Pro different?
Tips

How are Windows 11 Pro and Windows 10 Pro different?

October 23, 2026
Instructions for using CleanYourTV: Remove ads on Android TV, Google TV
Tips

Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

October 23, 2026
How to use Messenger without a Facebook account
Tips

How to use Messenger without a Facebook account

October 22, 2026
The website helps you draw beautifully like TikToker Viet My
Tips

The website helps you draw beautifully like TikToker Viet My

October 21, 2026
Instructions on how to hard reset iPhone 18 Pro / iPhone 18 Pro Max
Tips

Instructions on how to hard reset iPhone 18 Pro / iPhone 18 Pro Max

October 21, 2026
Next Post
Instructions for turning off automatic video translation on Facebook

Instructions for turning off automatic video translation on Facebook

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted

Recent News

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
How are Windows 11 Pro and Windows 10 Pro different?

How are Windows 11 Pro and Windows 10 Pro different?

October 23, 2026
Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

October 23, 2026
Receive copyright for 3 Halloween software worth 0

Receive copyright for 3 Halloween software worth $150

October 23, 2026
Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
How are Windows 11 Pro and Windows 10 Pro different?

How are Windows 11 Pro and Windows 10 Pro different?

October 23, 2026
Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

October 23, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
How are Windows 11 Pro and Windows 10 Pro different?

How are Windows 11 Pro and Windows 10 Pro different?

October 23, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply