Jibble

Author Topic: ASCII Quick Converter error?  (Read 399 times)

ASCII Quick Converter error?
« on: 15 Dec 2018, 10:09 »
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!
« Last Edit: 15 Dec 2018, 11:07 by ManicMatt »

Khris

  • having to deal with what games are going through
    • Lifetime Achievement Award Winner
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • Khris worked on a game that was nominated for an AGS Award!
Re: ASCII Quick Converter error?
« Reply #1 on: 16 Dec 2018, 23:01 »
If I type a save name, when I hit Enter, nothing happens.
Have you linked a function to the text box's OnActivate event?

Re: ASCII Quick Converter error?
« Reply #2 on: 17 Dec 2018, 13:54 »
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!

Re: ASCII Quick Converter error?
« Reply #3 on: 17 Dec 2018, 14:13 »
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.
« Last Edit: 17 Dec 2018, 14:24 by Crimson Wizard »

Re: ASCII Quick Converter error?
« Reply #4 on: 17 Dec 2018, 14:38 »
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

  • having to deal with what games are going through
    • Lifetime Achievement Award Winner
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • Khris worked on a game that was nominated for an AGS Award!
Re: ASCII Quick Converter error?
« Reply #5 on: 17 Dec 2018, 16:33 »
Seeing 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.

Re: ASCII Quick Converter error?
« Reply #6 on: 20 Dec 2018, 20:21 »
Gotcha!