Hey,

when i test a project on pc, my game runs faster like i test it on android phone...

Is there a way to change the fps/ fix it to get the same speed? I cant find it...

Thank you Neo

EDIT: the different speeds on Notebook and phone is a bigger problem as i said at last...

To alter the time of all the game use Engine.time_scale. This alter the time rate of all nodes (Rigidbodies, animationPlayers, etc) Example:

extends Node

func _ready():
	Engine.time_scale = .5 # Set the time x2 slower

Hi rjoshua, thank you again.

It looks like it doesnt maniputale the function process(delta): In process(delta): i have a moving sprite: bg01.translate(Vector2(0,bg_speed)) bg01 = backgroundtexture01 (sprite) and bg_speed = backgroundspeed bg_speed is a global var, so i can manipulate it via input from anywhere.

My texture is moving in different speeds while running on notebook or running on phone.

But i am interested to have the same speed on notebook and phone.

So, i think i have to fix the fps, or not?

Thank you and have a nice day Neo

You should use delta in physics-related calculations as to avoid making the final result dependent on the framerate. If you don't use delta in the right places, your game will run more or less fast depending on the framerate.

10 days later

Hi Calinou, thank you. ok, i think i got it. So I have to set my speeds in relation to delta... I'll test that :) Nice evening Neo

18 days later

hmm..i cant feature out it: my notebook shows me a fps (in the Godot - debugger - monitor) of round about 500, my mobilephone has 60 fps... so in this sample: func _process(delta): translate(velocity * delta) my notebook is a lot faster like my mibilephone... ...what have i to do with delta to get it in the same speed? please explain it with the line: translate(velocity * delta) ...i think i have to change it here for getting it to the same speed.

Thank you Neo

What's the full code? Because that looks correct to me. Try printing out delta to determine what the delta time between frames is for each platform to verify that they're different rates (they should be).

Hi @SolarLune , thank you for your answer - it let me thinking about it and i can now feature out: You are right - in this code, all is fine...the speed of my objects are similar, notebook and mobilephone. So i looked at the other codes where the differenzes are and find out: it is a big diference between the speed in the motion and the timer:

var spawn_time = 25 var spawn_timer = spawn_time signal armor_changed func _ready(): add_to_group("ship") pass func _process(delta): var motion = (get_global_mouse_position().x - self.position.x) * 0.2 translate(Vector2(motion, 0)) var view_size = get_viewport_rect().size self.position.x = clamp(self.position.x, 0+16, get_viewport_rect().size.x-16) spawn_timer -= 1 if spawn_timer == 0: spawn_timer = spawn_time shoot() pass

In this code, the notebook shoots a lot faster and the motion is faster as on the mobilephone... But in the same way i found out that i can handle it: i change the func func _process(delta) into func _physics_process(delta) ...in my first code this works fine, both have now the same speed...so ill recode the rest of my project to see if it works.

Thank you for this way to thinking, Neo

ok, after some try and errors...i got it work :) It's nice and in sync on the notebook and the mobile phone :)

func _physics_process(delta) made it :)

On the occasion I found out: Particle2D does not work on Android? ...I use 3.02 stable ... Should I open a new post for this?

Thank you Neo

@NeoBerlin said: On the occasion I found out: Particle2D does not work on Android? ...I use 3.02 stable ... Should I open a new post for this?

If you think you have found a bug the appropriate place to report it is of course the github issue tracker.

Also don't forget to mark posts that have helped answer your opening question as answers. ;)