I have an issue that I've always worked around by allowing fractional view coordinates, although that distorts all of the artwork of the game.
Basically, I have an isometric view and I set the view to the round() of whatever position I want it at. When my player moves cardinally, it looks fine...
I'm trying to think of a way to round a number up to the nearest multiple of 64 but I'm having trouble on how to go about doing so. For example, if x is 5 and that's the value I want, then I want it to round up to 64. Likewise, if x is 120, I want it to round up to 124.
Any ideas? :x
Hi. I'm decided to make slowmo in my game. I created an object that moves up for 2 seconds (or 4 seconds in slowmo) with increasing accelereation over time. While object moves it should travel same distance in normal and slowmo time.
In create event I have:
global.time_speed = 1...
I'm hunting bugs in my projects, and I struggling with some rounding issues and the bbox_left variable.
Somehow, bbox_left uses a float value as a reference point, despite my x being set as an integer value in my code.
here's a bit of logging I do every frame:
I've noticed just now that collisions seem to only activate when an object is overlapping more than 50% of one pixel into the collision event object.
To explain that more clearly:
1. Say you have a player object moving downwards at 0.2 pixels a step. Directly below that you have a wall. Like...
So I'm trying to make a platformer game going off of Shaun Spalding's platformer tutorial. At first I was having problems with the view following player. It wasn't major, but the view would stutter a little bit and sometimes the player wouldn't quite touch the ground. So I looked around and...
I want the view to be affected by player's speed, here's what I have:
If I floor() the values below (which I think I should) screen seems to be shaking. (Can be seen in the video)
Is it OK if I leave them as a floating point number?
Also, do you have any suggestions how to improve this code...
I'm working with coordinates. They return perfectly, but when converted to a string they are rounded to 2 decimal places instead of the 6 that were returned. This is very close to my house but not close enough. the NN.nnnnnn that returned was on my house, in the correct room. NN.nn is up a hill...