ASCII Quick Converter error?

Started by ManicMatt, Sat 15/12/2018 10:09:27

Previous topic - Next topic

ManicMatt

Hey,
I recently realised if I hold down the enter key while testing the game, the framerate stutters terribly. Upon looking for the cause, I realised in the ASCII quick converter, every number was unique EXCEPT for return and Ctrl+M. I haven't touched this, it's how it was to begin with in the (buggy) verb coin template.
By disabling the Ctrl+M line of code, the stutter is no longer a problem. But as I don't understand what the ASCII thing is, will that affect my game? Should I assign a new number to Ctrl+m?? Doesn't that save screenshots? I recall I couldn't get that to work in the first place..
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I have a second problem! In my custom save gui, in the text box. If I type a save name, when I hit Enter, nothing happens. I thought this was my tinkering, but it isn't. You can click the save button, but I think having Enter save it is essential.
Thanks!

Khris

Quote from: ManicMatt on Sat 15/12/2018 10:09:27If I type a save name, when I hit Enter, nothing happens.
Have you linked a function to the text box's OnActivate event?

ManicMatt

The what? Oh my, I did not know that existed! Thanks! Seeing as my save button acts the same as if you are pressing enter, I just copied the code over for that. :) Thanks!

Problem one of two solved!

Crimson Wizard

#3
Quote from: ManicMatt on Sat 15/12/2018 10:09:27
I recently realised if I hold down the enter key while testing the game, the framerate stutters terribly. Upon looking for the cause, I realised in the ASCII quick converter, every number was unique EXCEPT for return and Ctrl+M. I haven't touched this, it's how it was to begin with in the (buggy) verb coin template.
By disabling the Ctrl+M line of code, the stutter is no longer a problem. But as I don't understand what the ASCII thing is, will that affect my game? Should I assign a new number to Ctrl+m?? Doesn't that save screenshots? I recall I couldn't get that to work in the first place..

The keycodes are defined by engine or library it uses. I am not sure if these are really true ASCII codes for all of the key combinations, but maybe they are in which case they are also defined by the international standard. I don't know how verb coin uses these, but changing these codes in script won't make any sense and won't work correctly.

Screenshots are saved the way you scripted them. For example in default template they are saved by F12 iirc.


EDIT on a closer observation, this "ASCII Quick Converter" module is a very old thing that is no longer necessary in modern AGS, because today AGS defines all keys on its own using eKey*** constants.

ManicMatt

Me and Crimson have talked elsewhere, and we established that I had assigned Ctrl+m to print screenshot, which in ASCII is the same as pressing Enter, so my game was taking a ton of screenshots by holding down enter. Doh!

Khris

Quote from: ManicMatt on Mon 17/12/2018 13:54:17Seeing as my save button acts the same as if you are pressing enter, I just copied the code over for that.
It's not that important here, but in general one should never do that. There should rather be a single function that gets called by both event handlers.

ManicMatt


SMF spam blocked by CleanTalk