• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Object's image_speed and room size issues

Hello there,
I'm an old user from GMC but I didn't work with Game Maker since it became "Studio", yesterday I've purchesed a license for GMS2 (Desktop) because I want to develop a new game and I think Game Maker 8 (that I used to work with, in these years, just for fun) wouldn't be a nice choise.

First of all I'm sorry about the title of this thread, I'm experiencing many problems and I didn't know what to type to be more precise.
I'm also sorry if this is not the right section to post this thread but I don't think it's about programming.
All these problems I'm writing about did work on the Game Maker 8 version of my game, now that I've ported everything on GMS2 I have:

1. image_speed is not fluid and not coherent [SOLVED]
I have an object with a many-frame sprite. I want the animation to go (with speed 0.4) only when my object is actually moving (if speed > 0).
The fact is: if I move it to the left, the animation is fluid, while if I move it to the right it seems like the animation is oscillating between 0.2 and 0.4 (or slower anyway), don't know why.
Code:
if go_here.come = true {
if distance_to_object(go_here) > 10 {
if x < go_here.x { sprite_index = spr_player_walking_right } else { sprite_index = spr_player_walking_left } }
move_towards_point(go_here.x,y,4)
}
if speed > 0 image_speed = 1 else image_speed = 0
(yeah, sorry if it's all disordered... and yes, I didn't want to flip the image so I used two sprite, it's just temporary eheh)
Why's that?

(Ah and btw, the animation don't start in the same moment the object start moving)

2. room size is not as it should be [SOLVED]
My room size is (temporary but I want to solve this before starting change the resolution) 640x480.
It draws it more little than that. If i set it to 800x600 (by using window_set_size(800, 600);) it draws it on 640x480. I can't understand why.
I'm sure about that because I've opened a bitmap editor under my room and the canvas is 640x480 just like the room that Game Maker 8 used to draw.
What did I do wrong?

I think this problem also causes an issue with mouse_x and mouse_y functions: selection of a text (that I did by the code belove, not here for the code, I did that because Game Maker 8 didn't have the the function to do the check)
Code:
if collision_rectangle(x-5,yps,x+string_width(answer1)+5,yps+sfae,cursor,0,0)
(cursor.x and cursor.y = mouse_x and mouse_y, in step event)

Thank you for your support
 
Last edited:
Solved the second problem, now I know that GMS2 manage room size, viewports and window size as different values in order to give more control to the developer.
I'll resize the window everytime.
Thanks anyway, this thread can be closed now.
 
Top