L
lolols...
Guest
so I'm creating a game right now and I've come across a slight problem with the camera movement. the code I'm using which is this seems to not work very well:
///Camera Movement
view_xview[0] += ((x-(view_wview[0]/2)) - view_xview[0]) * 0.5;
view_yview[0] += ((y-(view_hview[0]/2)) - view_yview[0]) * 0.5;
I would use the camera movement that's apart of the room editor but its not very smooth and my sprites are small so I guess that does not help. The problem I have with my current code is that it continues to show things that are past my room's boundaries. How do I fix this?
My second question is how do I implement a simple GUI into my game (which is a platformer by the way). The way I want to approach it is by having a scoreboard sprite at the bottom of the screen and it shows the player's lives and stuff but, I have little to no idea how to do this. Thank you in advance for anybody who's willing to help.
///Camera Movement
view_xview[0] += ((x-(view_wview[0]/2)) - view_xview[0]) * 0.5;
view_yview[0] += ((y-(view_hview[0]/2)) - view_yview[0]) * 0.5;
I would use the camera movement that's apart of the room editor but its not very smooth and my sprites are small so I guess that does not help. The problem I have with my current code is that it continues to show things that are past my room's boundaries. How do I fix this?
My second question is how do I implement a simple GUI into my game (which is a platformer by the way). The way I want to approach it is by having a scoreboard sprite at the bottom of the screen and it shows the player's lives and stuff but, I have little to no idea how to do this. Thank you in advance for anybody who's willing to help.