I’m trying to replicate the Sugar Honeycomb cookie game from the Netflix show “Squid Game”, but I am stuck at the drawing part. In this game, you have to draw around a shape and get it out of the base to survive. If you crack it, a worker will shoot you.
I’m trying to achieve the drawing system from the game, as I’ve done everything else so far. You just draw around the outlines without going out and you win.
Maybe you could put the camera of the player above the honeycomb and connect the mouse to the needle and if the needle touches a certain “area” of the honeycomb, the honeycomb breaks and you die, although this a rough idea and it needs more polishing, it could work if executed right.
There is a number of ways you can achieve this- some more complicated than others.
By having the player’s mouse position, you can compare values of mouse.Hit.p to the Honeycomb’s line’s with relation.
That being said, an easier approach if you don’t want to take on the math involved in an ideal solution is to place a UIObject to exist as the lines of the honeycomb, and on MouseLeave event, count that as a crack. This solution is easier and less performance intensive as it is event based. You will need to solve a few edge cases with it.
Good to know someones actually putting in the effort!
Most games just have you walk over a shape… which isnt apart of the actual game.
Even Fish game (the biggest squid game trendhopper) just makes you walk over a shape
How it looks is up to you. If you make the parts smaller and only cast a part when the mouse delta reaches a certain distance, or you check magnitude before casting a part to see that parts dont overlap as much (only cast a part when magnitude reaches the size of the part / 1 stud), then it may look more visually appealing.
You could also build the lines out of UI instead of parts and see similar performance with differing options for solving the real problem you’re going to run into, which is writing a function to check whether or not they actually completed the shape properly.
I would assume by looking at that, that my solution for coding the challenge is different than theirs. To me that looks like predetermined position for parts so that it can perfectly fill a number of shapes (also it looks like they have the part/ui under the indention which gives a nicer effect).
Without having played the game I can’t make assumptions about its actual code functionality, what it might do is check the mouse’s position every time the player clicks, and if the mouse’s position is inside one of those predetermined positions then it becomes visible. This also yields easier solutions because seeing if the shape was solved is done by checking to see if all parts became visible or not.
Yep, exactly what I was thinking. Thanks! Is there a way you can think of to do this with predetermined positions? Like checking the magnitude? (or region3)
Do you mean how you would check if the mouse position lands within a certain part’s boundaries? You might see reasonable results from building a raycast at the X,Z value of the mouse and matching the Y value to just above where your cookie is located. Raycast will return what part gets hit as long as you cast it downward far enough. If it hits a predetermined part make it visible- if it hits the cookie then it causes a crack.
Yea, if you saw “permissions” I meant positions. My friend was talking about permissions in a call, so I accidently typed that. I will try this, thank you for all of the help!