gainanna.blogg.se

3d dark deception game on scratch studio
3d dark deception game on scratch studio







and if the player walks one step he makes this process all again. with those numbers, we can use some math to generate an image based on them. Ok so, how are we going to transform this 2D game into a 3D game? First, let's imagine that our player has a big rule, and then he starts to measure his distance in relation to the walls in various angles while annotating all of them on a piece of paper. In the end, you should have a simple 2D top-view maze game

#3d dark deception game on scratch studio code#

you can use your movement code of choice, in the images above I put a movement script that uses WASD, but you can change for arrows if you want to. Now you write some text for the winning message as a new sprite, and for the code when it receives the win broadcast it shows up.įinally the for the player itself, you just need to draw a simple small box and then code its movement script. after that, you need to trigger the winning message to display it by using the code above. all you have to do here is trace lines on your map in the places you want to end the game, and after that, you can delete the maze(the clone) and only leave the exits. Then you can clone the maze sprite and call it "Exit".

3d dark deception game on scratch studio

PS: small spaces are good to improve performance the only line of code you need is to centralize the maze on the screen.

3d dark deception game on scratch studio

In my case, I just downloaded an image from google and then traced it over using the line tool. (all the images above are in chronological order with the text)īefore the 3d part starts, we need to create a 2d game so then we use ray-casting to give the impression of a 3d game.įirst, you just have to create a sprite called "maze" and draw a simple maze.







3d dark deception game on scratch studio