notsonormal: (Default)

I've finally made a scrolling function, so now my player can scroll through a 1920x720 map. How did I do it? Idk I just made another SDL_Rect called cameraRect and turn it into the x and y of the player after taking input from the user and subtracting it to half of the window's height and width. How does that work? Again idk, it's working and that's all that matters! Now I just have to fix the distortion on the map, it gets stretched in and out. 20 mins max I'll figure this out fsfsfs.

progress

Jun. 26th, 2024 11:14 am
notsonormal: (Default)

random game



I've finally figured out how to make animations work in SDL(kinda). I did it by activating a specific src x and y every time a specific button is pressed. It works fine, but because it only activates a specific animation on a specific button when pressed, I don't know how to make it revert back to the idle animation. I jump and it's stuck on the jump sprite unless a different key is pressed. Weird. I tried doing a if touched ground, src.x = 0 and src.y 0 (meaning it goes back to idle) it worked, but now the left and right animations doesn't even work. This is frying my brain honestly. I'll get back to that, I'll add a goal to the game first. (currently it's just a flat platform with an enemy that is impossible to get away from lol).

Profile

notsonormal: (Default)
tan

August 2025

S M T W T F S
     12
3456789
10111213141516
17181920 212223
24252627282930
31      

Syndicate

RSS Atom

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 14th, 2025 12:08 am
Powered by Dreamwidth Studios