Hotline miami + early gta
- 2 Devlogs
- 3 Total hours
A top down game that combines hotline miami and the open world of the early gta games
A top down game that combines hotline miami and the open world of the early gta games
devlog #2
I finally got the rotation to work after working on it for a while and ngl it was not as easy as i thought it would be. But atleast the player faces the cursor now.
So, i divided the area in 4 parts like the 4 quadrants of a graph, then did the math for each one of them and added a certain amount to make up for the previous quadrants. At first it felt easy and i got the first quadrant to work really easily, it was after that that things started to not make sense, because in theory I was pretty sure that i should’ve be able to find out the opposite cathetus for both of the bottom quadrants the same way, but for some reason it wasnt working like that and acting weird. Then i tried to make a different triangle with a different cathetus and which worked, so i ended up solving the opposite cathetus differently for each quadrant :)
I also had to add like a 90 degrees offset because the game starts with the player facing a different direction and 0 degrees in raylib is right i think, so i had to add 90 degrees to fix that.
And for the hypotenuse’s length i used the distance formula:
d = ((x1 - x2)^2 + (y1 - y2)^2))^0.5
then to find the angle i used the formula for sine which is:
sin(angle) = oppositecathetus/hypotenuse
from this i solved out the angle so i got:
angle = sin^-1(oppositecathetus/hypotenuse)
But the asin (arcsine - sin^-1) function was returning the value in radians which i am not comfortable with at all, so i just converted it into degrees by multiplying the value i got from the asin function by:
(180/3.14)
As for the next step, it will probably be something like getting the player to move or maybe bullets because i’m still unsure about how i want the movement and i dont really want to completely copy hotline miami’s movement either. So i’ll think about it
devlog #1
Hi there!
You might be wondering what i’m making, right?
so, i’m trying to make a top down, by that i mean a fully top down like 90 degrees top down game which will combine the open world of the early gta games (never played any of the top down ones) and hotline miami (recently started). I really like hotline miami’s combat, but i feel like it could be more responsive or like more shaky.
And i will be working in c++ - a language which i started learning weeks ago (coming from python) with the raylib library.
As for why?
idk tbh, graphics programming seems cool and i’d like to learn something like opengl in the future. The reason i chose raylib was because its similar to pygame or i’d say that it’s somewhat easier than pygame and because i want to learn the language and get somewhat comfortable with it.
And it also feels like this project is going to be most difficult, not because of language but asset. Because its like impossible to find assets that are fully top down. On sites like itch.io all the topdown tagged assets are actually angled top down, which means that i’ll have to make the assets as well 🥀
Below is a picture of what i’ve done so far, its just a top down character (which i made to test around) and a crosshair (a box for now) that follows the mouse like in hotline miami.
The next step will be to get the player to face the mouse.