- This topic has 8 replies, 2 voices, and was last updated 6 years, 5 months ago by vincent.
-
AuthorPosts
-
2018-07-11 at 1:51 pm #5641vincentCustomer
Hello Mikhail Luzyanin,
I would like to have a special mode with the Puzzle. If I have 18 steps, how to start at 1,2,3… from puzzle step number 1,2,3…
It’s so boring to begin at the first step each time.2018-07-11 at 2:04 pm #5642Mikhail LuzyaninStaffIf I have 18 steps, how to start at 1,2,3… from puzzle step number 1,2,3…
It’s so boring to begin at the first step each time.You mean you have a specific setup of the puzzles that has multiple layers and you don’t want to recreate the same first steps each time? If that what you mean you can add typical puzzles setup to your library and reuse them multiple times.
Co-founder and lead graphics specialist at Soft8Soft.
2018-07-11 at 2:25 pm #5644vincentCustomerNo. My scene is divided into steps, for each of which objects are being hidden and/or shown. I would like to get to a specific step when the scene starts up. Kind of like a developer mode, in which I could choose which step will be the starting one, without going through all the steps that precede it.
Do you see what I mean?2018-07-11 at 2:42 pm #5645Mikhail LuzyaninStaffDo you see what I mean?
Nor exactly, becuse I didn’t exactly understand how the steps are created, from which they conist and what do, what kind of information you want to reset in each step and so on. Can you share your project files and also will be helpfull if you discribe step by step what kind of behavior do you want after start the application.
Co-founder and lead graphics specialist at Soft8Soft.
2018-07-11 at 3:18 pm #5646vincentCustomerOkay. There are two things running in parallel in the puzzle. The first “thread” calls different procedures after specific delays in order to automatically starts my animations. It’s basically a succession of “after x seconds do” blocks.
Every procedure has to check a “click” variable that counts the number of time the user clicked to this point, so that the right animation can be chosen.
Another thread handles some popup windows that I’ve added as helpers for the user. These popups are just “div” elements that are shown or hidden on click events.
When a popup shows up, I force the “click” variable to a very high and unlikely value, so that it doesn’t correspond to something that would start an animation. When the user closes the popup, I reset the “click” variable to its previous value, allowing the procedures to start animations if needed.
My problem is that I don’t know how to synchronize the two threads properly. One the one hand, I need to be able to change the value of the “click” variable, but on the other hand, I need to be able to wait for this variable to change to a specific value in order to lock/unlock the animation. Like a condition_variable synchronization primitive.
I could also do that with a while loop that waits for the “click” variable to change to the right value, but I’d need a delay function in order to no waste cpu cycles and block the whole page…Is that clearer? Let me know if you need further info on that.
2018-07-11 at 3:34 pm #5647Mikhail LuzyaninStaffIs that clearer? Let me know if you need further info on that.
Not enought to understand how to help, it’s difficult to understand without visually see the application, if you don’t want to share the source file can you upload it to Verge3D network and share the link, so I can see how it looks like what each click do and so on. Also will be helpfull to see some screenshots of the puzzle setup.
Co-founder and lead graphics specialist at Soft8Soft.
2018-07-11 at 3:43 pm #5648vincentCustomerThe Scene beging after 2 seconds… and I want to see the step “Apparition-maps” in a first time.
2018-07-12 at 7:34 am #5657Mikhail LuzyaninStaffThe Scene beging after 2 seconds… and I want to see the step “Apparition-maps” in a first time.
If I get your right, you need to create your own timer ind do all things relatevly to it, you will be able to make pauses and jump to each step any time.
Something like this:
Attachments:
You must be logged in to view attached files.Co-founder and lead graphics specialist at Soft8Soft.
2018-07-12 at 12:48 pm #5668vincentCustomerThanks very much for your help. I’m working on it.
-
AuthorPosts
- You must be logged in to reply to this topic.