Issue with the Add force function while shared on browser

Hi ! I am finishing the balancing of my third game but I end up getting issues again.

This time it is my function that skips an event O.O In this case it sometimes skips the add force up or fails to add force. This only occurs when the game is shared. In the end it still call the sound even that is after it…

I have tried changing the flat value i give to the add force by a variable but it changes nothing. The best I had was that instead of skipping the add force event it would call it twice or such, causing the bee to jump twice higher.

Here is the function I wrote:

Hey let me know what you think and thanks in advance :stuck_out_tongue:

Hi @Potatobob666,

I don’t have the solution you’re hoping for, but I can offer to share my experience that handling mouse events can be tricky for an OS because it’s not always clear which process the event should be handed to. It sounds a lot like sometimes your game receives the mousedown event and sometimes not, probably depending on what else is running on the device and which processes are vying for focus.

A good way to experiment and gain insight is to use a different approach to detect the user input event, for example, use a button from the Interface & Text menu.

Another tip is to use Counter behaviours with display enabled to allow a bit of debugging. For an example see my demo in the ‘toggle sprite’ thread:

Hope this is helpful!


Hi @Potatobob666!
Try using the rectangle object instead of the button.

  1. Add a rectangle object
  2. Set its size to fit the screen
  3. Add it to the “User Interface” layer
  4. Arrange the object on the stage
  5. Set the opacity parameter to 0% when the scene starts.
  6. Use it instead mouse

That’s clever, @Ready! I think it will work best if the rectangle is at the highest Depth index, else there will be holes where there is no response to touch downs. I’ve noticed that the Event wizard seems to support setting the depth index (but I’ve never tried it yet), so this could be done at scene start, but I’ve never seen a way to manage it in the Inspector (another item for the feature wish list :wink: )


Hi @auntiel, thank you!:slightly_smiling_face: - Yes, it is already envisaged in the future, for the this moment as this is not relevant, since there is a layer “User Interface”, and it compensates for the location and yes, the second one has the option “Depth Index”, it perfectly copes with the location of the layers. When we realizited multilevel system, we include the this function for the Appearance Tab.


@Ready I will have to try the button solution soon enough but for now I have a different question. I had many suggestions that came to my mind to improve the game engine. Is there a forum dedicated to this, how should I proceed?


@Potatobob666 - This is excellent :slightly_smiling_face:, you can write a message right on the forum (You can send it with a personal message), we will necessarily read it.

1 Like

@Ready how about we use the “Uncategorized” section for posting feature requests?

There are already a couple of requests in that section. I also have a long list of suggestions and I think it will be helpful for forum members (and the Ready team) to have a discussion about features rather than keep them hidden in private messages (unless, of course, someone is shy or has a suggestion they don’t want to make public). @Potatobob666, I know I’m interested in your ideas; I imagine there’s overlap between our respective wish lists :wink:

1 Like

Hi guys the other day I will try to create a new section, special for the proposals, we have long wanted to add it.


@Ready, that would be fantastic! :+1:

I tried both of your suggestions here is the hell that happened !

1- I attempted to set a button to cover the screen and use it to trigger my “Add Force up” but somehow it would not trigger at all. I verified every settings making sure It was on the proper layer, tested with it as visible and but nothing would record the input so…

2- I Deleted the button object and created a rectangle instead, and the same thing occurred.
I ended up removing the rectangle as well to return to my old ways of doing it. But that wouldn’t trigger either…

Yes I had broke my function and I just realized it. I deleted the function to fix this and re-wrote it so now NOW the rectangle covering my screen works perfectly!

This being said, it is perfect in the game engine but wont detect half of the inputs once shared on the browser :frowning:

Here is my result:

I forgot to say that now the rectangle on the web version prevent me from tapping on the retry button even though they are quite afar from each other.

Any suggestions? I am a bit lost now :S

Thanks in advance!

So I gave an attempt at fixing the issue and remembered that UI sticks to camera so I removed everything from UI and changed it all to be on the scene or background layer , this includes the button covering the screen. It fixed some issues like my retry button (Yay for small victory!).

I found that there was a big inconsistency for recording taps and clicks and tough EUREKA!!! Lets make a OR statement so its either a click or a tap on the button that will trigger the jump.

Once again it failed although it almost worked. I think it records every clicks but sometimes the add force function is bigger then other, I think it is because the click and the tap are probably not detected at the same time in the engine… This might be a problem in the engine if its in unity its probably something like, one of them runs in the Update function while the other is on the Late update. So making it a or statement makes both call…

Only 1 fix left for this in my mind, add a AND statement to those to check if we tapped in the few last frame and make a counter counting down a few frames after each time this function is called…

I feel like I am at war with this project at this point. XD

Ill give some feedback when Ill implement that cooldown idea If I dare to do it tonight !

So this failed and I tough it was because of my condition chain that might have been too complex so instead of asking:
(1 and 2) or (3 and 4)

I made to functions!
Still get the same result, I cannot get the add force to have a fix impact “While shared on the browser”.

That’s it for tonight :frowning:

PS. At least now it records every inputs, I guess that is progress XD

Hi @Potatobob666,

Well first off, sweet game! :+1:

Next, I tried messing with it and can report that I absolutely can reproduce your results. Works perfectly in ReadyMaker on my mac, my windows 7 box, and my ipad but fails exactly as you describe in mac-chrome. The sound is played on every user event but the ‘add force’ fails on every 4th or so click, unless you click in rapid fire mode, in which case it appears that the bee goes up every time (or it’s an illusion due to the difficulty of matching rapid-fire mouse clicks with bee motion).

It makes no difference which mechanism is being used to detect input events. I set up a counter to display whether system/mouse or flybutton/touchdown fires, and tried disabling one or the other to force the handler. If both are enabled, then in the browser system/mouse takes precedence, but the result is the same if system/mouse is disabled and flybutton/touch receives the user event.

So browser behaviour once again causes us all huge headaches. It’s the same with trying to make javascript games. Not sure what to suggest. You could try modifying the actions in the system/mouse event to reduce the cooldown reset value. If you increase the force, then on the times when it does work, the bee will jump too high.

Here’s the version of your game I used for experimenting, in case it’s helpful.

1 Like