Strange key combination that's not in debugging key list...

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Strange key combination that's not in debugging key list...

Post by sheamkennedy »

I was just testing my game (on Mac) and happened to hold down Shift + Tab at the same time. My game almost doubled in framerate in an instant. I looked in the debugging key list online and did not see this key combination there. In my game I do have tab used as the "shoot" button... perhaps this has something to do with it. Either way it was a very strange discovery.

On a related note my game is way more fast-paced and awesome at the fastest framerate. Is there anyway to default my game to the faster framerate?
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Huh. I did not know about shift+Tab debug keys myself.

When I want to mess with frame-rate I always use CTRL ALT + and CTRL ALT -

We do want to eventually allow changing the default frame-rate. I think the main reason we have not done so yet is because we wanted to add options to scale the built-in animations to compensate for changes in frame-rate... but maybe it is not important to have that feature ready first.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Bob the Hamster wrote:Huh. I did not know about shift+Tab debug keys myself.

When I want to mess with frame-rate I always use CTRL ALT + and CTRL ALT -

We do want to eventually allow changing the default frame-rate. I think the main reason we have not done so yet is because we wanted to add options to scale the built-in animations to compensate for changes in frame-rate... but maybe it is not important to have that feature ready first.
Cool. That frame-rate option would be awesome!
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Framerate is a limiting factor in any time-sensitive game (that is, basically anything that's not an RPG or similarly menu-driven). It's a feature long past due, if you ask me.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

opps! We forgot to update the debug keys documentation; fixed now.
Bob the Hamster wrote:Huh. I did not know about shift+Tab debug keys myself.

When I want to mess with frame-rate I always use CTRL ALT + and CTRL ALT -
Firstly James, I discussed the shift+tab debug key with you recently. Secondly, I vaguely remember that the speedcontrol debug keys were once Ctrl Alt +/- rather than Ctrl +/-, it but hasn't been that way since at least 2005.

I've been thinking very recently about this, and had the idea of having two settings: the 'normal' frame rate, and a frame rate modifier. Changing the frame rate would adjust the number of frames animations in everything properly. Adjusting the framerate modifier would be the same as what the debug keys currently do. I'm wondering whether the modifier should also cause the play time counter, "milliseconds" command, and sound effects to run/faster slower.

I agree that adjustable framerate is horribly overdue, so wanted to implement the frame rate modifier as a script command. It's trivial to implement (key repeat rate is already frame-rate-independent), and good enough for anyone not using normal hero and npc movement. (You can use scripts to adjust the rate modifier on entering and leaving battle, so could still use the battle system). Then we can add a real adjustable frame rate when we've worked out all the animation details. I think that if we enable a higher framerate before it's ready then it should be a different option.

Also, I seriously want to add an option to cause the screen to be repainted more frequently than the 'tick rate'. I find 18 fps really jarring when walkign around a map in a fullscreen game. Doing this is likely cause bad visual effects in games which use scripts to around things on-screen (think platformers and parallax layers). So I wanted to make it an option that you can enable in your game even if it's too much work to rewrite all your scripts for a different tick rate, and an option that players can try setting themselves when playing games.
Last edited by TMC on Thu Feb 19, 2015 2:04 am, edited 1 time in total.
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

^^

This.

Please.
Sent from my iPhone
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

@TMC: Sounds awesome! I think some plotscript commands for changing the framerate at any given point in the game could be great too. Even the option to lower the framerate would be neat in some cases.

Also if framerate effects SFX then I see lot's of other potential... like making a glitchy software synthesizer program...
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

TMC wrote:Firstly James, I discussed the shift+tab debug key with you recently. Secondly, I vaguely remember that the speedcontrol debug keys were once Ctrl Alt +/- rather than Ctrl +/-, it but hasn't been that way since at least 2005.
I believe you, but my memory is completely blank on the Shift+Tab subject. :)

And I stand corrected on the CTRL ALT +/- I must have just been doing ALT out of force of habit
TMC wrote: I've been thinking very recently about this, and had the idea of having two settings: the 'normal' frame rate, and a frame rate modifier. Changing the frame rate would adjust the number of frames animations in everything properly. Adjusting the framerate modifier would be the same as what the debug keys currently do. I'm wondering whether the modifier should also cause the play time counter, "milliseconds" command, and sound effects to run/faster slower.
That is pretty cool! And we could implement the modifier right away without waiting for the normal frame rate feature to be fully implemented

I am inclined against the modifier altering the milliseconds command, although I see no problem with a separate modifer for that.

Also, adjusting sound effect speed sounds like something that would require a pretty big music_* backend overhaul
TMC wrote: I agree that adjustable framerate is horribly overdue, so wanted to implement the frame rate modifier as a script command. It's trivial to implement (key repeat rate is already frame-rate-independent), and good enough for anyone not using normal hero and npc movement. (You can use scripts to adjust the rate modifier on entering and leaving battle, so could still use the battle system). Then we can add a real adjustable frame rate when we've worked out all the animation details. I think that if we enable a higher framerate before it's ready then it should be a different option.
Sounds like a good plan to me :)
TMC wrote: Also, I seriously want to add an option to cause the screen to be repainted more frequently than the 'tick rate'. I find 18 fps really jarring when walkign around a map in a fullscreen game. Doing this is likely cause bad visual effects in games which use scripts to around things on-screen (think platformers and parallax layers). So I wanted to make it an option that you can enable in your game even if it's too much work to rewrite all your scripts for a different tick rate, and an option that players can try setting themselves when playing games.
That mostly went over my head, but I am sleepy, so that is my excuse. Sounds fine to me anyway :)
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

I'm really excited to hear that framerate is looking at being improved. IMO, it's the only thing in the engine as far as end results go that make it subpar at this time; "retro" pixel art is so in vogue these days that well made OHRRPGCE graphics are downright luxurious compared to a lot of hip indie games coming out.

Only thing is the choppy scrolling. I even think that getting a well made full game passed on Greenlight would be feasible if the scrolling were improved.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Foxley wrote:Only thing is the choppy scrolling. I even think that getting a well made full game passed on Greenlight would be feasible if the scrolling were improved.
Speaking of which, I heard that JSH's Motrya just passed Steam Greenlight :)

I really hope he is able to get the motivation and sprite-art-help he needs to finish the last two chapters
Last edited by Bob the Hamster on Thu Feb 19, 2015 1:58 pm, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Cool, I see that happened very recently.

What do you mean by scrolling? The scrolling of the map as you walk around, meaning the framerate?

I thought some more, and realised that we can actually just add a framerate option now without changing anything else. A script command to set a framerate modifier would still be useful I think (which is why I proposed it).

The reasoning:
Firstly, an option to set the framerate doesn't need to affect battles at first; that can be added once battles are updated to handle it.
This means that the following things need to be handled:
-tile animations
-walk animations
-npc/hero walk speeds
(We don't need to worry about slice movement, dissolving, or camera pans, as those are all scripted so you're responsible to pick the number of ticks yourself.)

The idea was to automatically scale the lengths of all these pauses when you change the framerate, but that's not absolutely necessary if we just print a warning for now.

Finally, the walk animation and the available walk speeds are unsuitable for higher frame rates, but again we can just print a warning that it's an experimental feature which you should avoid if you're making an RPG.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

@TMC: Nice! Will this happen soon? I think it would be great for what I'm doing now. I suppose I'd have to do some testing to make sure errors don't occur with my current setup too.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

It's in. I'd be interested in hearing from people using it. For example do you wish that "wait(x)" was denominated in 18ths of a second rather than frames? Probably we should just let people do a mass-replace of 'wait(' with 'wait18(' or whatever in their scripts, however waitms(milliseconds) and/or waitsec(seconds) commands would probably be nice to have.
User avatar
Matokage
Slime Knight
Posts: 275
Joined: Sat May 26, 2012 11:48 pm
Contact:

Post by Matokage »

TMC wrote:waitms(milliseconds) and/or waitsec(seconds) commands would probably be nice to have.
That would be perfect for music and sound timing.
Last edited by Matokage on Sat Feb 21, 2015 4:12 pm, edited 1 time in total.
"I can't buy food with glory"
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Actually it wouldn't be perfect. If you want to do accurate timing, then a sequence of such commands could still diverge because the errors add up; what you want is a "wait until(time)" command.

But all such commands are easy to implement using the existing "milliseconds" command.

Code: Select all

script, wait until, ms, begin
  while&#40;milliseconds < ms&#41; do &#40;wait&#41;
end

script, example, begin
  variable&#40;start&#41;
  start &#58;= milliseconds
  # do something
  wait until &#40;start + 1000&#41;  # 1 second
  # do something
  wait until &#40;start + 2600&#41;  # 1.6 seconds
end
Post Reply