WAIT in Parallel Event - Needed in this instance?

My Sudoku puzzle is run by a main Parallel Event that allows the player to click on the squares using the ButtonPicture plugin. So far, I haven’t put a WAIT command in the Event. I was thinking of setting it at 10 frames, but I am concerned that any WAIT might randomly cause a player click to not be registered. Especially since they are clicking a lot to complete the puzzle.

Any thoughts on how long of a WAIT might be safe to avoid missed clicks?

Also, since this is just a Sudoku puzzle with only Events running to support that, do you think having the main Parallel Event running without a WAIT would be ok and not cause any real problems?

The game will only be 1 map with a handful of Events on the map and maybe a couple of Parallel Events running at any given time. Lots of Show Picture though.

Thanks for your thoughts!
Maybe I'm missing something...I thought ButtonPicture triggers a common event when clicking a picture? In that case, the plugin handles input checks, so what is the purpose of the Parallel event?
OK, first you need to know how the wait command really works:

A wait tells the game interpreter "stop processing this event for x cycles of the game loop".
In a regular event that results in a pause, in a looping event (parallel or autorun) that reduces the number of times the event is run per second.

How many waits to use depends completely on the event, and you always have to experiment to find the correct number - and in some cases that number even changes if more parallels are added.

As an example let's take an event that places an arrow above the player.
you don't need that event to run sixty times per second because there is no way the player can move that fast.
On the other hand if you check only a few times per second the arror will lag behind when the player is moving, because the wait also causes a delay to the change.

In those cases I would usually start with a wait(5) or wait(10) and then go up or down to get the highest number where I can't detect any delay in placing the arrow.
@caethyril The parallel Event is constantly updating the puzzle squares. So the player clicks and a Common Event is called and a square gets updated. So the main Parallel Event is constantly waiting for clicks and updating the squares appropriately.

Thanks, @Andar . I generally understand what the WAIT command is doing and I don’t mind experimenting. I am just concerned that I might not see any lag or problems in my testing, but someone else with a different system might.

I haven’t used any WAIT in the Event so far and I haven’t noticed any problems in testing. But I will also have to see what happens when everything is completed and running together.

Thanks for the thoughts!
you simply can't guess the right number, it is always experimenting.

if you have a top system and are concerned about running on lower computers, then you might be able to do the testing on a virtual maching.
It will cost you a bit of HDD space, but basically install a virtual machine, set it to lower specs and install windows on it. then test on that simulated computer.
@caethyril The parallel Event is constantly updating the puzzle squares. So the player clicks and a Common Event is called and a square gets updated. So the main Parallel Event is constantly waiting for clicks and updating the squares appropriately.
I'm confused, too. This sounds like the entire purpose of the ButtonPicture plugin, to update the squares (and/or do whatever) when they're clicked on.

I don't understand why you would be both using that plugin and using a separate parallel process to poll for mouse clicks.

To answer your question generally, polling for input (whether keyboard or mouse) is one of the times that you do not want any wait on a parallel event.

But it really doesn't sound like this is set up quite correctly.
Be prepared for a good, belly jiggling laugh.

@caethyril & @ATT_Turan Well, after just testing it, I apparently...somehow...got the mistaken impression that the ButtonPicture plugin needed a running Parallel Event to constantly check and wait for something to be clicked on. I thought that if you moved away from that Event page, the images would no longer be clickable.

I have no idea why I thought that, except maybe I originally tried it as a Parallel Event and it worked so that is what I stuck with.

I just tested it and...sure enough...once my event placed the Show Picture and ButtonPicture Event Commands...and I changed Event pages...the images where still clickable and did what they were supposed to do.

Well, URGH...ARGH...ZOMBIE CRAP!

That is great to know, but now I have to go back and reexamine all my Event designs. And there are a lot of them. This will definitely help me going forward, but fixing everything will be...fun...yeah...fun.

In the immortal words of Shnitzel from Chowder...

RADDA RADDA RADDA!

Radda.jpg

Zombie is taking a timeout now before he starts undead cursing at his own lack of understanding.

EDIT: I will leave this here for a bit to see if anyone wants to make funny comments at Zombie's expense and then I will ask that the thread be closed. What was Zombie thinking?
I believe the plugin is already set in terms of checking for player input/update so no need for parallel event as stated.

For a different reference, TouchInput.isTriggered() is at most a 1 frame wait or none if you want some sort of accuracy. However, TouchInput.isPressed() checks if the button is held down, in which case I would use wait 6 frames or more. Since each player's response and click times are different, you just have to be ready for that or set up something else.

Edit:
Obligatory make-fun-of-comment-but-also-not-funny (to be run in parallel with other comments):

Yo fam, heard you like parallel events so here's a parallel event triggered by a parallel event that is running an event listener that is updated every frame in parallel and already checking for player input parallel-ly.
Thanks @bass2yang . That info is very helpful.

The sad/scary thing is that I have been using the ButtonPicture plugin…a lot. For way over a year. And every time I thought I needed to use a parallel event.

A new door to an entire new universe of possibilities has suddenly opened!
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/wait-in-parallel-event-needed-in-this-instance.166826/