Page 1 of 1
Create At Startup and Activation Regions
Posted:
Tue Aug 07, 2007 1:38 pm
by summer_goth
This may be a long question, please bear with me.
When making use of Activation Regions, is it possible to have certain actors which are not destroyed when I move from one Activation Region to another?
I do not want to make use of external files that I load in. I do have quite a lot of areas though.
I was hoping to not make use of activation regions at all, by selecting no where one can select "Create At Startup". But I see that everything is still loaded into memory though (on the Pocket PC, not sure about PC).
Is there a way to not use Activation Regions and create and destroy the actors myself without them all loading at the start of the game?
If not, is there a way to keep certain actors in memory while moving from one Activation Region to another? (Will it work to move the actor to the other region first and then moving the view? I can't have overlapping areas because there are too many)
Thanks people.
Posted:
Tue Aug 07, 2007 2:18 pm
by Troodon
If you put actors inside activation region, they don't get destroyed. They will be reloaded when you view collides with the region.
But all the other actors which are outside activation regions get destroyed when they are outside the safe margin. (which is an imaginary line outside your view)
Posted:
Tue Aug 07, 2007 2:26 pm
by summer_goth
I understand that yes. Or at least I think I understand what you are saying.
Is it possible though to keep some actors from being destroyed? For instance in some way move them from the one activation region to another? I want to keep them in memory and not load them every time I move to a new Activation Region.
Posted:
Tue Aug 07, 2007 2:28 pm
by Troodon
Ah, I see what you are meaning. I'm not sure if it's possible. If you want you can remove activation regions and just make the other actors get destroyed manually. If this solution goes well with your project.
Posted:
Tue Aug 07, 2007 3:29 pm
by summer_goth
The problem is that when I do not use activation regions then everything is loaded into memory when the game starts up. Which takes a while and uses up a lot of memory. This is even when I select the option on each actor not to be created at startup.
Hmmm I am just not sure what to do.
Posted:
Tue Aug 07, 2007 3:37 pm
by d-soldier
Right, "created at startup" refers only to if that actor is in play when the game starts, having nothing to do with memory. One thing you could do is overlap activation regions. Basically, put all your actors in one area, and have all the regions encompass their own maps/levels and also stretch over to include the pile of actors. This works great for two or three levels, but theres only so much you can do with a rectangle. It would be nice is activation regions supported user-drawn polygons.
Posted:
Tue Aug 07, 2007 4:05 pm
by summer_goth
Thanks d-soldier and tekdino. I guess that the overlapping activation areas are the only thing I can do.
Or wait a second....
Is it possible to move an uncreated actor into an activation area at runtime? Will it then be created as you move it into the activation area?
Posted:
Tue Aug 07, 2007 4:09 pm
by Troodon
I'm not sure. You can try if you are at home.
Posted:
Wed Aug 08, 2007 6:33 am
by summer_goth
I decided that I will check this out later. The game has to be nearly finished by Monday so I got to work on other aspects so long.
Thanks for the help guys.
I am hoping that Makslane swings by and offers an opinion.
Posted:
Wed Aug 08, 2007 12:07 pm
by makslane
Are you get delays when change to other activation regions?
Posted:
Wed Aug 08, 2007 1:20 pm
by summer_goth
Hmmm I am not really sure. I will have to go check. Ha, I think that I am so used to programming and doing things a certain way that I am not used to the idea of Game Editor.
The more I use it, the more I like it though. Will check out the activation areas and see if it causes delays.
Posted:
Fri Aug 10, 2007 2:49 am
by DocRabbit
I found this would happen in my pong game by attaching the actor you wish to carry around to the mouse. If you think about it, even though when you use 9999 velocity on moveto, it still has points where it is drawn in between start point and point you wish to go, and the mouse cursor always follows the view, so if you just hook that wanted player or actor to the mouse prior to the move, he follows right along with the mouse cursor, never leaving the view, thus never being destroyed.