Converting my 2D game to 3D (while still only using 2D)
I'm working on improving the graphics on my existing game Slip for my new game Slide! The first step is to start making the graphics look a bit cleaner and impressive.
In Slip, there is a mechanic that changes the player's direction when they hit it, a bit later in the game there is one that toggles what way it faces at the press of a button tile! Here is that one in action, first it pushes the player to the left, the button is pressed off camera, then the player moves to the right on contact.
There is no animation when the paddle moves, it just snaps into place instantly, I wanted to clean this up AND make it look a bit more 3D
So here is the process...

1- Just a basic paddle that twists (when the player goes over a button)
2 - Added a base with a darker shade and moved the lighter shape higher up
3 - Work out the centre of the tips of the top and bottom paddles, draw a box at that location where the height is the depth and the width is the paddle shape thickness (maths explained later if you want)
4- Colour the white square to match the darker shade of red, render that behind the lighter paddle!
Kind of basic post but thought it was fun to work out, let me know what you think
For those really interested, here is some maths to explain where to place the white square...
First define a few things!
The paddle length = L
The paddle thickness = T
The "depth" of the paddle = D
The angle (in radians) that the paddle is facing at the time = θ
The current location of this tile, x and y = pos
Now we can figure out the X location to render the square...
X = pos.x + cos(θ) * (L - T) / 2
The Y location is pretty similar, just that we need to use sin() instead of cos() and then add half of the "depth"!
Y = pos.y + sin(θ) * (L - T) / 2 + D / 2
The width of the square is simple, it is just the thickness of the paddle!
The height of the square is also easy, it is just the depth of the paddle!
Slide
Slippery logic puzzles
Status | In development |
Author | RegularJoe |
Genre | Puzzle |
Tags | desktop, mobile |
More posts
- Improving my game's buttons10 hours ago
Leave a comment
Log in with itch.io to leave a comment.