Question - Code virtual keys suddenly driving me crazy

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Maa2007, Dec 30, 2018.

  1. Maa2007

    Maa2007 Member

    Joined:
    Jul 15, 2018
    Posts:
    63
    oh my goooooood,

    so i'v been developing my game for 6 months now, and i had my virtual key working for the past 5 months or so
    today all of the sudden they are not responding well, they react to my press but in a buggy way, its like if im turning the object, it now turn 10X slower, and the sprites of the buttons only get highlighted for a moment then they are not highlights which they should

    and the annoying thing is that i did three different things before virtual keys broke bad so i don't know what maybe the cause,

    one thing is i updated IDE, other thing is i added a code to calculate time (hours, minutes, seconds) based on game maker builtin functions, third thing is i made a code to record Hero movements and store them in file and then play them back (for recording a reply)

    all those codes worked fine, but the virtual keys which i didn't come near them at all, is ruined for some reason

    and the crazy thing is that i have an old 100% working backup before all this mess, and now even the backup have its virtual keys ruined !!!!! what the f*** ?????

    note: im testing on an iphone 6 plus
     
  2. Gunner

    Gunner Member

    Joined:
    Mar 4, 2018
    Posts:
    52
    Maybe runtime updates messed your game. In that case you can always revert back to previous runtime versions in File -> Preferences -> Runtime Feeds -> Master, and try for yourself which version works for you and from there you can try tracing the changes noted on official Runtime Release Notes.
     
  3. Maa2007

    Maa2007 Member

    Joined:
    Jul 15, 2018
    Posts:
    63
    oh my god, what a Headache............................

    so i tried with my PC using v2.2.0.343
    i tested on an android phone, and the virtual keys worked fine,

    so the problem is in the IDE or Runtime ?,

    but now i want to install v2.2.0.343 on my imac, and it does not want to install it, i install the version and double click on it, the program restart it self, and when its loaded it still load the latest version
    so im locked, i cant install v2.2.0.343 on my imac,


    What to do NOw ????????????
     
    Last edited: Jan 1, 2019
  4. Maa2007

    Maa2007 Member

    Joined:
    Jul 15, 2018
    Posts:
    63
    this is really driving me crazy, i uninstalled my game maker, installed older runtime, older IDE, i even installed newst mono framework, and an old one, the problem still persist, i cant continue developing the game if virtual keys are not working
     
  5. Gunner

    Gunner Member

    Joined:
    Mar 4, 2018
    Posts:
    52
    Then the problem is with the runtime version, not the IDE. Basically runtime is what builds your game into what it is. IDE is just the editor.

    You have to find a way to get back to the last working runtime for a temporary solution, that seems to be the only option, or redo your code.
     
  6. Robert Andrews

    Robert Andrews Member

    Joined:
    Jan 6, 2019
    Posts:
    2
    Hey there,

    I'm having a similar problem with virtual keys when i build to iOS.

    They show up when I draw them with virtual_key_show(), but they dont respond to any input. Did you find any fix to this problem?
    Weirdly enough they work when i Build to OSX, wich I think they shouldn't!? I add the keys in the create event of my player object. That is the event to do it, right? The Documentation states:

    "This means that you don't need to worry about the use of views or the relative room coordinates, and can simply draw your key sprites and define your virtual keys in the Draw GUI Event of an object."

    But defining the key in the Draw GUI Event doesn't seem right.
     
  7. Maa2007

    Maa2007 Member

    Joined:
    Jul 15, 2018
    Posts:
    63
    its still not working for me, and that is only on iphone, it works on android, windows, osx...

    and yes the way virtual keys work is you define them in create event, then you draw the buttons sprites on the GUI Layer, this way if you change your camera zooming or dimensions, the buttons sprites sizes and positions are not effected

    but be sure to fix the GUI layer size by using this code in create event, (here i set GUI layer size to 1920x1080 px),
    display_set_gui_size(1920, 1080);

    if you don't set it your self, it might be set automatically, which gives different results on different phones
     
    Last edited: Jan 7, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice