• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

rounding

  1. RyanC

    GameMaker Issue with Rounding to the Nearest Multiple of 200 when Using Large Numbers

    Hi All, Can anyone see why this code is not reliable when global.Y is more than 500,000.00? // grid is drawn at x, y // global.Y is where I would like the blocks to be rounded from so they are snapped to a manual grid that could be any floating value. gem_width = 200 global.Y =...
  2. AndreLeier

    GML Function returns rounded value

    Hey guys! Firstly I would like to apologize because english no good šŸ˜ž. But my main issue is that I'm trying to get a really precise probability value, but the function is returning a rounded value. function prob(x, y) { return (score(x)/(score(x)+score(y))); }...
  3. Anixias

    GameMaker 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...
  4. 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
  5. S

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

    GameMaker 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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