L
LV154
Guest
I've been developing a top down shooter with 3D buildings and each object had its own draw event. After reading advice on optimising performance it seems that the less draw events called, the better. So I did exactly that, created a building_drawer_obj and placed all the draw commands for all 3D buildings into one draw event.
I don't know whether this was a very stupid thing to do because many objects are deactivated when outside the view. As far as I know this includes the building objects and so their draw events aren't called and gamemaker has to process through less code at a time. The building_drawer_obj is activated and so code that calls for a deactivated building to be drawn seems rather sloppy.
I wanted to ask for some input from members who understand how gamemaker works and executes code better than I do (I know next to nothing in that area).. Would it be best to move specific pieces of code back to their native objects, or keep it in one big draw event?
I don't know whether this was a very stupid thing to do because many objects are deactivated when outside the view. As far as I know this includes the building objects and so their draw events aren't called and gamemaker has to process through less code at a time. The building_drawer_obj is activated and so code that calls for a deactivated building to be drawn seems rather sloppy.
I wanted to ask for some input from members who understand how gamemaker works and executes code better than I do (I know next to nothing in that area).. Would it be best to move specific pieces of code back to their native objects, or keep it in one big draw event?