question about created actors

Game Editor comments and discussion.

question about created actors

Postby Fojam » Sat Feb 25, 2012 4:42 pm

i want to speed my iPhone game up as much as possible. There are many actors in the game, but not all of them are on the screen at once. does it affect speed even having the actors created at the time, or is it only if they are on the screen?

should i make them not created at startup, and have them only create themselves when i need them?
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: question about created actors

Postby skydereign » Sat Feb 25, 2012 7:21 pm

Creating actors off screen still slows your game down. Having actors off screen slows your game down as well. If you have a lot of actors created on startup your game will take longer to load. So try to use activation regions whenever possible, only create the actors that are necessary and the usual performance increasing tips.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: question about created actors

Postby Clokio » Sun Feb 26, 2012 3:25 am

skydereign wrote:Creating actors off screen still slows your game down. Having actors off screen slows your game down as well. If you have a lot of actors created on startup your game will take longer to load. So try to use activation regions whenever possible, only create the actors that are necessary and the usual performance increasing tips.


That is a cool feature. :D

From the manual, see it by clicking Help (in GE), document
Or look here Add Activation Region: http://game-editor.com/docs/gettingstarted_maineditormenu.htm
Activation Regions are screen areas that are defined by a bounding box and include game Actors.
A Region, and your actors, is loaded only when the View Actor intersects it.
The Region and all actors within the Region are destroyed when the View Actor no longer intersects it.

Activation Regions allow your game to have many levels, each level in a game can be defined in a different Activation Region.
The entire game, along with all of its levels, is saved in an single game file.
Activation Regions make envisioning an entire game easy.

An Activation Region is shown within the Game Editor as a yellow rectangle. It can be moved or resized freely. The rectangle is invisible when the game is running in game mode.



Right click on the Activation Region's bounding box edge to initiate a pop-up selector that will allow the removal of the Activation Region from the game..

If an Actor moves outside of the Activation Region, it will be destroyed only when the Activation Region no longer intersects with the "View" Actor.

An Actor will be destroyed by the Activation Region when it and your ascendants are outside of the "View".

Numerous Activation Regions with overlapped regions can be defined.

All of an Activation Region's Actors load inside of the defined region. The Actor's parents, and Actor reference through script is also be loaded.

Actors created with "Create Actor" will be assigned to a visible Activation Region.

If the "View" Actor leaves a region and later it comes back, all Actors will be reloaded, except those destroyed explicitly with the "Destroy Actor" Action.

Any Actor can be loaded with "Create Actor", even if has been destroyed explicitly.

If no Activation Regions have been defined, all game Actors will be loaded when the game starts.



Below, a multilevel game with 3 Activation Regions:




Show/Hide Regions:

Show or hide Activation Regions and Region Actors
Clokio
 
Posts: 229
Joined: Tue May 17, 2011 2:18 pm
Score: 32 Give a positive score

Re: question about created actors

Postby Fojam » Tue Feb 28, 2012 1:07 am

is there a way to exclude certain actors from activation regions, or to destroy an activation region? because i really dont want to have to find the exact coordinates of an area. currently im using a wireframe region to move the view there, but it wont work with an activation region.
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: question about created actors

Postby skydereign » Tue Feb 28, 2012 4:11 am

You can't exclude actors nor can you destroy regions, but you should be able to access the default actor coordinates of actors that don't exist within the region. As long as they are unique it should work (tested as an executable just now). Have you tested your wireframe method?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest