Melee in 120 fps?

Kadano

Magical Express
Moderator
Premium
Joined
Feb 26, 2009
Messages
2,161
Location
Vienna, Austria
#1
Melee in 60 fps is smooth … kind of. Anyone who has a 120hz+ monitor knows that 60 fps are nowhere near the maximum framerate our eyes perceive as perfectly smooth, natural motion. To be truly indistinguishable from natural motion, it would probably require something like 10khz or even more. So if we can approach this distant figure in some way, we should go for it imho.

Has anyone here looked into how Melee handles speed-ups and speed-downs? Could we tell the game to calculate frames twice as often per second when we emulate it in Dolphin to achieve 120 fps?

This would change the gameplay. It would make it easier to edgeguard spacies because the warping effect of their side-Bs wouldn’t be as severe and for characters like Marth, it would be easier to sweetspot them.
 
Last edited:

SuperUltraDX

Smash Rookie
Joined
Mar 30, 2014
Messages
22
#3
Are there even animation frames available for 120fps? I doubt the engine would just interpolate animations. If it were possible to play at 120fps, then maybe the camera and background stuff would go at 120fps, but animations frames would play twice in a row, making players appear at 60fps. Honestly, I highly doubt 120fps is possible without turning it into lightning melee.
 
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#4
Are there even animation frames available for 120fps? I doubt the engine would just interpolate animations. If it were possible to play at 120fps, then maybe the camera and background stuff would go at 120fps, but animations frames would play twice in a row, making players appear at 60fps. Honestly, I highly doubt 120fps is possible without turning it into lightning melee.
You mean Slow-mo Melee. Slow-mo slows down the game so you can turn it up again.
 

SuperUltraDX

Smash Rookie
Joined
Mar 30, 2014
Messages
22
#5
You mean Slow-mo Melee. Slow-mo slows down the game so you can turn it up again.
I'm not sure what you mean. If I disable the frame limit in Dolphin, I hit 200+ fps on most stages, around 140 on FoD. The emulation is simulated as quickly as my hardware allows, which makes it play like an extreme lightning melee. I don't see how processing more frames per second would slow down the gameplay.
 
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#6
I'm not sure what you mean. If I disable the frame limit in Dolphin, I hit 200+ fps on most stages, around 140 on FoD. The emulation is simulated as quickly as my hardware allows, which makes it play like an extreme lightning melee. I don't see how processing more frames per second would slow down the gameplay.
If you want to increase the FPS without changing game speed, you'd have to decrease the internal game speed (how fast Melee does things).
 

SuperUltraDX

Smash Rookie
Joined
Mar 30, 2014
Messages
22
#7
Ah that's what you meant. Do you think IE's code can do that? That'd be really cool. What would you do about the "missing animation frames" I mentioned?
 
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#8
Ah that's what you meant. Do you think IE's code can do that? That'd be really cool. What would you do about the "missing animation frames" I mentioned?
If I reverse-engineered it, sure. Just gotta find out exactly what it does first, then fix it so it goes half instead of double.
I think the frames would also be double, so you'd have 120 FPS animations, but I'm not entirely sure on that.

30 fps mode [internetexplorer]
04432A2C 0005265C

is the original code by the way.

~e
Haven't tested yet, but try this:

120 fps mode [internetexplorer, doqtor kirby]
04432A2C 00149970

~e2
Matter of fact, I can output codes for all desired framerates.
90 fps mode [internetexplorer, doqtor kirby]
04432A2C 000F72F0

75 fps mode [internetexplorer, doqtor kirby]
04432A2C 000C8D63

60 fps mode [internetexplorer, doqtor kirby] (not like it already is :p )
04432A2C 000A4CA0

15 fps mode [internetexplorer, doqtor kirby]
04432A2C 000240C3

1 fps mode [internetexplorer, doqtor kirby] (lolz)
04432A2C 00001B77
 
Last edited:

SuperUltraDX

Smash Rookie
Joined
Mar 30, 2014
Messages
22
#9
Well how about that, it worked! Only problem was that the music was sped up with the frame rate... and I don't have a 120fps monitor to fully appreciate it :p
 

Goatlink

Smash Apprentice
Joined
Jul 14, 2013
Messages
141
Location
Portland, OR
#11
hey, so Ive been messing around with the wireframes attributes, and just had this idea. I made the wireframes jumpsquat last for 13 frames instead of the default 7 frames. The result was what I expected, a slowed down animation lasting 13 frames instead of 7, but thats the interesting part, the game generated the extra animation frames of the jumnpsquat all on its own, each animation frame of the new 13 frame jumpsquat is unique. The game interpolates the animations on its own when you change the attribute variables to be larger than normal. So with that important information, heres my idea: we find EVERY variable in the game that says how long an animation lasts or how fast something moves and double (or half in some cases?) that variable, then we double the speed of the game and the result would be normal looking, 120 fps characters and combat, with the backgrounds such as FD and battlefield running at 2x speed. Now this assumes that every type of animation is actually interpolated the same way as the jumpsquat example, we would have to find a way of doubling hitlag and velocity and some other crazy variables, like the speed of projectiles, and the sprite based graphics like electric effect and fire effect, Im not sure how those would turn out. Anyway, thats my two cents.
 
Last edited:
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#13
The game interpolates the animations on its own when you change the attribute variables to be larger than normal.
Of course. Development would have taken decades if the original Developers had to make every frame in an animation. Melee (like brawl) simply uses keyframes and the games does the rest.
 

Kadano

Magical Express
Moderator
Premium
Joined
Feb 26, 2009
Messages
2,161
Location
Vienna, Austria
#15
@ DoctorKirby DoctorKirby thanks for making these codes! Unfortunately, all the 120fps one does seems to be repeat every frame once. The instructions “process a new frame every 1/120 second”¹ and "read all frame timing values as 2x" are missing, and I still wonder whether it’s feasible to write such a code.

¹Maybe this is what your code does and there just isn’t any new data to process, so it re-calculates the last frame? Not sure.
 
Last edited:
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#16
@ DoctorKirby DoctorKirby thanks for making these codes! Unfortunately, all the 120fps one does seems to be repeat every frame once. The instructions “process a new frame every 1/120 second”¹ and "read all frame timing values as 2x" are missing, and I still wonder whether it’s feasible to write such a code.

¹Maybe this is what your code does and there just isn’t any new data to process, so it re-calculates the last frame? Not sure.
1- I didn't write the original code, IE did. I just modified it for n frame gameplay.
2- Possibly, but as of right now it's out of my domain or coding.
 

DeeDoubleU

Smash Journeyman
Joined
Jan 9, 2005
Messages
407
#17
A quick explanation for why changing internal speed doesn't cause problem with 'missing animation frames':

For a long time now... like since the mid to late 90's, animation in 3D games has been done by means of skeletal animation which deforms the mesh (the 3D model) in realtime. There are very few existing 'frames' that you see when a model animates, instead the animation has what are known as 'key frames' which are spaced out by time rather than by a frame count and though a complex bit of math, the individual pieces of the skeleton are transformed between the key frames based on a percentage of what time they are between them.

This is why SSB was able to apply complex speed modifiers in the first place by the by.
 

Itaru

Smash Journeyman
Joined
Jun 25, 2014
Messages
270
Location
日本
#18
If I do TAS in 120fps
What happens at time of the hitstop.

Sorry,but I'm Japanese. So my English is not good...
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
#21
If I reverse-engineered it, sure. Just gotta find out exactly what it does first, then fix it so it goes half instead of double.
I think the frames would also be double, so you'd have 120 FPS animations, but I'm not entirely sure on that.

30 fps mode [internetexplorer]
04432A2C 0005265C

is the original code by the way.

~e
Haven't tested yet, but try this:

120 fps mode [internetexplorer, doqtor kirby]
04432A2C 00149970

~e2
Matter of fact, I can output codes for all desired framerates.
90 fps mode [internetexplorer, doqtor kirby]
04432A2C 000F72F0

75 fps mode [internetexplorer, doqtor kirby]
04432A2C 000C8D63

60 fps mode [internetexplorer, doqtor kirby] (not like it already is :p )
04432A2C 000A4CA0

15 fps mode [internetexplorer, doqtor kirby]
04432A2C 000240C3

1 fps mode [internetexplorer, doqtor kirby] (lolz)
04432A2C 00001B77
Is there some kind of formula that I can use to find the codes for whatever framelimit I want? (ex. 50fps or 10fps) I tried converting the right half of each code to dec, and I noticed that it was really linear, but I could not find a function that could fit all the points.
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
#23
So, if I wanted my game in 90fps, wouldn't I have to multiply 1B77 by 5A, instead of 90, because 90 in hex is actually 144 in dec. Wouldn't multiplying by 90 give me a 144fps game?

Or are you supposed to multiply by 2BF1, which would give you F72F0 when multiplied by 5A?
 
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#24
So, if I wanted my game in 90fps, wouldn't I have to multiply 1B77 by 5A, instead of 90, because 90 in hex is actually 144 in dec. Wouldn't multiplying by 90 give me a 144fps game?

Or are you supposed to multiply by 2BF1, which would give you F72F0 when multiplied by 5A?
1B77 is 1 FPS. You would multiply by the decimal form. Odd, but it works.

Alternately just use the 90 FPS code:
90 fps mode [internetexplorer, doqtor kirby]
04432A2C 000F72F0
 
Last edited:

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
#25
Okay thanks, I was just confirming that you were suppoed to multiply a hex number by a decimal number.

Just ignore what I was saying about 2BF1, I realized that it doesn't make any sense.
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
#26
IE and I were using this code in development of (the now defunct) ssbmo. It is simply altering the game speed value normally exposed in training mode/special melee. This was intended to be a code to let lower end machines emulate melee more easily using 30fps or 45fps as full speed to lessen the CPU requirement to emulate the game.

All of the game's logic is actually based around spitting out 60fps. So when you are running in "120fps mode" you are actually running the game at half speed and rendering each frame twice, and when you are running in "30 fps mode" you are running the game twice as fast and rendering at half speed.

Melee was not designed or programmed to run at a variable framerate, so game speed is actually linked to frame processing speed. That's why gameplay slows down instead of just dropping frames when you overburden the game by spawning 3 gigabowsers on FoD.

There's no good way to get the game to run at a variable framerate, and it would be a very complicated thing to add in even if you had access to the original source.
 
Last edited:

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
1,993
Location
Sacramento, CA
#28
All of the game's logic is actually based around spitting out 60fps. So when you are running in "120fps mode" you are actually running the game at half speed and rendering each frame twice, and when you are running in "30 fps mode" you are running the game twice as fast and rendering at half speed.
You mean it's running at normal speed (60 fps), but each frame is displayed twice?
 

Massive

Smash Champion
Joined
Aug 11, 2006
Messages
2,833
Location
Kansas City, MO
#29
You mean it's running at normal speed (60 fps), but each frame is displayed twice?
This sort of feels like splitting hairs, but no.

The game always assumes it's rendering 60 frames per second.
The game is rendering 120 frames per second (twice as fast as normal).
The AR code tells the game to play at half speed.
All game logic is now running twice as fast as normal, but it's only updating every 2 frames (appears to be normal speed).

The big difference here is that the AR code only effects gameplay and the menus are still locked to framerate (everything will zoom really fast).

You can actually screw around with the core timing constants in dolphin core and speed up/slow down games like this (this has been known for a while, it was actually an early hack to fix wind waker). While it will let you run games at lower or higher framerates than they were designed to be, it won't let game logic occur more frequently than it normally would (since it's not detaching the game's framerate from its timing).
 
Last edited:

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
1,993
Location
Sacramento, CA
#30
This sort of feels like splitting hairs, but no.

The game always assumes it's rendering 60 frames per second.
The game is rendering 120 frames per second (twice as fast as normal).
The AR code tells the game to play at half speed.
All game logic is now running twice as fast as normal, but it's only updating every 2 frames (appears to be normal speed).

The big difference here is that the AR code only effects gameplay and the menus are still locked to framerate (everything will zoom really fast).
Ohhh. OK, I understand now. Sorry, I didn't even properly explain my confusion at first. Obviously the end result is 120 frames in one second, so I shouldn't have said fps.

So Dolphin is what does the 120 frame speedup, and the code just halves the execution rate of the game somehow. Makes sense.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,054
#31
If I reverse-engineered it, sure. Just gotta find out exactly what it does first, then fix it so it goes half instead of double.
I think the frames would also be double, so you'd have 120 FPS animations, but I'm not entirely sure on that.

30 fps mode [internetexplorer]
04432A2C 0005265C

is the original code by the way.

~e
Haven't tested yet, but try this:

120 fps mode [internetexplorer, doqtor kirby]
04432A2C 00149970

~e2
Matter of fact, I can output codes for all desired framerates.
90 fps mode [internetexplorer, doqtor kirby]
04432A2C 000F72F0

75 fps mode [internetexplorer, doqtor kirby]
04432A2C 000C8D63

60 fps mode [internetexplorer, doqtor kirby] (not like it already is :p )
04432A2C 000A4CA0

15 fps mode [internetexplorer, doqtor kirby]
04432A2C 000240C3

1 fps mode [internetexplorer, doqtor kirby] (lolz)
04432A2C 00001B77
Im not quite sure how the numbers are achieved but I was playing a bit with this code and I noticed that for for 15fps its off by a bit. It should be 04432a2c 0002932e. The one you posted is about 13fps.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
1,993
Location
Sacramento, CA
#35
Btw, NTSC isn't actually exactly 60 fps; it's ~59.94 fps. You can get the exact value for your calculations by 60 / 1.001.
 

Jon Nathan

Smash Apprentice
Joined
May 6, 2013
Messages
129
Location
New York
#36
I tried this code and it works! The only problem is the music, which plays at 2x speed (and it's not high-pitched when you use OpenAL in dolphin).
Has anyone found a way to slow down the music playback in recent Dolphin builds?
 
Joined
Dec 28, 2012
Messages
1,030
Location
South Pole, Amundsen-Scott Station, Antarctica
#37
I tried this code and it works! The only problem is the music, which plays at 2x speed (and it's not high-pitched when you use OpenAL in dolphin).
Has anyone found a way to slow down the music playback in recent Dolphin builds?
Nope. Dolphin Developers rebuilt the audio engine in 3.5 so it's not effective to newer builds.

Use Dolphin 3.0
 

Jon Nathan

Smash Apprentice
Joined
May 6, 2013
Messages
129
Location
New York
#39
Nope. Dolphin Developers rebuilt the audio engine in 3.5 so it's not effective to newer builds.
Use Dolphin 3.0
Confirmed working!!!

If anyone wonders how to do it, here's my brief guide:

1- Download and install Dolphin 3.0
2- Config > General > Framelimit: Set to 120 and check "Limit by FPS"
3- Go to the Audio tab and uncheck "Enable Audio Throtle"
4- Add this Gecko code to the game:
120 fps mode [internetexplorer, doqtor kirby]
04432A2C 00149970
5- Unless you have a monster pc, lower graphics. (I had to play at 1x native with some frame drops to get 120fps, while I can run the game at 1080p with antialiasing at full 120fps on new dolphin builds)

If anyone knows how to fix sound speed in newer Dolphin builds for 120fps, please let me know!:bluejump:

EDIT: Just tested it on PM 3.6 Full netplay and music also plays at normal speed.

IMPORTANT: C-sticks don't work properly since, as I've read, they seem to register 60 times per second, so half the c inputs won't register. Any ideas how to fix this? I tested this only on newer Dolphin builds, since 3.0 doesn't seem to read my GCc c stick
 
Last edited:
Top