R
Ratatosque
Guest
So recently i tried to implement alternative input devices besides my usual keyboard/mouse controls.
One of the issues was a huge fps-drop (1200 fps to 18 fps) due to a bug or peculiarity with the joystick functions. I talked with some people in another thread about this.
Now another thing that occurred is the following.
Since i used the events for mouse and keyboard for the input before, i now had to check for the input in the step event, as there is no seperate event for gamepad input in gamemakers UI.
For example:
Now instead of the mouse-enter event to make my buttons glow i have to use this in the step event of the parent for all buttons:
( they all glow when hovered over )
For the click to for example start the game i check in the step event like this:
This is in the start button, which is a child of the obj_parent_Button
the issue is, it seems that with this method i still get an fps drop from around 1200 fps to around 120 fps. Is this normal? May there be another reason for this issue other than the input check? Is there a more effective way to implement multiple input devices and to check them without loosing huge chunks of performance?
Much thanks in advance!
One of the issues was a huge fps-drop (1200 fps to 18 fps) due to a bug or peculiarity with the joystick functions. I talked with some people in another thread about this.
Now another thing that occurred is the following.
Since i used the events for mouse and keyboard for the input before, i now had to check for the input in the step event, as there is no seperate event for gamepad input in gamemakers UI.
For example:
Now instead of the mouse-enter event to make my buttons glow i have to use this in the step event of the parent for all buttons:
( they all glow when hovered over )
Code:
if position_meeting(mouse_x,mouse_y,id)
{
glow=true;
image_index=1;
}else
{
glow=false;
image_index=0;
}
For the click to for example start the game i check in the step event like this:
This is in the start button, which is a child of the obj_parent_Button
Code:
event_inherited()
if position_meeting(mouse_x,mouse_y,id) && mouse_check_button_pressed(mb_left)
{
scr_button_start_game()
}
the issue is, it seems that with this method i still get an fps drop from around 1200 fps to around 120 fps. Is this normal? May there be another reason for this issue other than the input check? Is there a more effective way to implement multiple input devices and to check them without loosing huge chunks of performance?
Much thanks in advance!