Legacy GM Collision checking with collision_rectangle or position_meeting?

Hey,

A quick litte question,
Should I check collision with collision_rectangle() and draw the green color with draw_rectangle_colour() that shows if this place is empty or not, or should I have a colored object and check collision with place_meeting() and change the image_index of that object depending on the situation? Whichs better?
 
Last edited:

Paskaler

Member
The first one since you'll have less objects. Also you were looking for place_meeting here, not position_meeting. Check them out in the manual for the difference
 
@Paskaler First of all, it was just a typo, I didn't remind which one was the one moving the instance and checking for collision but thanks for pointing this out so I can correct it! And second, I've heard that drawing things use more memory so instead of drawing the text of a "new game" button, its better to make it drawn in the sprite. I was curious about that.
 

Paskaler

Member
Drawing text IS slower, but you shouldn't see any difference. Just use the draw_text_* functions and if the game starts slowing down and you verify in the profiler that these functions are causing the slow down change them to sprites
 
Top