rounding

  1. Anixias

    GMS 2 Better View movement?

    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...
  2. C

    [SOLVED] Round to the Nearest Multiple of a Number

    Hello, 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
  3. silverfrost

    Legacy GM bug with movement speed with slowmo, rounding?

    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: //time handle global.time_speed = 1...
  4. trebor777

    GMS 2 Bbox_Left & Negative 'X' Speed

    Hello. 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: // Frame X:313 DX:4...
  5. W

    Legacy GM Collisions seem to be rounded?

    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...
  6. M

    Legacy GM Problem with rounding and views

    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...
  7. T

    View - dynamic offset and size

    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...
  8. P

    Android Integers being rounded? Need complete accuracy.

    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...
Top