Movement speed different on AMD vs INTEL cpu?

I’m having some strange behaviour with an endless runner game single player game so has nothing to do with replication (the travel distance starts on both pc’s with 0). I set the max walk speed to 1000 and on my AMD pc the character runs slower than on my INTEL pc (as in visually seen). With a print string from character movement->max walk speed it shows on both pc’s the same speed: 1000. But stil the character runs faster on the INTEL pc. Personally I don’t think it has to do with INTEL or AMD…but as far as I know thats the only differrence… Both have a NVIDIA GPU…

So how can I get the speed on every computer the same?

Stat unit
what is the difference between the two?

Thank you for your message, I guess you mean the differences between the computers? The AMD computer has a Ryzen 7 1700 Eight-Core 2.5GHz CPU with Nvidia GeForce GTX 1060 3GB VGA with 16GB RAM, and the INTEL computer has a INTEL Q8400 Quad-Core 2.66GHz CPU with Nvidia GeForce GTX 660 2GB VGA with 4GB RAM. On the INTEL computer (is slower) the running looks to go faster…but if I print the walking speed it is on both of the computers the same…

The running mechanism is now triggerd on a tick event, so that the character always runs without pressing a key. Can it be that the tick runs faster or slower on different computers? I also tried it without the use of a tick, but it has the same result…visually different run speeds on both computers…

What’s the frame rate on each PC? For the sake of my own curiosity, can you execute console command: **t.maxfps 60 **on both PC’s and test? Are you running the game as a listen server (player = host)?

Try adding some float like “speed”, then multiple it by delta time and after connect it to Scale value of AddMovementInput node.

The frame rate on the AMD pc is 60 FPS and on the INTEL pc the framerate is 40 FPS. I run the game as listen server. I already tried with t.maxfps on 30 and then it seems ‘almost’ good…but, as soon I add more speed then you wil still see the difference on both pc’s…on the INTEL pc it all goes faster…

I agree here. It is likely framerate there are framerate settings in Edit Project Settings. Set frame rate to a fixed number and retest. Or just aasume its the time.deltatime like Alexander said

@ **Alexander.L, **I have the scale on a fixed 1. If I add a float ‘speedscale’ and multiply that with the Delta Seconds and connect it with the scale, than I can not turn anymore… I only need the running forward to be constant, the character must be able to turn.

I meant the difference between the command Stat Unit on each system.
My thinking was that the run speed you set up was frame limited, like others suggested afterwards.

The best way to fix it is to not add movement input every tick.
you need to figure a different mechanism that is not frame rate dependent.
for instance, you could use a branch, and add the input only once the measure is set.

Time = delta seconds + time

if time >= .5, then add input and reset time.

Needs to be something along those lines to offset the difference in acceleration.

I’m a bit confused by the implementation of your blueprint. It looks like you are actually multiplying the runspeed by Delta time, and then using that to set the max walk speed of the movement component used by the default character class. By multiplying the character movement component by the frame rate, you actually are potentially causing the error since now you’re constantly changing the max walk speed per frame, when it is already programmed to be the MAX regardless of frame rate differences.

Not sure if I worded that correctly, but to try and be clearer, the max walk speed should be a variable that only really should change on a state change, such as setting it to be 600 instead of 400 when the player presses the Sprint key. By multiplying that by Delta time you are infact potentially making it be less or more every frame.

One case where you would multiply by Delta time would be if you are manually yourself causing the actor to move each frame by getting the actor location + ( forwardvector * (yourwalkspeedfloat * world Delta time) and setting that to be the actor location that frame, which would make it frame rate independent. The handling of the actual moving of the character movement component is already programmed to be frame rate independent, so I believe in essence your causing it to break by changing the max walk speed every frame when it should just be static and not multiplied by Delta time at all.

Hope that helps!

@**MostHost LA **Sorry that I didn’t understand the Stat Unit command, I’m still very new to Unreal Engine :wink: below the output of the command:
AMD pc
AMDpc.png
INTEL pc
INTELpc.png

I also tried the Time = delta seconds + time and if time >= .5, then add input and reset time solutions, but this did’nt help…or maybe implemented it wrong…

@**Deathstick ** Thank you for explaining, you are right and I implemented it wrong…still learning :slight_smile:

I tried it also like the pictures below without the tick event, but still the same results…different visual speed…(btw, I use the same resolution on both pc’s, at first I thought that was the problem…but I have to say that the AMD pc uses a 24-inch monitor en the INTEL pc uses a big TV screen…could the problem be on the TV because it is much bigger than the monitor, although the same resolution is used?)

Unfortunately all without succes… I will keep on trying the suggestions everyone sends, but if someone has just a simple example than that would be very kind :slight_smile:

I just want the character to be running automatic without user input, while the visual speed on both pc’s is the same (even when I print the velocity speed, it shows the same on both pc’s…I can see it is faster on the INTEL pc because the floor the character runs over is going faster out of the screen).

BTW…sorry for the naming of AMD and INTEL pc… it is just for me to keep them seperated, could also have called them pc1 and pc2 :wink:

Yes, cause you deltatime would be some smaller value, so 1*0.01, as example, will give - 0.01 . Just raise up you speed variable! Like i dunno… 100 or 200 or even bigger.

@Alexander.L I just tried it again, see the screenshots below. I have set the speed float to 60 (so on my AMD pc it will be near 1, that is the default setting for add movement input to forward as far as I know), but still on the INTEL pc the visual speed of the character is going faster… but I can now also see that the scale value on both pc’s is different…how would I get those scale values the same with speed multiplying with deltatime?

Also tried with a print string on the output of speed*deltatime that will be set as scale value…i get different results…

AMD pc scale value:
AMDscale.png

INTEL pc scale value:
INTELscale.png

BTW, thank you all for replying, I really appreciate it! Something I’m doing totally wrong on this setup…sorry, I’m still trying to figuring it out and learn from it, so any help would be very kind :slight_smile:

Even when I cap the FPS on 30FPS (it shows on both pc’s it is running on 30FPS) with above settings there is still a difference in the ‘visual’ speed…however, the calculated traveled distance is the same on both pc’s when they run the same track…

I called this little game Run or Explode…but I guess the only one who is really going to explode is me :slight_smile:

May I ask why you are inputting speed * delta time into the scale value of the add movement input? Unless you’re doing something different, that is normally used to directly plug in a scalar axis value of -1 to 1. The reason being you can set a control in your project/engine settings -> input, such as MoveRight having two keys mapped to D and A, with D making MoveRight have an output axis value of 1.0 and A having an output of -1, none of the keys being pressed would output zero or both pressed output zero. The MoveRight mapped control would be plugged into the scale value of Add Movement Input, the result being it actually would let you move left or right. You can see this in action in the default setup sidescroller character blueprint or third person/first person character blueprint.

This can be seen and better described here which I recommend you read: Setting Up Character Movement | Unreal Engine Documentation

If you just want your character to constantly move in one direction such as in an endless runner, just set the scale value to be a literal float of 1.0.

I noticed you seem to be wanting to have it so the further the distance the player travels, the faster he runs, by looking at your block of if statements. Might I suggest a much cleaner approach would be to instead do a float map range unclamped or float map range clamped, such as seen here:


All you would have to do is call the set RunSpeed(after you’ve updated the distance traveled) which would cause it to update the RunSpeed dependent on the current distance traveled. Keep in mind these are just made up variable names as an example, you’d then plug RunSpeed into the Set Max Walk Speed of the character movement component.

@**Deathstick **I did put speed*deltatime into the scale value because someone adviced, but it gives on both pc’s a different value (on AMD pc below 1.1 and on the INTEL pc most of the time above 1.1). I ‘understand’ the normal scalar axis value, and if you put it lower than 1 it will slow down the movement… but even when I put the scalar value on ‘static’ 1 there is still a difference in the movement, on the AMD pc it shows the normal speed but on the INTEL pc it seems to go much faster (when I print out the scalar value or animation speed, or velocity speed it shows on both pc’s the same and correct values…only visually the character is running much faster on the INTEL pc)…

I thought to be smart and changed the Max Walk Speed based on the output of speed*deltatime…it seems to work, on the INTEL pc the character runs than slower (I changed the Max Speed to 800 instead of 1000 on the AMD pc…but then the movement when running left or right and jumping is reacting a little bit slower…)

I guess I remove the speed*deltatime to scale value and put the scale value for movement back on 1.

Thank you for the cleaner approach for changing the speed based on the traveled distance, for sure I’m going to use this :slight_smile:

Still hoping for a better solution for this problem…

I think I solved it…I connected my monitor from the AMD pc (on the INTEL pc I had connected a big TV screen), now the speed is ‘visually’ the same on the INTEL pc… So then I searched for TV settings and found out my Samsung TV has an option for Gaming so it creates lesser frames (I got the info from this website, sorry it is in Dutch: 5 tips om optimaal te gamen op je televisie - Coolblue - alles voor een glimlach). Does this sound right? I would never think of it…but hey, I’m still learning with Unreal Engine :slight_smile:

Anyway, thank you all for your solutions, I really learned a lot from it :slight_smile:

I’m curious to know if it was ***visually ***slower or ***actually ***slower :rolleyes: I’m assuming you were just eye-balling it and not actually running a distance test of sorts? :wink:

Tl: DR.
but your issue is not how much speed you are adding, your issue is how OFTEN you are adding.

Create a variable that adds up the totals of your speed*delta
create a counter that ++ on tick.

branch when the counter >30 (30 frames passed)
Print out a string with the total of the speed. Reset the counter.

If the 2 results match you can assume the same speed is being added to the input.

on a system with 60fps you add 60 times per second.
on a system with 30fps you ads 30 times per second.

Instead of equalizing via a different speed.
Add the same speed. Change how often you add it so both systems are forced to match.

Add the tick amount every frame. As soon as the added value is greater then .999 reset it to 0 and add your movement input node with your preset speed.