Load Part of the Map
#1
Posted 07 August 2012 - 11:13 PM
#2
Posted 07 August 2012 - 11:23 PM
#3
Posted 07 August 2012 - 11:39 PM
Actually I thought of that right after I uploaded this, I might do that.well you could make multiple rooms and have it if the player passes a point it moves to the new room?
#5
Posted 08 August 2012 - 12:03 AM
#6
Posted 08 August 2012 - 12:08 AM
#7
Posted 08 August 2012 - 12:12 AM
#8
Posted 08 August 2012 - 12:15 AM
#9
Posted 08 August 2012 - 01:44 PM
Your talking about deactivating objects that aren't in the view. I'm new to game maker could you help me out a little with what that does and how do I do it?It would be the same, I typically mix the in_view script with deactivating. For static items like trees, I deactivate. For things like enemies, I use the in_view script.
#10
Posted 08 August 2012 - 01:54 PM
Read the manual regarding deactivating instances.Your talking about deactivating objects that aren't in the view. I'm new to game maker could you help me out a little with what that does and how do I do it?
It would be the same, I typically mix the in_view script with deactivating. For static items like trees, I deactivate. For things like enemies, I use the in_view script.
For example, to deactivate all instances outside the view and activate the ones inside the view, you could place the following code in the step event of the moving character:
{
instance_activate_all();
instance_deactivate_region(view_xview[0],view_yview[0],
view_wview[0],view_hview[0],false,true);
}
In practice you might want to use a region slightly larger than the view.
The point would be to not waste cpu time on objects that are outside the view, but you should leave a nice big buffer around the edge of the screen.
This way you can have thousands of enemies as you run around but if you don't have too many on screen at a time it will still be smooth...
Edited by decroded, 08 August 2012 - 02:02 PM.
#11
Posted 08 August 2012 - 03:57 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











