Sunday, 29 September 2024

Stencyl-nator topic updates: 2024_09_29

Apologies: 
Sorry for not being active for so long especially over the promised Half-life Zombie Edition. Also gone headache over Nintendo vs Palworld lawsuit in Japan. Purchased Palworld on Steam and never gets to play it because we do not have a sufficent computer to play it. Done it to vote with our wallet.   

While Nintendo is suing Palword over patent infringements, not copyright infringements. Stencyl-nator sides with Palworld because the patents lawsuit over game mechanics. Stencyl-nator is no fan of either side of this lawsuit nor endorse the bare minimum differences bewteen pals and Pokemons.  However, Colopl did deserve the similar lawsuit because colopl uses its patent to extort,    

Stencyl-nator do wish all the patents go viral across the globe especially the ones registered beyond Japan where colopl(actually deserved to get sued), Nintendo and Poketpair (Palwirld) is in. Stencyl-nator also hopes Palworld does not get woke (for example: gays for sharia and trans for kids) under SONY partnership 

Why Stencyl-nator put the codes in public?. this is to prevent intellectual property trolling. All Stencyl-nator tutorials and the pictures in it are in public domain except mentioned otherwise. 

Topic updates 
update: added links to Actors > Tweening > Scale Actor 

update: In this case, flip on vertical axis, the axis will follow actor roitation. 
proposed to add: nintendo and pokemon game mechanic patents screenshot as actor object as another example instead of just custom gender satire.  
 
other news
Half-life : Zombie Edition package (incomplete) 

This package is Half-life:Zombie Edition with mods installed on it. These mods are:
Affliction, BooM, Black Mesa Sideline and The Long Night. 
The picture below - Mod: Black Mesa Sideline. 

CAUTION: Stencyl-nator has not tested this package on other computers. and the package will be very difficult especially with human grunts 

=====
The work of the multi-tile object rendering system is roughly 40% complete. The length of the code inn our style which is more condensed than displyed in JPEXS FFDEC will be roughly 4,000 lines. In this version, data pre-creeation is more difficult and require multi-actor object listing. The progress is slow because we have jobs to do. Employed in jobs that have nothing to do with Stencyl or nay game development whatsoever.  

Sunday, 9 June 2024

New Stencyl topic: Scene > view > camera X

The multiple tile-"unlimited" scene rendering will show its results next week, but will still be far from complete, still programming on rnx (render from left side of a screen). This feature will be used in Prosperity Valley and some other games to be developed together. We wont tell what they are because we are not yet getting all the features working correctly such as pathfinding, the most difficult feature we have attempted. 

But one potential outcome are: 
1. LGBTQ Gov't that preaches muslim immigrants welcome and Gays for Palestine (inspired by Mr prepper), to escape the town because there is too much wokeness. 
 
2. Watered down version with character design - as fat as a queen sized bed =1 tile - our old game development project back in 2022 will be. As said in 2023, we started the game development over to opimise the game because we ant the game to be able to run in Avita Essential with Intel Celeron.  Also in the beginning this year, we said to compromise Prosperity valley over the multiple-tile "unlimited" scene rendering issue but now we ae doing the 3rd attempt.  

3. MapleStory mosnters comeback which is the least probable because the characters may occupy multiple tiles. We have also mentioned that we will no longer use them (even if they reach public domain) back in april 9. This one comes with evolution.      

and also it is time for us to stop being "talk big, does nothing" personnel. also we ha alos lost most of the views since the last post. 

New stencyl topics: 
1. Scene > view > camera X
https://stencyl-nator.blogspot.com/p/scenes-view-camera-x-y.html
can be found in "Individual Snippets" on the left



2. Design mode  (getting started)


Last but not least,  We told about Half-Life Zombie Edition with some mods installed on it. Last week, the game development porject has been stopped because we were sneezy, so we played games. and here the mods tried in zombie edition 

HL BOOM installed on Half-life Zombie Edition. 

The package is not ready yet still have alot of mods to cover and will put into Google Drive by end of june and update to ad more mods in october and november. 


Thursday, 23 May 2024

Stencyl topic correction: actors > properties > Actor type


corrected section: shortcut level 2
old:  return cast Data.instances.resources.get(0);
new  return cast Data.instance.resource.sget(0);

old usage results in compilation error, suggestion : instance. 
The corrected page can also be found in Individual snippet section on the left

Wednesday, 22 May 2024

New Stencyl topic: Actor Type individual snippet

The new attempt for "unlimited" scene with muliti-tile is only beginning to be coded. Many of our old cringy stuffs (2014 ~ 2017) are now being deleted from our blogger. Most of them will not be reused again. because all of the games we are making will be full top down. 

See SAS Zombie Assault series by NinjaKiwi. their view angle. You can play them on NinjaKiwi Archive. https://ninjakiwi.com/archive instead of looking at our past. We do not plan to finish what we started that time(2014 ~ 2017, MapleStory Monster perspectives). Unless there are at least 3 comments saying otherwise or until Prosperity Valley is in playable state (Earliest prediction: 2026).  

Because we have jobs, outside of geme development. Besides, we have not figured out some basic yet difficult game mechanics such as pathfinding and enemy AI.    

New Stencyl topic: individual snippet - actor type. 

can also be found in "individual snippets"  

So see you in june. Next post: play some mods installed on Half-life Zombie Edition. Yeah, that is one of our old stuffs during that time and we have not share with you.  

Wednesday, 1 May 2024

New Stencyl topic: Actor group

Still working on splash radius for multi-actor objects. before we move move on to the multi-actor renderung system. Currently working on fake regions which is not regions or actor but a programmed circular actor sensors. However, the sensors will scan all actors in the group and determine whether they are inside instead of using actual region or any listeners. 

New Stencyl topics: 
The picture above explains why StencylWorks are lag. The page can aso be found in Getting Started > Settings. 




Sunday, 28 April 2024

New Stencyl topic: drawing without G - circle

The stencyl topics:
1. not using com.stencyl.graphics.G - circle  https://stencyl-nator.blogspot.com/p/drawing-without-comstencylgraphicsg.html



2. Individual snippets - mouse positions.  https://stencyl-nator.blogspot.com/p/user-input-keyboard-mouse.html

changes in layouts:  
the 2 drawing without using com.stencyl.grahics.G is removed from the page tab and move to here:

Game development progress: 
building and testing splash radius for multi-actor objects. Goes in game mechanics section when the behavior is done. To be used in prosperity Valley. By seeing the blog you can know where we are working on. 

Wednesday, 10 April 2024

New stencyl topic switch Scene snippet.

 Selamat Hari Raya Aidifitri (Eid al-fitr) , while we are working with multi-tile object rendering system, developing concept, we have created a new topic which is found in individual snippets section.

topic updates: code mode for ActorScript - new section added
https://stencyl-nator.blogspot.com/p/code-mode-empty-behavior-shortened.html




Tuesday, 9 April 2024

Title change "switch scene" to "relaoad scene"

Apology
Sooryn for not being here for so long as we work where Stencyl, Haxe, HTML and JavaScript are not applicable and sorry for the misleading title in one of our pages (see topic updates).   

Prosperity Valley Game developent: 
Change method for multi-tile object rendering system. that is one object can have multiple actors.
currently testing and concept devbelopment on interaction, 
object stats (multiple objects shares the same stats).
About splahs radius: prevent damage stacking as each actor receives damage form splash radius in an boject.    
Not yet started the rendering system bu interaction concept development. 

Topic updates:  
change title "switch scene" to "reload scene" because of misleading titles.  
https://stencyl-nator.blogspot.com/p/scenegame-flow-swicth-scene-in-one.html

Old stencyl-nator stuffs 
MapleStory monsters will no longer be used (even if they reached public domain). but maybe fat furries VS the cakes but certainly not before we progress Prosperity Valley to a playable state.  The MapleStory monters our version could be the culprit why we lose views. 

Do drink more water, otherwise you will procrastinate your tasks. That is my 9 years of  experience with Stencyl. Feeling lazy because of dehydration. 

Monday, 19 February 2024

Prosperity Valley will be compromised.

compromised feature: "infinite scene" rendering for multi-tile objects. Thus the maximun object sise is 3 tiles (3x3) tiles. 
Reason: buggy in killing actors. And crashed during diagnosis loading actor array from class in behaviors. 
Proposed Design changes: fat character design. - should be a little slimmer than a single bed. Yes, that is difficult to achieve in reality 

Ever since the last post, Stencyl-nator has lost most of its views. Although Stencyl-nator seems abondoned and fades into obscurity, the game development is not dead but rather slow because he is employed. 

The new code is far too long to be placed here. New blog will be written as soon as the the game is whrthy to be shown in the screenshots. 

Saturday, 23 December 2023

Major setback for Prosperity valley.

Apology 
Stencyl-nator apologises for additional delays up to 1 year for the very confusing logic in our game code that is the rendering system (code mode) for objects that spans multiple tiles.  In this case, Stencyl-nator will start over the entire rendering system with simpler flow but similar concept. But before you can easily understand how this logic works in details, here is the concept for 1-tile object rendering system http://stencyl-nator.blogspot.com/p/endless-scenes.html

Asides from confusion, Stencyl-nator has been employed to be door-to-door salesman. Currently in probation and probably be back/fired within 2 weeks because not making enough sales and the economy is very bad.  So the progress will be far slower than it used to be. Aside form the work itself, the flyers have to be written at home so there will propably not be any progress during weekdays not even for asteroidgen or intermod (Mindustry mods in progress).  

Stencyl-nator has also been a black belt procrastinator especially after dealing with his resume. Will be working to deal with bingewatching habit. 
 
Concept - old version vs new version 
The new version renders either from positive or negative direction. instead of only for positive directions only. 
old version - early 2023
old version - june 2023

late version - dec 2023
New version - dec 2023 

The new version should be around 30% shorter than the old version. 

The incomplete old code
this is where the post is lengthened. Full code only. Let's see if you can find any mistakes asides the incomplete ones. this is already over 1000 lines incomplete, it should be around 2000 lines when completed. 

package scripts;
import com.stencyl.Engine; 
import com.stencyl.behavior.Script; // create actors. 
import com.stencyl.models.Actor; // last_created_actor
import com.stencyl.models.actor.ActorType; 
import com.stencyl.models.actor.Group; 
import com.stencyl.utils.motion.EasingFunction; //for custom tweening functions
import scripts.F; // for diagnosis pruposes. 

class Objdata //this to be a variable in a scenne behaviours. The resaon why this has been separated from the scene behavs is because the code itself is too long and is most of the code. 
{
public var actors_rnx: Array<Dynamic>=[]; public var actors_rny: Array<Dynamic>=[]; 
public var actors_rpx: Array<Dynamic>=[]; public var actors_rpy: Array<Dynamic>=[]; //actors for killings when leaving the screen. 
public var ocu_nxny:Array<Dynamic>=[]; public var ocu_nxpy:Array<Dynamic> =[]; 
public var ocu_pxny:Array<Dynamic> =[]; public var ocu_pxpy:Array<Dynamic> =[]; 
public var atr_rnx_nxny: Array<Dynamic>; public var atr_rnx_nxpy: Array<Dynamic>; 
public var atr_rnx_pxny: Array<Dynamic>; public var atr_rnx_pxpy: Array<Dynamic>; // attributes and other data. 
public var atr_rny_nxny: Array<Dynamic>; public var atr_rny_nxpy: Array<Dynamic>; 
public var atr_rny_pxny: Array<Dynamic>; public var atr_rny_pxpy: Array<Dynamic>;
public var atr_rpx_nxny: Array<Dynamic>; public var atr_rpx_nxpy: Array<Dynamic>; 
public var atr_rpx_pxny: Array<Dynamic>; public var atr_rpx_pxpy: Array<Dynamic>;
public var atr_rpy_nxny: Array<Dynamic>; public var atr_rpy_nxpy: Array<Dynamic>; 
public var atr_rpy_pxny: Array<Dynamic>; public var atr_rpy_pxpy: Array<Dynamic>;

public var ids_rnx_nxny: Array<Dynamic>; public var ids_rnx_nxpy: Array<Dynamic>; 
public var ids_rnx_pxny: Array<Dynamic>; public var ids_rnx_pxpy: Array<Dynamic>; // ids -- determines the actor types. 
public var ids_rny_nxny: Array<Dynamic>; public var ids_rny_nxpy: Array<Dynamic>; 
public var ids_rny_pxny: Array<Dynamic>; public var ids_rny_pxpy: Array<Dynamic>;
public var ids_rpx_nxny: Array<Dynamic>; public var ids_rpx_nxpy: Array<Dynamic>; 
public var ids_rpx_pxny: Array<Dynamic>; public var ids_rpx_pxpy: Array<Dynamic>;
public var ids_rpy_nxny: Array<Dynamic>; public var ids_rpy_nxpy: Array<Dynamic>; 
public var ids_rpy_pxny: Array<Dynamic>; public var ids_rpy_pxpy: Array<Dynamic>;

public var rfl_rnx_nxny: Array<Dynamic>; public var rfl_rnx_nxpy: Array<Dynamic>; 
public var rfl_rnx_pxny: Array<Dynamic>; public var rfl_rnx_pxpy: Array<Dynamic>; // reflactions
public var rfl_rny_nxny: Array<Dynamic>; public var rfl_rny_nxpy: Array<Dynamic>; 
public var rfl_rny_pxny: Array<Dynamic>; public var rfl_rny_pxpy: Array<Dynamic>; 
public var rfl_rpx_nxny: Array<Dynamic>; public var rfl_rpx_nxpy: Array<Dynamic>; 
public var rfl_rpx_pxny: Array<Dynamic>; public var rfl_rpx_pxpy: Array<Dynamic>; 
public var rfl_rpy_nxny: Array<Dynamic>; public var rfl_rpy_nxpy: Array<Dynamic>; 
public var rfl_rpy_pxny: Array<Dynamic>; public var rfl_rpy_pxpy: Array<Dynamic>; 

public var rot_rnx_nxny: Array<Dynamic>; public var rot_rnx_nxpy: Array<Dynamic>; 
public var rot_rnx_pxny: Array<Dynamic>; public var rot_rnx_pxpy: Array<Dynamic>; // rotation
public var rot_rny_nxny: Array<Dynamic>; public var rot_rny_nxpy: Array<Dynamic>; 
public var rot_rny_pxny: Array<Dynamic>; public var rot_rny_pxpy: Array<Dynamic>;
public var rot_rpx_nxny: Array<Dynamic>; public var rot_rpx_nxpy: Array<Dynamic>; 
public var rot_rpx_pxny: Array<Dynamic>; public var rot_rpx_pxpy: Array<Dynamic>;
public var rot_rpy_nxny: Array<Dynamic>; public var rot_rpy_nxpy: Array<Dynamic>; 
public var rot_rpy_pxny: Array<Dynamic>; public var rot_rpy_pxpy: Array<Dynamic>;

// all the scene data. 
public var scene = Engine.engine.scene; public var scene_type:String = ""; 
public var offsx:Float=0; public var offsy:Float=0; 
public var sceh:Int = Engine.engine.scene.sceneHeight;  
public var scew:Int = Engine.engine.scene.sceneWidth;  // scene dimensions
public var scrh:Int = Engine.screenHeight;  public var scrw:Int = Engine.screenWidth;  
public var initile_xmax:Int; public var initile_xmin:Int; 
public var initile_ymax:Int; public var initile_ymin:Int; 
public var half_sceh:Int = Std.int(Engine.engine.scene.sceneHeight/2); 
public var half_scew:Int = Std.int(Engine.engine.scene.sceneWidth/2); 
public var undefined_kill_list:Int; 
public var last_created_actor:Actor; 
// for diagnosis purpose only
public var f:F = new F(); public var number_of_objects:Int =0; 
public var diag_create_x:Int; public var diag_create_y:Int; 

public function new()
{
this.f.f_cu = Script.getFont(19);
this.atr_rnx_nxny = []; this.atr_rnx_nxpy = []; this.atr_rnx_pxny = []; this.atr_rnx_pxpy = [];
this.atr_rpx_nxny = []; this.atr_rpx_nxpy = []; this.atr_rpx_pxny = []; this.atr_rpx_pxpy = [];
this.atr_rny_nxny = []; this.atr_rny_nxpy = []; this.atr_rny_pxny = []; this.atr_rny_pxpy = [];
this.atr_rpy_nxny = []; this.atr_rpy_nxpy = []; this.atr_rpy_pxny = []; this.atr_rpy_pxpy = [];

this.ids_rnx_nxny = []; this.ids_rnx_nxpy = []; this.ids_rnx_pxny = []; this.ids_rnx_pxpy = [];
this.ids_rny_nxny = []; this.ids_rny_nxpy = []; this.ids_rny_pxny = []; this.ids_rny_pxpy = [];
this.ids_rpx_nxny = []; this.ids_rpx_nxpy = []; this.ids_rpx_pxny = []; this.ids_rpx_pxpy = [];
this.ids_rpy_nxny = []; this.ids_rpy_nxpy = []; this.ids_rpy_pxny = []; this.ids_rpy_pxpy = [];

this.rfl_rnx_nxny = []; this.rfl_rnx_nxpy = []; this.rfl_rnx_pxny = []; this.rfl_rnx_pxpy = [];
this.rfl_rny_nxny = []; this.rfl_rny_nxpy = []; this.rfl_rny_pxny = []; this.rfl_rny_pxpy = [];
this.rfl_rpx_nxny = []; this.rfl_rpx_nxpy = []; this.rfl_rpx_pxny = []; this.rfl_rpx_pxpy = [];
this.rfl_rpy_nxny = []; this.rfl_rpy_nxpy = []; this.rfl_rpy_pxny = []; this.rfl_rpy_pxpy = [];

this.rfl_rnx_nxny = []; this.rfl_rnx_nxpy = []; this.rfl_rnx_pxny = []; this.rfl_rnx_pxpy = [];
this.rfl_rny_nxny = []; this.rfl_rny_nxpy = []; this.rfl_rny_pxny = []; this.rfl_rny_pxpy = [];
this.rfl_rpx_nxny = []; this.rfl_rpx_nxpy = []; this.rfl_rpx_pxny = []; this.rfl_rpx_pxpy = [];
this.rfl_rpy_nxny = []; this.rfl_rpy_nxpy = []; this.rfl_rpy_pxny = []; this.rfl_rpy_pxpy = [];
}
public function abs(a:Float):Float{if(a > 0) return a; else if(a < 0) return 0-a; else return 0;}
public function create_actor(a:String,x:Float,y:Float,layer:Int):Void 
{var b:Actor=Engine.engine.getRecycledActorOfTypeOnLayer(Conte.obdat_actorType(a), x, y,layer); this.last_created_actor = b;}
public function diagnosis_data(x:Float, y:Float):Void // use when drawing listeners or its derivatives or When Drawing (snippet design mode)
{
this.f.ds("object data diagnosis: ", x,y);
this.f.ds("offsx: " + this.offsx,x,y+20); 
this.f.ds("offsy: " + this.offsy,x,y+40);
this.f.ds("initile_xmax: " + this.initile_xmax,x,y + 70);
this.f.ds("initile_xmin: " + this.initile_xmin,x,y + 90);
this.f.ds("initile_ymax: " + this.initile_ymax,x,y + 110);
this.f.ds("initile_ymin: " + this.initile_ymin,x,y + 130);
this.f.ds("number_of_object: " + this.number_of_objects,x,y +150);
this.f.ds("undefined_actor column: " + this.undefined_kill_list,x,y+180); // current diagnosis data is the undefined actor column is on the edge. 
}
public function get_ocu(x,y):Bool
{
if(x < 0)
{
if(y < 0)
{
if(this.ocu_nxny[0-x]==null || ""+this.ocu_nxny[0-x]=="undefined"){this.ocu_nxny[0-x]=[]; return false;}
if(this.ocu_nxny[0-x][0-y]==null || ""+this.ocu_nxny[0-x][0-y]=="undefined"){this.ocu_nxny[0-x][0-y]=false; return false;}
else if(this.ocu_nxny[0-x][0-y]== true){return true;}
}
else
{
if(this.ocu_nxpy[0-x]==null || ""+this.ocu_nxpy[0-x]=="undefined"){this.ocu_nxpy[0-x]=[]; return false;}
if(this.ocu_nxpy[0-x][y]==null || ""+this.ocu_nxpy[0-x][y]=="undefined"){this.ocu_nxpy[0-x][y]=false; return false;}
else if(this.ocu_nxpy[0-x][y]== true){return true;}
}
}
else
{
if(y < 0)
{
if(this.ocu_pxny[x]==null || ""+this.ocu_pxny[x]=="undefined"){this.ocu_pxny[x]=[]; return false;}
if(this.ocu_pxny[x][0-y]==null || ""+this.ocu_pxny[x][0-y]=="undefined"){this.ocu_pxny[x][0-y]=false; return false;}
else if(this.ocu_pxny[x][0-y]== true){return true;}
}
else
{
if(this.ocu_pxpy[x]==null || ""+this.ocu_pxpy[x]=="undefined"){this.ocu_pxpy[x]=[]; return false;}
if(this.ocu_pxpy[x][y]==null || ""+this.ocu_pxpy[x][y]=="undefined"){this.ocu_pxpy[x][y]=false; return false;}
else if(this.ocu_pxpy[x][y]== true){return true;}
}
}
return false; 
}

public function init() // initialise all the data. 
{
if(this.atr_rnx_nxny == null ||""+this.atr_rnx_nxny == "undefined"){this.atr_rnx_nxny = [];}
if(this.atr_rnx_nxpy == null ||""+this.atr_rnx_nxpy == "undefined"){this.atr_rnx_nxpy = [];}
if(this.atr_rnx_pxny == null ||""+this.atr_rnx_pxny == "undefined"){this.atr_rnx_pxny = [];}
if(this.atr_rnx_pxpy == null ||""+this.atr_rnx_pxpy == "undefined"){this.atr_rnx_pxpy = [];}
if(this.atr_rny_nxny == null ||""+this.atr_rny_nxny == "undefined"){this.atr_rny_nxny = [];}
if(this.atr_rny_nxpy == null ||""+this.atr_rny_nxpy == "undefined"){this.atr_rny_nxpy = [];}
if(this.atr_rny_pxny == null ||""+this.atr_rny_pxny == "undefined"){this.atr_rny_pxny = [];}
if(this.atr_rny_pxpy == null ||""+this.atr_rny_pxpy == "undefined"){this.atr_rny_pxpy = [];}
if(this.atr_rpx_nxny == null ||""+this.atr_rpx_nxny == "undefined"){this.atr_rpx_nxny = [];}
if(this.atr_rpx_nxpy == null ||""+this.atr_rpx_nxpy == "undefined"){this.atr_rpx_nxpy = [];}
if(this.atr_rpx_pxny == null ||""+this.atr_rpx_pxny == "undefined"){this.atr_rpx_pxny = [];}
if(this.atr_rpx_pxpy == null ||""+this.atr_rpx_pxpy == "undefined"){this.atr_rpx_pxpy = [];}
if(this.atr_rpy_nxny == null ||""+this.atr_rpy_nxny == "undefined"){this.atr_rpy_nxny = [];}
if(this.atr_rpy_nxpy == null ||""+this.atr_rpy_nxpy == "undefined"){this.atr_rpy_nxpy = [];}
if(this.atr_rpy_pxny == null ||""+this.atr_rpy_pxny == "undefined"){this.atr_rpy_pxny = [];}
if(this.atr_rpy_pxpy == null ||""+this.atr_rpy_pxpy == "undefined"){this.atr_rpy_pxpy = [];}

if(this.ids_rnx_nxny == null ||""+this.ids_rnx_nxny == "undefined"){this.ids_rnx_nxny = [];}
if(this.ids_rnx_nxpy == null ||""+this.ids_rnx_nxpy == "undefined"){this.ids_rnx_nxpy = [];}
if(this.ids_rnx_pxny == null ||""+this.ids_rnx_pxny == "undefined"){this.ids_rnx_pxny = [];}
if(this.ids_rnx_pxpy == null ||""+this.ids_rnx_pxpy == "undefined"){this.ids_rnx_pxpy = [];}
if(this.ids_rny_nxny == null ||""+this.ids_rny_nxny == "undefined"){this.ids_rny_nxny = [];}
if(this.ids_rny_nxpy == null ||""+this.ids_rny_nxpy == "undefined"){this.ids_rny_nxpy = [];}
if(this.ids_rny_pxny == null ||""+this.ids_rny_pxny == "undefined"){this.ids_rny_pxny = [];}
if(this.ids_rny_pxpy == null ||""+this.ids_rny_pxpy == "undefined"){this.ids_rny_pxpy = [];}
if(this.ids_rpx_nxny == null ||""+this.ids_rpx_nxny == "undefined"){this.ids_rpx_nxny = [];}
if(this.ids_rpx_nxpy == null ||""+this.ids_rpx_nxpy == "undefined"){this.ids_rpx_nxpy = [];}
if(this.ids_rpx_pxny == null ||""+this.ids_rpx_pxny == "undefined"){this.ids_rpx_pxny = [];}
if(this.ids_rpx_pxpy == null ||""+this.ids_rpx_pxpy == "undefined"){this.ids_rpx_pxpy = [];}
if(this.ids_rpy_nxny == null ||""+this.ids_rpy_nxny == "undefined"){this.ids_rpy_nxny = [];}
if(this.ids_rpy_nxpy == null ||""+this.ids_rpy_nxpy == "undefined"){this.ids_rpy_nxpy = [];}
if(this.ids_rpy_pxny == null ||""+this.ids_rpy_pxny == "undefined"){this.ids_rpy_pxny = [];}
if(this.ids_rpy_pxpy == null ||""+this.ids_rpy_pxpy == "undefined"){this.ids_rpy_pxpy = [];}

if(this.rfl_rnx_nxny == null ||""+this.rfl_rnx_nxny == "undefined"){this.rfl_rnx_nxny = [];}
if(this.rfl_rnx_nxpy == null ||""+this.rfl_rnx_nxpy == "undefined"){this.rfl_rnx_nxpy = [];}
if(this.rfl_rnx_pxny == null ||""+this.rfl_rnx_pxny == "undefined"){this.rfl_rnx_pxny = [];}
if(this.rfl_rnx_pxpy == null ||""+this.rfl_rnx_pxpy == "undefined"){this.rfl_rnx_pxpy = [];}
if(this.rfl_rny_nxny == null ||""+this.rfl_rny_nxny == "undefined"){this.rfl_rny_nxny = [];}
if(this.rfl_rny_nxpy == null ||""+this.rfl_rny_nxpy == "undefined"){this.rfl_rny_nxpy = [];}
if(this.rfl_rny_pxny == null ||""+this.rfl_rny_pxny == "undefined"){this.rfl_rny_pxny = [];}
if(this.rfl_rny_pxpy == null ||""+this.rfl_rny_pxpy == "undefined"){this.rfl_rny_pxpy = [];}
if(this.rfl_rpx_nxny == null ||""+this.rfl_rpx_nxny == "undefined"){this.rfl_rpx_nxny = [];}
if(this.rfl_rpx_nxpy == null ||""+this.rfl_rpx_nxpy == "undefined"){this.rfl_rpx_nxpy = [];}
if(this.rfl_rpx_pxny == null ||""+this.rfl_rpx_pxny == "undefined"){this.rfl_rpx_pxny = [];}
if(this.rfl_rpx_pxpy == null ||""+this.rfl_rpx_pxpy == "undefined"){this.rfl_rpx_pxpy = [];}
if(this.rfl_rpy_nxny == null ||""+this.rfl_rpy_nxny == "undefined"){this.rfl_rpy_nxny = [];}
if(this.rfl_rpy_nxpy == null ||""+this.rfl_rpy_nxpy == "undefined"){this.rfl_rpy_nxpy = [];}
if(this.rfl_rpy_pxny == null ||""+this.rfl_rpy_pxny == "undefined"){this.rfl_rpy_pxny = [];}
if(this.rfl_rpy_pxpy == null ||""+this.rfl_rpy_pxpy == "undefined"){this.rfl_rpy_pxpy = [];}

if(this.rot_rnx_nxny == null ||""+this.rot_rnx_nxny == "undefined"){this.rot_rnx_nxny = [];}
if(this.rot_rnx_nxpy == null ||""+this.rot_rnx_nxpy == "undefined"){this.rot_rnx_nxpy = [];}
if(this.rot_rnx_pxny == null ||""+this.rot_rnx_pxny == "undefined"){this.rot_rnx_pxny = [];}
if(this.rot_rnx_pxpy == null ||""+this.rot_rnx_pxpy == "undefined"){this.rot_rnx_pxpy = [];}
if(this.rot_rny_nxny == null ||""+this.rot_rny_nxny == "undefined"){this.rot_rny_nxny = [];}
if(this.rot_rny_nxpy == null ||""+this.rot_rny_nxpy == "undefined"){this.rot_rny_nxpy = [];}
if(this.rot_rny_pxny == null ||""+this.rot_rny_pxny == "undefined"){this.rot_rny_pxny = [];}
if(this.rot_rny_pxpy == null ||""+this.rot_rny_pxpy == "undefined"){this.rot_rny_pxpy = [];}
if(this.rot_rpx_nxny == null ||""+this.rot_rpx_nxny == "undefined"){this.rot_rpx_nxny = [];}
if(this.rot_rpx_nxpy == null ||""+this.rot_rpx_nxpy == "undefined"){this.rot_rpx_nxpy = [];}
if(this.rot_rpx_pxny == null ||""+this.rot_rpx_pxny == "undefined"){this.rot_rpx_pxny = [];}
if(this.rot_rpx_pxpy == null ||""+this.rot_rpx_pxpy == "undefined"){this.rot_rpx_pxpy = [];}
if(this.rot_rpy_nxny == null ||""+this.rot_rpy_nxny == "undefined"){this.rot_rpy_nxny = [];}
if(this.rot_rpy_nxpy == null ||""+this.rot_rpy_nxpy == "undefined"){this.rot_rpy_nxpy = [];}
if(this.rot_rpy_pxny == null ||""+this.rot_rpy_pxny == "undefined"){this.rot_rpy_pxny = [];}
if(this.rot_rpy_pxpy == null ||""+this.rot_rpy_pxpy == "undefined"){this.rot_rpy_pxpy = [];}
}

public function load()
{
this.init();
}

public function randgen_ids():String
{
var rand:Int = Std.int(Math.floor(Math.random()*10.999));
var ocu: Float = Math.random(); 
if(ocu > 0.94)
{
if(rand == 0){return "tru_1a";}
else if(rand == 1){return "tru_1b";}
else if(rand == 2){return "tru_1c";}
else if(rand == 3){return "tru_2a";}
else if(rand == 4){return "tru_2b";}
else if(rand == 5){return "tru_2c";}
else if(rand == 6){return "tru_3a";}
else if(rand == 7){return "tru_3b";}
else if(rand == 8){return "tru_3c";}
else if(rand == 9){return "tru_2x3a";}
else if(rand ==10){return "tru_2x3b";}
return "";
}
return ""; 
}
public function randgen_rfl():Bool {var a:Float = Math.random(); if(a < 0.5) return false; return true; }
public function randgen_rot():Float{return Math.floor(Math.random()*4) * 90;}

// renderings and on-spot random generations. 
public function rnx(x:Int, ymax:Int, ymin:Int):Void
{ var y:Int = ymin; 
if(x < 0)
{
}
else
{
}
}
public function rny(y:Int, xmax:Int, xmin:Int):Void // render above the upper screen boundary
{ var x:Int = xmin; // from left to right.
var a:String="", b:Bool = false, c:Float =0;   
var create_x:Float, create_y:Float; var sx:Int, sy:Int; var fx:Int, fy:Int; 
if(y < 0)
{
while(x < xmax)
{
if(this.actors_rny[x] == null ||""+this.actors_rny[x]=="undefined"){this.actors_rny[x] =[];}
if(this.actors_rpy[x] == null ||""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x] =[];}
if(x < 0)
{
if(this.ocu_nxny[0-x] == null||""+this.ocu_nxny[0-x] == "undefined"){this.ocu_nxny[0-x]=[];}
if(this.ocu_nxny[0-x][0-y] == null||""+this.ocu_nxny[0-x][0-y] == "undefined"){this.ocu_nxny[0-x][0-y]=false;}
if(this.atr_rny_nxny[0-x] == null||""+this.atr_rny_nxny[0-x] == "undefined"){this.atr_rny_nxny[0-x]=[];} // this direction. 
if(this.ids_rny_nxny[0-x] == null||""+this.ids_rny_nxny[0-x] == "undefined"){this.ids_rny_nxny[0-x]=[];}
if(this.rfl_rny_nxny[0-x] == null||""+this.rfl_rny_nxny[0-x] == "undefined"){this.rfl_rny_nxny[0-x]=[];}
if(this.rot_rny_nxny[0-x] == null||""+this.rot_rny_nxny[0-x] == "undefined"){this.rot_rny_nxny[0-x]=[];}

if(this.atr_rpy_nxny[0-x] == null||""+this.atr_rpy_nxny[0-x] == "undefined"){this.atr_rpy_nxny[0-x]=[];} // opposite direction
if(this.ids_rpy_nxny[0-x] == null||""+this.ids_rpy_nxny[0-x] == "undefined"){this.ids_rpy_nxny[0-x]=[];}
if(this.rfl_rpy_nxny[0-x] == null||""+this.rfl_rpy_nxny[0-x] == "undefined"){this.rfl_rpy_nxny[0-x]=[];}
if(this.rot_rpy_nxny[0-x] == null||""+this.rot_rpy_nxny[0-x] == "undefined"){this.rot_rpy_nxny[0-x]=[];}
if(this.ocu_nxny[0-x][0-y] == false)
{
if(this.atr_rny_nxny[0-x][0-y] == null||""+this.atr_rny_nxny[0-x][0-y] == "undefined"){this.atr_rny_nxny[0-x][0-y]=[];} // temporary empty data. 
if(this.ids_rny_nxny[0-x][0-y] == null||""+this.ids_rny_nxny[0-x][0-y] == "undefined"){this.ids_rny_nxny[0-x][0-y]=this.randgen_ids();}
if(this.rfl_rny_nxny[0-x][0-y] == null||""+this.rfl_rny_nxny[0-x][0-y] == "undefined"){this.rfl_rny_nxny[0-x][0-y]=this.randgen_rfl();}
if(this.rot_rny_nxny[0-x][0-y] == null||""+this.rot_rny_nxny[0-x][0-y] == "undefined"){this.rot_rny_nxny[0-x][0-y]=this.randgen_rot();}
}
else if(this.ids_rny_nxny[0-x][0-y] == null||""+this.ids_rny_nxny[0-x][0-y] == "undefined"){this.ids_rny_nxny[0-x][0-y]="";}
a = this.ids_rny_nxny[0-x][0-y]; b = this.rfl_rny_nxny[0-x][0-y]; c = this.rot_rny_nxny[0-x][0-y]; 
}
else // rny_pxny
{
if(this.ocu_pxny[x] == null||""+this.ocu_pxny[x] == "undefined"){this.ocu_pxny[x]=[];}
if(this.ocu_pxny[x][0-y] == null||""+this.ocu_pxny[x][0-y] == "undefined"){this.ocu_pxny[x][0-y]=false;}
if(this.atr_rny_pxny[x] == null||""+this.atr_rny_pxny[x] == "undefined"){this.atr_rny_pxny[x]=[];} // this direction. 
if(this.ids_rny_pxny[x] == null||""+this.ids_rny_pxny[x] == "undefined"){this.ids_rny_pxny[x]=[];}
if(this.rfl_rny_pxny[x] == null||""+this.rfl_rny_pxny[x] == "undefined"){this.rfl_rny_pxny[x]=[];}
if(this.rot_rny_pxny[x] == null||""+this.rot_rny_pxny[x] == "undefined"){this.rot_rny_pxny[x]=[];}

if(this.atr_rpy_pxny[x] == null||""+this.atr_rpy_pxny[x] == "undefined"){this.atr_rpy_pxny[x]=[];} // o pposite direction
if(this.ids_rpy_pxny[x] == null||""+this.ids_rpy_pxny[x] == "undefined"){this.ids_rpy_pxny[x]=[];}
if(this.rfl_rpy_pxny[x] == null||""+this.rfl_rpy_pxny[x] == "undefined"){this.rfl_rpy_pxny[x]=[];}
if(this.rot_rpy_pxny[x] == null||""+this.rot_rpy_pxny[x] == "undefined"){this.rot_rpy_pxny[x]=[];}

if(this.ocu_pxny[x][0-y] == false)
{
if(this.atr_rny_pxny[x][0-y] == null||""+this.atr_rny_pxny[x][0-y] == "undefined"){this.atr_rny_pxny[x][0-y]=[];} // temporary empty data. 
if(this.ids_rny_pxny[x][0-y] == null||""+this.ids_rny_pxny[x][0-y] == "undefined"){this.ids_rny_pxny[x][0-y]=this.randgen_ids();}
if(this.rfl_rny_pxny[x][0-y] == null||""+this.rfl_rny_pxny[x][0-y] == "undefined"){this.rfl_rny_pxny[x][0-y]=this.randgen_rfl();}
if(this.rot_rny_pxny[x][0-y] == null||""+this.rot_rny_pxny[x][0-y] == "undefined"){this.rot_rny_pxny[x][0-y]=this.randgen_rot();}
}
else if(this.ids_rny_pxny[x][0-y] == null||""+this.ids_rny_pxny[x][0-y] == "undefined"){this.ids_rny_pxny[x][0-y]="";}
a = this.ids_rny_pxny[x][0-y]; b = this.rfl_rny_pxny[x][0-y]; c = this.rot_rny_pxny[x][0-y]; 
if(a != "" && a != null && ""+a != "undefined") // axtor creation process. 
{
create_x = this.half_scew + x*64 + this.offsx; create_y = this.half_sceh + y*64 + this.offsy;  
this.create_actor(a,create_x,create_y,1); this.number_of_objects +=1;
this.actors_rny[x][y] = this.last_created_actor; 
this.actors_rny[x][y].setValue("Object_behav","x",x); this.actors_rny[x][y].setValue("Object_behav","y",y);
if(b == true){this.actors_rny[x][y].growTo(-1,1,0,null);} 
if(c == 90 || c == 270) // rotate actors. 
{
sx = Conte.obdat_size_y(a); sy = Conte.obdat_size_x(a);
this.actors_rny[x][y].spinTo(c,0,null);
if(sx != sy) // move actors into place. 
{
this.actors_rny[x][y].setX(this.actors_rny[x][y].getX() + 32);
this.actors_rny[x][y].setY(this.actors_rny[x][y].getY() - 32);
}
}
else
{
sx = Conte.obdat_size_x(a); sy = Conte.obdat_size_y(a);
}
fx = x + sx - 1; fy = y +1 - sy; 
this.set_ocu_true(fx,x,y,fy);
this.actors_rny[x][y].setValue("Object_behav","fx",fx); this.actors_rny[x][y].setValue("Object_behav","fy",fy);
this.actors_rny[x][y].setValue("Object_behav","sx",sx); this.actors_rny[x][y].setValue("Object_behav","sy",sy);
this.actors_rny[x][y].setValue("Object_behav","render_dir","north");
this.actors_rny[x][y].setY(this.actors_rny[x][y].getY() - (sy -1)* 64); 
this.actors_rpy[x][fy] = this.actors_rny[x][y];
if(fx < 0) // this is for rnx for y < 0;  
{
if(this.atr_rnx_nxny[0-fx] == null ||""+ this.atr_rnx_nxny[0-fx]== "undefined"){this.atr_rnx_nxny[0-fx] = [];} 
if(this.ids_rnx_nxny[0-fx] == null ||""+ this.ids_rnx_nxny[0-fx]== "undefined"){this.ids_rnx_nxny[0-fx] = [];}
if(this.rfl_rnx_nxny[0-fx] == null ||""+ this.rfl_rnx_nxny[0-fx]== "undefined"){this.rfl_rnx_nxny[0-fx] = [];}  
if(this.rot_rnx_nxny[0-fx] == null ||""+ this.rot_rnx_nxny[0-fx]== "undefined"){this.rot_rnx_nxny[0-fx] = [];}  
if(x < 0)
{
if(this.atr_rnx_nxny[0-fx][0-y] == null ||""+ this.atr_rnx_nxny[0-fx][0-x]== "undefined"){this.atr_rnx_nxny[0-fx][0-y] = this.atr_rny_nxny[0-x][0-y];} 
if(this.ids_rnx_nxny[0-fx][0-y] == null ||""+ this.ids_rnx_nxny[0-fx][0-x]== "undefined"){this.atr_rnx_nxny[0-fx][0-y] = this.ids_rny_nxny[0-x][0-y];}
if(this.rfl_rnx_nxny[0-fx][0-y] == null ||""+ this.rfl_rnx_nxny[0-fx][0-x]== "undefined"){this.rfl_rnx_nxny[0-fx][0-y] = this.rfl_rny_nxny[0-x][0-y];}  
if(this.rot_rnx_nxny[0-fx][0-y] == null ||""+ this.rot_rnx_nxny[0-fx][0-x]== "undefined"){this.rot_rnx_nxny[0-fx][0-y] = this.rot_rny_nxny[0-x][0-y];}  
}
else
{
if(this.atr_rnx_nxny[0-fx][0-y] == null ||""+ this.atr_rnx_nxny[0-fx][0-x]== "undefined"){this.atr_rnx_nxny[0-fx][0-y] = this.atr_rny_pxny[x][0-y];} 
if(this.ids_rnx_nxny[0-fx][0-y] == null ||""+ this.ids_rnx_nxny[0-fx][0-x]== "undefined"){this.atr_rnx_nxny[0-fx][0-y] = this.ids_rny_pxny[x][0-y];}
if(this.rfl_rnx_nxny[0-fx][0-y] == null ||""+ this.rfl_rnx_nxny[0-fx][0-x]== "undefined"){this.rfl_rnx_nxny[0-fx][0-y] = this.rfl_rny_pxny[x][0-y];}  
if(this.rot_rnx_nxny[0-fx][0-y] == null ||""+ this.rot_rnx_nxny[0-fx][0-x]== "undefined"){this.rot_rnx_nxny[0-fx][0-y] = this.rot_rny_pxny[x][0-y];}  
}
}
else // rnx_pxny
{
if(this.atr_rnx_pxny[fx] == null ||""+ this.atr_rnx_pxny[fx]== "undefined"){this.atr_rnx_pxny[fx] = [];} 
if(this.ids_rnx_pxny[fx] == null ||""+ this.ids_rnx_pxny[fx]== "undefined"){this.ids_rnx_pxny[fx] = [];}
if(this.rfl_rnx_pxny[fx] == null ||""+ this.rfl_rnx_pxny[fx]== "undefined"){this.rfl_rnx_pxny[fx] = [];}  
if(this.rot_rnx_pxny[fx] == null ||""+ this.rot_rnx_pxny[fx]== "undefined"){this.rot_rnx_pxny[fx] = [];}  

if(x < 0)
{
if(this.atr_rnx_pxny[fx][0-y] == null ||""+ this.atr_rnx_pxny[fx][0-y]== "undefined"){this.atr_rnx_pxny[fx][0-y] = this.atr_rny_nxny[0-x][0-y];} 
if(this.ids_rnx_pxny[fx][0-y] == null ||""+ this.ids_rnx_pxny[fx][0-y]== "undefined"){this.ids_rnx_pxny[fx][0-y] = this.ids_rny_nxny[0-x][0-y];}
if(this.rfl_rnx_pxny[fx][0-y] == null ||""+ this.rfl_rnx_pxny[fx][0-y]== "undefined"){this.rfl_rnx_pxny[fx][0-y] = this.rfl_rny_nxny[0-x][0-y];}  
if(this.rot_rnx_pxny[fx][0-y] == null ||""+ this.rot_rnx_pxny[fx][0-y]== "undefined"){this.rot_rnx_pxny[fx][0-y] = this.rot_rny_nxny[0-x][0-y];}  
}
else
{
if(this.atr_rnx_pxny[fx][0-y] == null ||""+ this.atr_rnx_pxny[fx][0-y]== "undefined"){this.atr_rnx_pxny[fx][0-y] = this.atr_rny_pxny[x][0-y];} 
if(this.ids_rnx_pxny[fx][0-y] == null ||""+ this.ids_rnx_pxny[fx][0-y]== "undefined"){this.ids_rnx_pxny[fx][0-y] = this.ids_rny_pxny[x][0-y];}
if(this.rfl_rnx_pxny[fx][0-y] == null ||""+ this.rfl_rnx_pxny[fx][0-y]== "undefined"){this.rfl_rnx_pxny[fx][0-y] = this.rfl_rny_pxny[x][0-y];}  
if(this.rot_rnx_pxny[fx][0-y] == null ||""+ this.rot_rnx_pxny[fx][0-y]== "undefined"){this.rot_rnx_pxny[fx][0-y] = this.rot_rny_pxny[x][0-y];}  
}
}
if(fy < 0) //with y < 0
{
if(x < 0)
{
if(this.atr_rpy_nxny[0-x]==null||""+ this.atr_rpy_nxny[0-x]=="undefined"){this.atr_rpy_nxny[0-x]=[];} // array refresh; 
if(this.ids_rpy_nxny[0-x]==null||""+ this.ids_rpy_nxny[0-x]=="undefined"){this.ids_rpy_nxny[0-x]=[];}
if(this.rfl_rpy_nxny[0-x]==null||""+ this.rfl_rpy_nxny[0-x]=="undefined"){this.rfl_rpy_nxny[0-x]=[];}
if(this.rot_rpy_nxny[0-x]==null||""+ this.rot_rpy_nxny[0-x]=="undefined"){this.rot_rpy_nxny[0-x]=[];}

if(this.atr_rpy_nxny[0-x][0-fy]==null||""+ this.atr_rpy_nxny[0-x][0-fy]=="undefined"){this.atr_rpy_nxny[0-x][0-fy]=this.atr_rny_nxny[0-x][0-y];} 
if(this.ids_rpy_nxny[0-x][0-fy]==null||""+ this.ids_rpy_nxny[0-x][0-fy]=="undefined"){this.ids_rpy_nxny[0-x][0-fy]=this.ids_rny_nxny[0-x][0-y];}
if(this.rfl_rpy_nxny[0-x][0-fy]==null||""+ this.rfl_rpy_nxny[0-x][0-fy]=="undefined"){this.rfl_rpy_nxny[0-x][0-fy]=this.rfl_rny_nxny[0-x][0-y];}
if(this.rot_rpy_nxny[0-x][0-fy]==null||""+ this.rot_rpy_nxny[0-x][0-fy]=="undefined"){this.rot_rpy_nxny[0-x][0-fy]=this.rot_rny_nxny[0-x][0-y];}
}
else
{
if(this.atr_rpy_pxny[x]==null||""+ this.atr_rpy_pxny[x]=="undefined"){this.atr_rpy_pxny[x]=[];} // array refresh; 
if(this.ids_rpy_pxny[x]==null||""+ this.ids_rpy_pxny[x]=="undefined"){this.ids_rpy_pxny[x]=[];}
if(this.rfl_rpy_pxny[x]==null||""+ this.rfl_rpy_pxny[x]=="undefined"){this.rfl_rpy_pxny[x]=[];}
if(this.rot_rpy_pxny[x]==null||""+ this.rot_rpy_pxny[x]=="undefined"){this.rot_rpy_pxny[x]=[];}

if(this.atr_rpy_pxny[x][0-fy]==null||""+ this.atr_rpy_pxny[x][0-fy]=="undefined"){this.atr_rpy_pxny[x][0-fy]=this.atr_rny_pxny[x][0-y];} // array refresh; 
if(this.ids_rpy_pxny[x][0-fy]==null||""+ this.ids_rpy_pxny[x][0-fy]=="undefined"){this.ids_rpy_pxny[x][0-fy]=this.ids_rny_pxny[x][0-y];}
if(this.rfl_rpy_pxny[x][0-fy]==null||""+ this.rfl_rpy_pxny[x][0-fy]=="undefined"){this.rfl_rpy_pxny[x][0-fy]=this.rfl_rny_pxny[x][0-y];}
if(this.rot_rpy_pxny[x][0-fy]==null||""+ this.rot_rpy_pxny[x][0-fy]=="undefined"){this.rot_rpy_pxny[x][0-fy]=this.rot_rny_pxny[x][0-y];}
}
}
else // for later use. perhaps this will not happen. 
{
if(x < 0)
{
if(this.atr_rpy_nxpy[0-x]==null||""+ this.atr_rpy_nxpy[0-x]=="undefined"){this.atr_rpy_nxpy[0-x]=[];} // array refresh; 
if(this.ids_rpy_nxpy[0-x]==null||""+ this.ids_rpy_nxpy[0-x]=="undefined"){this.ids_rpy_nxpy[0-x]=[];}
if(this.rfl_rpy_nxpy[0-x]==null||""+ this.rfl_rpy_nxpy[0-x]=="undefined"){this.rfl_rpy_nxpy[0-x]=[];}
if(this.rot_rpy_nxpy[0-x]==null||""+ this.rot_rpy_nxpy[0-x]=="undefined"){this.rot_rpy_nxpy[0-x]=[];}

if(this.atr_rpy_nxpy[0-x][fy]==null||""+ this.atr_rpy_nxpy[0-x][fy]=="undefined"){this.atr_rpy_nxpy[0-x][fy]=this.atr_rny_nxny[0-x][0-y];} // array refresh; 
if(this.ids_rpy_nxpy[0-x][fy]==null||""+ this.ids_rpy_nxpy[0-x][fy]=="undefined"){this.ids_rpy_nxpy[0-x][fy]=this.ids_rny_nxny[0-x][0-y];}
if(this.rfl_rpy_nxpy[0-x][fy]==null||""+ this.rfl_rpy_nxpy[0-x][fy]=="undefined"){this.rfl_rpy_nxpy[0-x][fy]=this.rfl_rny_nxny[0-x][0-y];}
if(this.rot_rpy_nxpy[0-x][fy]==null||""+ this.rot_rpy_nxpy[0-x][fy]=="undefined"){this.rot_rpy_nxpy[0-x][fy]=this.rot_rny_nxny[0-x][0-y];}
}
else
{
if(this.atr_rpy_pxpy[x]==null||""+ this.atr_rpy_pxpy[x]=="undefined"){this.atr_rpy_pxpy[x]=[];} // array refresh; 
if(this.ids_rpy_pxpy[x]==null||""+ this.ids_rpy_pxpy[x]=="undefined"){this.ids_rpy_pxpy[x]=[];}
if(this.rfl_rpy_pxpy[x]==null||""+ this.rfl_rpy_pxpy[x]=="undefined"){this.rfl_rpy_pxpy[x]=[];}
if(this.rot_rpy_pxpy[x]==null||""+ this.rot_rpy_pxpy[x]=="undefined"){this.rot_rpy_pxpy[x]=[];}

if(this.atr_rpy_pxpy[x][fy]==null||""+ this.atr_rpy_pxpy[x][fy]=="undefined"){this.atr_rpy_pxpy[x][fy]=this.atr_rny_pxny[x][0-y];} // array refresh; 
if(this.ids_rpy_pxpy[x][fy]==null||""+ this.ids_rpy_pxpy[x][fy]=="undefined"){this.ids_rpy_pxpy[x][fy]=this.ids_rny_pxny[x][0-y];}
if(this.rfl_rpy_pxpy[x][fy]==null||""+ this.rfl_rpy_pxpy[x][fy]=="undefined"){this.rfl_rpy_pxpy[x][fy]=this.rfl_rny_pxny[x][0-y];}
if(this.rot_rpy_pxpy[x][fy]==null||""+ this.rot_rpy_pxpy[x][fy]=="undefined"){this.rot_rpy_pxpy[x][fy]=this.rot_rny_pxny[x][0-y];}
}
}
}
else // when the tiles are empty. where fx and fy are not needed. 
{this.actors_rpy[x][y] = "no actor"; //this.actors_rny[x][y] = "no actor";
if(x < 0)
{
if(this.atr_rnx_nxny[0-x]==null ||""+this.atr_rnx_nxny[0-x]=="undefined"){this.atr_rnx_nxny[0-x]=[];}
if(this.ids_rnx_nxny[0-x]==null||""+this.ids_rnx_nxny[0-x]=="undefined"){this.ids_rnx_nxny[0-x]=[];}
if(this.rfl_rnx_nxny[0-x]==null ||""+this.rfl_rnx_nxny[0-x]=="undefined"){this.rfl_rnx_nxny[0-x]=[];}
if(this.rot_rnx_nxny[0-x]==null||""+this.rot_rnx_nxny[0-x]=="undefined"){this.rot_rnx_nxny[0-x]=[];}
if(this.atr_rpy_nxny[0-x]==null ||""+this.atr_rpy_nxny[0-x]=="undefined"){this.atr_rpy_nxny[0-x]=[];}
if(this.ids_rpy_nxny[0-x]==null||""+this.ids_rpy_nxny[0-x]=="undefined"){this.ids_rpy_nxny[0-x]=[];}
if(this.rfl_rpy_nxny[0-x]==null ||""+this.rfl_rpy_nxny[0-x]=="undefined"){this.rfl_rpy_nxny[0-x]=[];}
if(this.rot_rpy_nxny[0-x]==null||""+this.rot_rpy_nxny[0-x]=="undefined"){this.rot_rpy_nxny[0-x]=[];}
if(this.ids_rnx_nxny[0-x][0-y]==null ||""+this.ids_rnx_nxny[0-x][0-y]=="undefined"){this.ids_rnx_nxny[0-x][0-y]="";}
if(this.ids_rpy_nxny[0-x][0-y]==null ||""+this.ids_rpy_nxny[0-x][0-y]=="undefined"){this.ids_rpy_nxny[0-x][0-y]="";}
}
else
{
if(this.atr_rnx_pxny[x]==null ||""+this.atr_rnx_pxny[x]=="undefined"){this.atr_rnx_pxny[x]=[];}
if(this.ids_rnx_pxny[x]==null ||""+this.ids_rnx_pxny[x]=="undefined"){this.ids_rnx_pxny[x]=[];}
if(this.rfl_rnx_pxny[x]==null ||""+this.rfl_rnx_pxny[x]=="undefined"){this.rfl_rnx_pxny[x]=[];}
if(this.rot_rnx_pxny[x]==null ||""+this.rot_rnx_pxny[x]=="undefined"){this.rot_rnx_pxny[x]=[];}

if(this.atr_rpy_pxny[x]==null ||""+this.atr_rpy_pxny[x]=="undefined"){this.atr_rpy_pxny[x]=[];}
if(this.ids_rpy_pxny[x]==null ||""+this.ids_rpy_pxny[x]=="undefined"){this.ids_rpy_pxny[x]=[];}
if(this.rfl_rpy_pxny[x]==null ||""+this.rfl_rpy_pxny[x]=="undefined"){this.rfl_rpy_pxny[x]=[];}
if(this.rot_rpy_pxny[x]==null ||""+this.rot_rpy_pxny[x]=="undefined"){this.rot_rpy_pxny[x]=[];}

if(this.ids_rnx_pxny[x][0-y]==null ||""+this.ids_rnx_pxny[x][0-y]=="undefined"){this.ids_rnx_pxny[x][0-y]="";}
if(this.ids_rpy_pxny[x][0-y]==null ||""+this.ids_rpy_pxny[x][0-y]=="undefined"){this.ids_rpy_pxny[x][0-y]="";}
}
}
x = x+1; 
}
}
else // if (y >= 0)
{
while(x < xmax)
{
if(this.actors_rny[x] == null ||""+this.actors_rny[x]=="undefined"){this.actors_rny[x] =[];}
if(this.actors_rpy[x] == null ||""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x] =[];}
if(x < 0)
{
if(this.ocu_nxpy[0-x]==null ||""+this.ocu_nxpy[0-x]=="undefined"){this.ocu_nxpy[0-x]=[];}
if(this.ocu_nxpy[0-x][y]==null||""+this.ocu_nxpy[0-x][y]=="undefined"){this.ocu_nxpy[0-x][y]=false;}
if(this.atr_rny_nxpy[0-x]==null||""+this.atr_rny_nxpy[0-x]=="undefined"){this.atr_rny_nxpy[0-x]=[];}
if(this.ids_rny_nxpy[0-x]==null||""+this.ids_rny_nxpy[0-x]=="undefined"){this.ids_rny_nxpy[0-x]=[];}
if(this.rfl_rny_nxpy[0-x]==null||""+this.rfl_rny_nxpy[0-x]=="undefined"){this.rfl_rny_nxpy[0-x]=[];}
if(this.rot_rny_nxpy[0-x]==null||""+this.rot_rny_nxpy[0-x]=="undefined"){this.rot_rny_nxpy[0-x]=[];}
if(this.ocu_nxpy[0-x][y]==false)
{
if(this.atr_rny_nxpy[0-x][y]==null||""+this.atr_rny_nxpy[0-x][y]=="undefined"){this.atr_rny_nxpy[0-x][y]=[];}
if(this.ids_rny_nxpy[0-x][y]==null||""+this.ids_rny_nxpy[0-x][y]=="undefined"){this.ids_rny_nxpy[0-x][y]=this.randgen_ids();}
if(this.rfl_rny_nxpy[0-x][y]==null||""+this.rfl_rny_nxpy[0-x][y]=="undefined"){this.rfl_rny_nxpy[0-x][y]=this.randgen_rfl();}
if(this.rot_rny_nxpy[0-x][y]==null||""+this.rot_rny_nxpy[0-x][y]=="undefined"){this.rot_rny_nxpy[0-x][y]=this.randgen_rot();}
}
else if(this.ids_rny_nxpy[0-x][y]==null||""+this.ids_rny_nxpy[0-x][y]=="undefined"){this.ids_rny_nxpy[0-x][y] ="";}
a = this.ids_rny_nxpy[0-x][y]; b = this.rfl_rny_nxpy[0-x][y]; c = this.rot_rny_nxpy[0-x][y];
}
else
{
if(this.ocu_pxpy[x]==null ||""+this.ocu_pxpy[x]=="undefined"){this.ocu_pxpy[x]=[];}
if(this.ocu_pxpy[x][y]==null ||""+this.ocu_pxpy[x][y]=="undefined"){this.ocu_pxpy[x][y]=false;}
if(this.atr_rny_pxpy[x]==null||""+this.atr_rny_pxpy[x]=="undefined"){this.atr_rny_pxpy[x]=[];}
if(this.ids_rny_pxpy[x]==null||""+this.ids_rny_pxpy[x]=="undefined"){this.ids_rny_pxpy[x]=[];}
if(this.rfl_rny_pxpy[x]==null||""+this.rfl_rny_pxpy[x]=="undefined"){this.rfl_rny_pxpy[x]=[];}
if(this.rot_rny_pxpy[x]==null||""+this.rot_rny_pxpy[x]=="undefined"){this.rot_rny_pxpy[x]=[];}
if(this.ocu_pxpy[x][y]==false)
{
if(this.atr_rny_pxpy[x][y]==null||""+this.atr_rny_pxpy[x][y]=="undefined"){this.atr_rny_pxpy[x][y]=[];}
if(this.ids_rny_pxpy[x][y]==null||""+this.ids_rny_pxpy[x][y]=="undefined"){this.ids_rny_pxpy[x][y]=this.randgen_ids();}
if(this.rfl_rny_pxpy[x][y]==null||""+this.rfl_rny_pxpy[x][y]=="undefined"){this.rfl_rny_pxpy[x][y]=this.randgen_rfl();}
if(this.rot_rny_pxpy[x][y]==null||""+this.rot_rny_pxpy[x][y]=="undefined"){this.rot_rny_pxpy[x][y]=this.randgen_rot();}
}
else if(this.ids_rny_pxpy[x][y]==null||""+this.ids_rny_pxpy[x][y]=="undefined"){this.ids_rny_pxpy[x][y]="";}
a = this.ids_rny_pxpy[x][y]; b = this.rfl_rny_pxpy[x][y]; c = this.rot_rny_pxpy[x][y];
}
if(a != "" && a != null && ""+a != "undefined")
{
create_x = this.half_scew + x*64 + this.offsx; create_y = this.half_sceh + y*64 + this.offsy;
this.create_actor(a,create_x,create_y,1);this.number_of_objects +=1;
this.actors_rny[x][y] = this.last_created_actor;
this.actors_rny[x][y].setValue("Object_behav","x",x); this.actors_rny[x][y].setValue("Object_behav","y",y);
if(b){this.actors_rny[x][y].growTo(-1,1,0,null);}
if(c == 90 || c == 270) // rotate 90 or 270. 
{
sx = Conte.obdat_size_y(a); sy = Conte.obdat_size_x(a);
this.actors_rny[x][y].spinTo(c,0,null);
if(sx != sy){this.actors_rny[x][y].setX(this.actors_rny[x][y].getX() + 32); this.actors_rny[x][y].setY(this.actors_rny[x][y].getY() - 32); }
}
else{sx = Conte.obdat_size_x(a); sy = Conte.obdat_size_y(a);}
this.actors_rny[x][y].setY(this.actors_rny[x][y].getY() - (sy - 1)* 64);
fx = x + sx -1; fy = y - sy +1; 
this.set_ocu_true(fx,x,y,fy);
this.actors_rny[x][y].setValue("Object_behav","fx",fx); this.actors_rny[x][y].setValue("Object_behav","fy",fy);
this.actors_rny[x][y].setValue("Object_behav","sx",sx); this.actors_rny[x][y].setValue("Object_behav","sy",sy);
this.actors_rny[x][y].setValue("Object_behav","render_dir","north");
this.actors_rpy[x][fy] = this.actors_rny[x][y];
if(fx < 0)
{
if(this.atr_rnx_nxpy[0-fx]==null||""+this.atr_rnx_nxpy[0-fx]=="undefined"){this.atr_rnx_nxpy[0-fx]=[];}
if(this.ids_rnx_nxpy[0-fx]==null||""+this.ids_rnx_nxpy[0-fx]=="undefined"){this.ids_rnx_nxpy[0-fx]=[];}
if(this.rfl_rnx_nxpy[0-fx]==null||""+this.rfl_rnx_nxpy[0-fx]=="undefined"){this.rfl_rnx_nxpy[0-fx]=[];}
if(this.rot_rnx_nxpy[0-fx]==null||""+this.rot_rnx_nxpy[0-fx]=="undefined"){this.rot_rnx_nxpy[0-fx]=[];}
if(x < 0)
{
if(this.atr_rnx_nxpy[0-fx][y]==null||""+this.atr_rnx_nxpy[0-fx][y]=="undefined"){this.atr_rnx_nxpy[0-fx][y]=this.atr_rny_nxpy[0-x][y];}
if(this.ids_rnx_nxpy[0-fx][y]==null||""+this.ids_rnx_nxpy[0-fx][y]=="undefined"){this.ids_rnx_nxpy[0-fx][y]=this.ids_rny_nxpy[0-x][y];}
if(this.rfl_rnx_nxpy[0-fx][y]==null||""+this.rfl_rnx_nxpy[0-fx][y]=="undefined"){this.rfl_rnx_nxpy[0-fx][y]=this.rfl_rny_nxpy[0-x][y];}
if(this.rot_rnx_nxpy[0-fx][y]==null||""+this.rot_rnx_nxpy[0-fx][y]=="undefined"){this.rot_rnx_nxpy[0-fx][y]=this.rot_rny_nxpy[0-x][y];}
}
else
{
if(this.atr_rnx_nxpy[0-fx][y]==null||""+this.atr_rnx_nxpy[0-fx][y]=="undefined"){this.atr_rnx_nxpy[0-fx][y]=this.atr_rny_pxpy[x][y];}
if(this.ids_rnx_nxpy[0-fx][y]==null||""+this.ids_rnx_nxpy[0-fx][y]=="undefined"){this.ids_rnx_nxpy[0-fx][y]=this.ids_rny_pxpy[x][y];}
if(this.rfl_rnx_nxpy[0-fx][y]==null||""+this.rfl_rnx_nxpy[0-fx][y]=="undefined"){this.rfl_rnx_nxpy[0-fx][y]=this.rfl_rny_pxpy[x][y];}
if(this.rot_rnx_nxpy[0-fx][y]==null||""+this.rot_rnx_nxpy[0-fx][y]=="undefined"){this.rot_rnx_nxpy[0-fx][y]=this.rot_rny_pxpy[x][y];}
}
}
else
{
if(this.atr_rnx_pxpy[fx]==null||""+this.atr_rnx_pxpy[fx]=="undefined"){this.atr_rnx_pxpy[fx]=[];}
if(this.ids_rnx_pxpy[fx]==null||""+this.ids_rnx_pxpy[fx]=="undefined"){this.ids_rnx_pxpy[fx]=[];}
if(this.rfl_rnx_pxpy[fx]==null||""+this.rfl_rnx_pxpy[fx]=="undefined"){this.rfl_rnx_pxpy[fx]=[];}
if(this.rot_rnx_pxpy[fx]==null||""+this.rot_rnx_pxpy[fx]=="undefined"){this.rot_rnx_pxpy[fx]=[];}
if(x < 0)
{
if(this.atr_rnx_pxpy[fx][y]==null||""+this.atr_rnx_pxpy[fx][y]=="undefined"){this.atr_rnx_pxpy[fx][y]=this.atr_rny_nxpy[0-x][y];}
if(this.ids_rnx_pxpy[fx][y]==null||""+this.ids_rnx_pxpy[fx][y]=="undefined"){this.ids_rnx_pxpy[fx][y]=this.ids_rny_nxpy[0-x][y];}
if(this.rfl_rnx_pxpy[fx][y]==null||""+this.rfl_rnx_pxpy[fx][y]=="undefined"){this.rfl_rnx_pxpy[fx][y]=this.rfl_rny_nxpy[0-x][y];}
if(this.rot_rnx_pxpy[fx][y]==null||""+this.rot_rnx_pxpy[fx][y]=="undefined"){this.rot_rnx_pxpy[fx][y]=this.rot_rny_nxpy[0-x][y];}
}
else
{
if(this.atr_rnx_pxpy[fx][y]==null||""+this.atr_rnx_pxpy[fx][y]=="undefined"){this.atr_rnx_pxpy[fx][y]=this.atr_rny_pxpy[x][y];}
if(this.ids_rnx_pxpy[fx][y]==null||""+this.ids_rnx_pxpy[fx][y]=="undefined"){this.ids_rnx_pxpy[fx][y]=this.ids_rny_pxpy[x][y];}
if(this.rfl_rnx_pxpy[fx][y]==null||""+this.rfl_rnx_pxpy[fx][y]=="undefined"){this.rfl_rnx_pxpy[fx][y]=this.rfl_rny_pxpy[x][y];}
if(this.rot_rnx_pxpy[fx][y]==null||""+this.rot_rnx_pxpy[fx][y]=="undefined"){this.rot_rnx_pxpy[fx][y]=this.rot_rny_pxpy[x][y];}
}
}

if(fy < 0)// for rpy with y > =0 but fy < 0
{
if(x < 0)
{
if(this.atr_rpy_nxny[0-x]==null|| ""+this.atr_rpy_nxny[0-x]=="undefined"){this.atr_rpy_nxny[0-x]=[];}
if(this.ids_rpy_nxny[0-x]==null||""+this.ids_rpy_nxny[0-x]=="undefined"){this.ids_rpy_nxny[0-x]=[];}
if(this.rfl_rpy_nxny[0-x]==null|| ""+this.rfl_rpy_nxny[0-x]=="undefined"){this.rfl_rpy_nxny[0-x]=[];}
if(this.rot_rpy_nxny[0-x]==null||""+this.rot_rpy_nxny[0-x]=="undefined"){this.rot_rpy_nxny[0-x]=[];}
if(this.atr_rpy_nxny[0-x][0-fy]==null || ""+this.atr_rpy_nxny[0-x][0-fy]=="undefined"){this.atr_rpy_nxny[0-x][0-fy]=this.atr_rny_nxpy[0-x][y];}
if(this.ids_rpy_nxny[0-x][0-fy]==null || ""+this.ids_rpy_nxny[0-x][0-fy]=="undefined"){this.ids_rpy_nxny[0-x][0-fy]=this.ids_rny_nxpy[0-x][y];}
if(this.rfl_rpy_nxny[0-x][0-fy]==null || ""+this.rfl_rpy_nxny[0-x][0-fy]=="undefined"){this.rfl_rpy_nxny[0-x][0-fy]=this.rfl_rny_nxpy[0-x][y];}
if(this.rot_rpy_nxny[0-x][0-fy]==null || ""+this.rot_rpy_nxny[0-x][0-fy]=="undefined"){this.rot_rpy_nxny[0-x][0-fy]=this.rot_rny_nxpy[0-x][y];}
}
else
{
if(this.atr_rpy_pxny[x]==null || ""+this.atr_rpy_pxny[x]=="undefined"){this.atr_rpy_pxny[x]=[];}
if(this.ids_rpy_pxny[x]==null || ""+this.ids_rpy_pxny[x]=="undefined"){this.ids_rpy_pxny[x]=[];}
if(this.rfl_rpy_pxny[x]==null || ""+this.rfl_rpy_pxny[x]=="undefined"){this.rfl_rpy_pxny[x]=[];}
if(this.rot_rpy_pxny[x]==null || ""+this.rot_rpy_pxny[x]=="undefined"){this.rot_rpy_pxny[x]=[];}

if(this.atr_rpy_pxny[x][0-fy]==null || ""+this.atr_rpy_pxny[x][0-fy]=="undefined"){this.atr_rpy_pxny[x][0-fy]=this.atr_rny_pxpy[x][y];}
if(this.ids_rpy_pxny[x][0-fy]==null || ""+this.ids_rpy_pxny[x][0-fy]=="undefined"){this.ids_rpy_pxny[x][0-fy]=this.ids_rny_pxpy[x][y];}
if(this.rfl_rpy_pxny[x][0-fy]==null || ""+this.rfl_rpy_pxny[x][0-fy]=="undefined"){this.rfl_rpy_pxny[x][0-fy]=this.rfl_rny_pxpy[x][y];}
if(this.rot_rpy_pxny[x][0-fy]==null || ""+this.rot_rpy_pxny[x][0-fy]=="undefined"){this.rot_rpy_pxny[x][0-fy]=this.rot_rny_pxpy[x][y];}
}
}
else
{
if(x < 0)
{
if(this.atr_rpy_nxpy[0-x]==null||""+this.atr_rpy_nxpy[0-x]=="undefined"){this.atr_rpy_nxpy[0-x]=[];}
if(this.ids_rpy_nxpy[0-x]==null||""+this.ids_rpy_nxpy[0-x]=="undefined"){this.ids_rpy_nxpy[0-x]=[];}
if(this.rfl_rpy_nxpy[0-x]==null || ""+this.rfl_rpy_nxpy[0-x]=="undefined"){this.rfl_rpy_nxpy[0-x]=[];}
if(this.rot_rpy_nxpy[0-x]==null||""+this.rot_rpy_nxpy[0-x]=="undefined"){this.rot_rpy_nxpy[0-x]=[];}

if(this.atr_rpy_nxpy[0-x][fy]==null || ""+this.atr_rpy_nxpy[0-x][fy]=="undefined"){this.atr_rpy_nxpy[0-x][fy]=this.atr_rny_nxpy[0-x][y];}
if(this.ids_rpy_nxpy[0-x][fy]==null || ""+this.ids_rpy_nxpy[0-x][fy]=="undefined"){this.ids_rpy_nxpy[0-x][fy]=this.ids_rny_nxpy[0-x][y];}
if(this.rfl_rpy_nxpy[0-x][fy]==null || ""+this.rfl_rpy_nxpy[0-x][fy]=="undefined"){this.rfl_rpy_nxpy[0-x][fy]=this.rfl_rny_nxpy[0-x][y];}
if(this.rot_rpy_nxpy[0-x][fy]==null || ""+this.rot_rpy_nxpy[0-x][fy]=="undefined"){this.rot_rpy_nxpy[0-x][fy]=this.rot_rny_nxpy[0-x][y];}
}
else
{
if(this.atr_rpy_pxpy[x]==null || ""+this.atr_rpy_pxpy[x]=="undefined"){this.atr_rpy_pxpy[x]=[];}
if(this.ids_rpy_pxpy[x]==null || ""+this.ids_rpy_pxpy[x]=="undefined"){this.ids_rpy_pxpy[x]=[];}
if(this.rfl_rpy_pxpy[x]==null || ""+this.rfl_rpy_pxpy[x]=="undefined"){this.rfl_rpy_pxpy[x]=[];}
if(this.rot_rpy_pxpy[x]==null || ""+this.rot_rpy_pxpy[x]=="undefined"){this.rot_rpy_pxpy[x]=[];}

if(this.atr_rpy_pxpy[x][fy]==null || ""+this.atr_rpy_pxpy[x][fy]=="undefined"){this.atr_rpy_pxpy[x][fy]=this.atr_rny_pxpy[x][y];}
if(this.ids_rpy_pxpy[x][fy]==null || ""+this.ids_rpy_pxpy[x][fy]=="undefined"){this.ids_rpy_pxpy[x][fy]=this.ids_rny_pxpy[x][y];}
if(this.rfl_rpy_pxpy[x][fy]==null || ""+this.rfl_rpy_pxpy[x][fy]=="undefined"){this.rfl_rpy_pxpy[x][fy]=this.rfl_rny_pxpy[x][y];}
if(this.rot_rpy_pxpy[x][fy]==null || ""+this.rot_rpy_pxpy[x][fy]=="undefined"){this.rot_rpy_pxpy[x][fy]=this.rot_rny_pxpy[x][y];}
}
}
}
else
{this.actors_rpy[x][y] = "no actor"; //this.actors_rny[x][y] = "no actor";
if(x < 0)
if(this.atr_rnx_nxpy[0-x]==null ||""+this.atr_rnx_nxpy[0-x]=="undefined"){this.atr_rnx_nxpy[0-x]=[];}
if(this.ids_rnx_nxpy[0-x]==null||""+this.ids_rnx_nxpy[0-x]=="undefined"){this.ids_rnx_nxpy[0-x]=[];}
if(this.rfl_rnx_nxpy[0-x]==null ||""+this.rfl_rnx_nxpy[0-x]=="undefined"){this.rfl_rnx_nxpy[0-x]=[];}
if(this.rot_rnx_nxpy[0-x]==null||""+this.rot_rnx_nxpy[0-x]=="undefined"){this.rot_rnx_nxpy[0-x]=[];}
if(this.atr_rpy_nxpy[0-x]==null ||""+this.atr_rpy_nxpy[0-x]=="undefined"){this.atr_rpy_nxpy[0-x]=[];}
if(this.ids_rpy_nxpy[0-x]==null||""+this.ids_rpy_nxpy[0-x]=="undefined"){this.ids_rpy_nxpy[0-x]=[];}
if(this.rfl_rpy_nxpy[0-x]==null ||""+this.rfl_rpy_nxpy[0-x]=="undefined"){this.rfl_rpy_nxpy[0-x]=[];}
if(this.rot_rpy_nxpy[0-x]==null||""+this.rot_rpy_nxpy[0-x]=="undefined"){this.rot_rpy_nxpy[0-x]=[];}

if(this.ids_rnx_nxpy[0-x][y]==null ||""+this.ids_rnx_nxpy[0-x][y]=="undefined"){this.ids_rnx_nxpy[0-x][y]="";}
if(this.ids_rpy_nxpy[0-x][y]==null ||""+this.ids_rpy_nxpy[0-x][y]=="undefined"){this.ids_rpy_nxpy[0-x][y]="";} 
}
else
if(this.atr_rnx_pxpy[x]==null ||""+this.atr_rnx_pxpy[x]=="undefined"){this.atr_rnx_pxpy[x]=[];}
if(this.ids_rnx_pxpy[x]==null ||""+this.ids_rnx_pxpy[x]=="undefined"){this.ids_rnx_pxpy[x]=[];}
if(this.rfl_rnx_pxpy[x]==null ||""+this.rfl_rnx_pxpy[x]=="undefined"){this.rfl_rnx_pxpy[x]=[];}
if(this.rot_rnx_pxpy[x]==null ||""+this.rot_rnx_pxpy[x]=="undefined"){this.rot_rnx_pxpy[x]=[];}

if(this.atr_rpy_pxpy[x]==null ||""+this.atr_rpy_pxpy[x]=="undefined"){this.atr_rpy_pxpy[x]=[];}
if(this.ids_rpy_pxpy[x]==null ||""+this.ids_rpy_pxpy[x]=="undefined"){this.ids_rpy_pxpy[x]=[];}
if(this.rfl_rpy_pxpy[x]==null ||""+this.rfl_rpy_pxpy[x]=="undefined"){this.rfl_rpy_pxpy[x]=[];}
if(this.rot_rpy_pxpy[x]==null ||""+this.rot_rpy_pxpy[x]=="undefined"){this.rot_rpy_pxpy[x]=[];}

if(this.ids_rnx_pxpy[x][y]==null ||""+this.ids_rnx_pxpy[x][y]=="undefined"){this.ids_rnx_pxpy[x][y]="";}
if(this.ids_rpy_pxpy[x][y]==null ||""+this.ids_rpy_pxpy[x][y]=="undefined"){this.ids_rpy_pxpy[x][y]="";} 
}
}
x = x+1; 
}
}
public function rpx(x:Int, ymax:Int, ymin:Int):Void // here we use rpy. since rpx uses the same rendering point in 
{ var y:Int = ymin; var a:String=""; var b:Bool= false, c:Float=0; var create_x:Float, create_y:Float; var fx:Int, fy:Int; var dd:Float, sx:Int=1, sy:Int=1; 
  if(this.actors_rpy[x]==null||""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x]=[];}
  if(this.actors_rny[x]==null||""+this.actors_rny[x]=="undefined"){this.actors_rny[x]=[];}
if(x < 0) // rpx for x < 0
{
while(y < ymax)
{
if(y < 0)
{
}
else
{
}
y = y+1; 
}
}
else // rpx for x >=0 
{
while(y < ymax)
{
if(y < 0)
{
}
else
{
}
y = y+1; 
}
}
}

public function rpy(y:Int, xmax:Int, xmin:Int):Void // render below the lower screen boundary - Default initialisation. 
var x:Int = xmin; var a:String, b:Bool, c:Float, d:Float; var create_x:Float, create_y:Float; 
var fx:Int, fy:Int, sx:Int=0, sy:Int=0; // for opposite renfering direction. 
if(y < 0)
{
while(x < xmax)
{
if(this.actors_rpy[x]==null ||""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x]=[];}
if(this.actors_rny[x]==null ||""+this.actors_rny[x]=="undefined"){this.actors_rny[x]=[];}
if(x < 0)
{
if(this.ocu_nxny[0-x]==null || ""+this.ocu_nxny[0-x]=="undenfined"){this.ocu_nxny[0-x]=[];}
if(this.ocu_nxny[0-x][0-y]==null || ""+this.ocu_nxny[0-x][0-y]=="undenfined"){this.ocu_nxny[0-x][0-y]=false;}
if(this.atr_rpy_nxny[0-x]==null||""+this.atr_rpy_nxny[0-x]=="undefined"){this.atr_rpy_nxny[0-x]=[];}
if(this.ids_rpy_nxny[0-x]==null||""+this.ids_rpy_nxny[0-x]=="undefined"){this.ids_rpy_nxny[0-x]=[];}
if(this.rfl_rpy_nxny[0-x]== null ||""+this.rfl_rpy_nxny[0-x]=="undefined"){this.rfl_rpy_nxny[0-x]=[];}
if(this.rot_rpy_nxny[0-x]==null||""+this.rot_rpy_nxny[0-x]=="undefined"){this.rot_rpy_nxny[0-x]=[];}

if(this.ocu_nxny[0-x][0-y] == false)
{
if(this.atr_rpy_nxny[0-x][0-y] == null ||""+this.atr_rpy_nxny[0-x][0-y]=="undefined"){this.atr_rpy_nxny[0-x][0-y]=[];}
if(this.ids_rpy_nxny[0-x][0-y] == null ||""+this.ids_rpy_nxny[0-x][0-y]=="undefined"){this.ids_rpy_nxny[0-x][0-y]=this.randgen_ids();}
if(this.rfl_rpy_nxny[0-x][0-y] == null ||""+this.rfl_rpy_nxny[0-x][0-y]=="undefined"){this.rfl_rpy_nxny[0-x][0-y]=this.randgen_rfl();}
if(this.rot_rpy_nxny[0-x][0-y] == null ||""+this.rot_rpy_nxny[0-x][0-y]=="undefined"){this.rot_rpy_nxny[0-x][0-y]=this.randgen_rot();}
}
else if(this.ids_rpy_nxny[0-x][0-y] == null ||""+this.ids_rpy_nxny[0-x][0-y]=="undefined"){this.ids_rpy_nxny[0-x][0-y]="";}
a = this.ids_rpy_nxny[0-x][0-y]; b = this.rfl_rpy_nxny[0-x][0-y]; c = this.rot_rpy_nxny[0-x][0-y];
}
else
{
if(this.ocu_pxny[x]==null || ""+this.ocu_pxny[x]=="undenfined"){this.ocu_pxny[x]=[];}
if(this.ocu_pxny[x][0-y]==null||""+this.ocu_pxny[x][0-y]=="undenfined"){this.ocu_pxny[x][0-y]=false;}

if(this.atr_rpy_pxny[x] == null ||""+this.atr_rpy_pxny[x]=="undefined"){this.atr_rpy_pxny[x]=[];}
if(this.ids_rpy_pxny[x] == null ||""+this.ids_rpy_pxny[x]=="undefined"){this.ids_rpy_pxny[x]=[];}
if(this.rfl_rpy_pxny[x] == null ||""+this.rfl_rpy_pxny[x]=="undefined"){this.rfl_rpy_pxny[x]=[];}
if(this.rot_rpy_pxny[x] == null ||""+this.rot_rpy_pxny[x]=="undefined"){this.rot_rpy_pxny[x]=[];}

if(this.ocu_pxny[x][0-y] == false)
{
if(this.atr_rpy_pxny[x][0-y]==null||""+this.atr_rpy_pxny[x][0-y]=="undefined"){this.atr_rpy_pxny[x][0-y]=[];}
if(this.ids_rpy_pxny[x][0-y] == null ||""+this.ids_rpy_pxny[x][0-y]=="undefined"){this.ids_rpy_pxny[x][0-y]=this.randgen_ids();}
if(this.rfl_rpy_pxny[x][0-y] == null ||""+this.rfl_rpy_pxny[x][0-y]=="undefined"){this.rfl_rpy_pxny[x][0-y]=this.randgen_rfl();}
if(this.rot_rpy_pxny[x][0-y] == null ||""+this.rot_rpy_pxny[x][0-y]=="undefined"){this.rot_rpy_pxny[x][0-y]=this.randgen_rot();}
}
else if(this.ids_rpy_pxny[x][0-y] == null ||""+this.ids_rpy_pxny[x][0-y]=="undefined"){this.ids_rpy_pxny[x][0-y]="";}
a = this.ids_rpy_pxny[x][0-y]; b = this.rfl_rpy_pxny[x][0-y]; c = this.rot_rpy_pxny[x][0-y];
}
if(a != "" && ""+a != "undefined" && a != null)
{
create_x = this.half_scew + x*64 + this.offsx; create_y = this.half_sceh + y*64 + this.offsy;
this.create_actor(a,create_x,create_y,1);this.number_of_objects +=1;
this.actors_rpy[x][y]=this.last_created_actor;
if(b){this.actors_rpy[x][y].growTo(-1,1,0,null);}
if(c == 90 || c == 270)
{
sx = Conte.obdat_size_y(a); sy = Conte.obdat_size_x(a);
this.actors_rpy[x][y].spinTo(c,0,null);
if(sx != sy){this.actors_rpy[x][y].setX(this.actors_rpy[x][y].getX() + (sx-sy)*32); this.actors_rpy[x][y].setY(this.actors_rpy[x][y].getY() - (sx-sy)*32);}
}
else
{
sx = Conte.obdat_size_x(a); sy = Conte.obdat_size_y(a);
}
fx = x + sx-1; fy = y + sy -1;
this.actors_rpy[x][y].setValue("Object_behav","fx",fx); this.actors_rpy[x][y].setValue("Object_behav","fy",fy);
this.actors_rpy[x][y].setValue("Object_behav","sx",sx); this.actors_rpy[x][y].setValue("Object_behav","sy",sy);
this.actors_rpy[x][y].setValue("Object_behav","render_dir","south");
this.actors_rny[x][fy] = this.actors_rpy[x][y]; 
this.set_ocu_true(fx,x,fy,y);
if(fx < 0)
{
if(this.atr_rnx_nxny[0-fx]==null||""+this.atr_rnx_nxny[0-fx]=="undefined"){this.atr_rnx_nxny[0-fx]=[];}
if(this.ids_rnx_nxny[0-fx]==null||""+this.ids_rnx_nxny[0-fx]=="undefined"){this.ids_rnx_nxny[0-fx]=[];}
if(this.rfl_rnx_nxny[0-fx]==null ||""+this.rfl_rnx_nxny[0-fx]=="undefined"){this.rfl_rnx_nxny[0-fx]=[];}
if(this.rot_rnx_nxny[0-fx]==null ||""+this.rot_rnx_nxny[0-fx]=="undefined"){this.rot_rnx_nxny[0-fx]=[];}
if(x < 0)
{
if(this.atr_rnx_nxny[0-fx][0-y]== null ||""+this.atr_rnx_nxny[0-fx][0-y]=="undefined"){this.atr_rnx_nxny[0-fx][0-y]=this.atr_rpy_nxny[0-x][0-y];}
if(this.ids_rnx_nxny[0-fx][0-y]== null ||""+this.ids_rnx_nxny[0-fx][0-y]=="undefined"){this.ids_rnx_nxny[0-fx][0-y]=this.ids_rpy_nxny[0-x][0-y];}
if(this.rfl_rnx_nxny[0-fx][0-y]== null ||""+this.rfl_rnx_nxny[0-fx][0-y]=="undefined"){this.rfl_rnx_nxny[0-fx][0-y]=this.rfl_rpy_nxny[0-x][0-y];}
if(this.rot_rnx_nxny[0-fx][0-y]== null ||""+this.rot_rnx_nxny[0-fx][0-y]=="undefined"){this.rot_rnx_nxny[0-fx][0-y]=this.rot_rpy_nxny[0-x][0-y];}
}
else
{
if(this.atr_rnx_nxny[0-fx][0-y]== null ||""+this.atr_rnx_nxny[0-fx][0-y]=="undefined"){this.atr_rnx_nxny[0-fx][0-y]=this.atr_rpy_pxny[x][0-y];}
if(this.ids_rnx_nxny[0-fx][0-y]== null ||""+this.ids_rnx_nxny[0-fx][0-y]=="undefined"){this.ids_rnx_nxny[0-fx][0-y]=this.ids_rpy_pxny[x][0-y];}
if(this.rfl_rnx_nxny[0-fx][0-y]== null ||""+this.rfl_rnx_nxny[0-fx][0-y]=="undefined"){this.rfl_rnx_nxny[0-fx][0-y]=this.rfl_rpy_pxny[x][0-y];}
if(this.rot_rnx_nxny[0-fx][0-y]== null ||""+this.rot_rnx_nxny[0-fx][0-y]=="undefined"){this.rot_rnx_nxny[0-fx][0-y]=this.rot_rpy_pxny[x][0-y];}
}
}
else
{
if(this.atr_rnx_pxny[fx]== null ||""+this.atr_rnx_pxny[fx]=="undefined"){this.atr_rnx_pxny[fx]=[];}
if(this.ids_rnx_pxny[fx]== null ||""+this.ids_rnx_pxny[fx]=="undefined"){this.ids_rnx_pxny[fx]=[];}
if(this.rfl_rnx_pxny[fx]== null ||""+this.rfl_rnx_pxny[fx]=="undefined"){this.rfl_rnx_pxny[fx]=[];}
if(this.rot_rnx_pxny[fx]== null ||""+this.rot_rnx_pxny[fx]=="undefined"){this.rot_rnx_pxny[fx]=[];}
if(x < 0)
{
if(this.atr_rnx_pxny[fx][0-y]== null ||""+this.atr_rnx_pxny[fx][0-y]=="undefined"){this.atr_rnx_pxny[fx][0-y]=this.atr_rpy_nxny[0-x][0-y];}
if(this.ids_rnx_pxny[fx][0-y]== null ||""+this.ids_rnx_pxny[fx][0-y]=="undefined"){this.ids_rnx_pxny[fx][0-y]=this.ids_rpy_nxny[0-x][0-y];}
if(this.rfl_rnx_pxny[fx][0-y]== null ||""+this.rfl_rnx_pxny[fx][0-y]=="undefined"){this.rfl_rnx_pxny[fx][0-y]=this.rfl_rpy_nxny[0-x][0-y];}
if(this.rot_rnx_pxny[fx][0-y]== null ||""+this.rot_rnx_pxny[fx][0-y]=="undefined"){this.rot_rnx_pxny[fx][0-y]=this.rot_rpy_nxny[0-x][0-y];}
}
else
{
if(this.atr_rnx_pxny[fx][0-y]== null ||""+this.atr_rnx_pxny[fx][0-y]=="undefined"){this.atr_rnx_pxny[fx][0-y]=this.atr_rpy_pxny[x][0-y];}
if(this.ids_rnx_pxny[fx][0-y]== null ||""+this.ids_rnx_pxny[fx][0-y]=="undefined"){this.ids_rnx_pxny[fx][0-y]=this.ids_rpy_pxny[x][0-y];}
if(this.rfl_rnx_pxny[fx][0-y]== null ||""+this.rfl_rnx_pxny[fx][0-y]=="undefined"){this.rfl_rnx_pxny[fx][0-y]=this.rfl_rpy_pxny[x][0-y];}
if(this.rot_rnx_pxny[fx][0-y]== null ||""+this.rot_rnx_pxny[fx][0-y]=="undefined"){this.rot_rnx_pxny[fx][0-y]=this.rot_rpy_pxny[x][0-y];}
}
}

if (fy < 0) // for rny with y < 0 
{
if(x < 0)
{
if(this.atr_rny_nxny[0-x]==null||""+this.atr_rny_nxny[0-x]=="undefined"){this.atr_rny_nxny[0-x]=[];}
if(this.ids_rny_nxny[0-x]==null||""+this.ids_rny_nxny[0-x]=="undefined"){this.ids_rny_nxny[0-x]=[];}
if(this.rfl_rny_nxny[0-x]==null||""+this.rfl_rny_nxny[0-x]=="undefined"){this.rfl_rny_nxny[0-x]=[];}
if(this.rot_rny_nxny[0-x]==null||""+this.rot_rny_nxny[0-x]=="undefined"){this.rot_rny_nxny[0-x]=[];}

if(this.atr_rny_nxny[0-x][0-fy]==null||""+this.atr_rny_nxny[0-x][0-fy]=="undefined"){this.atr_rny_nxny[0-x][0-fy]=this.atr_rpy_nxny[0-x][0-y];}
if(this.ids_rny_nxny[0-x][0-fy]==null||""+this.ids_rny_nxny[0-x][0-fy]=="undefined"){this.ids_rny_nxny[0-x][0-fy]=this.ids_rpy_nxny[0-x][0-y];}
if(this.rfl_rny_nxny[0-x][0-fy]==null||""+this.rfl_rny_nxny[0-x][0-fy]=="undefined"){this.rfl_rny_nxny[0-x][0-fy]=this.rfl_rpy_nxny[0-x][0-y];}
if(this.rot_rny_nxny[0-x][0-fy]==null||""+this.rot_rny_nxny[0-x][0-fy]=="undefined"){this.rot_rny_nxny[0-x][0-fy]=this.rot_rpy_nxny[0-x][0-y];}
}
else
{
if(this.atr_rny_pxny[x]==null||""+this.atr_rny_pxny[x]=="undefined"){this.atr_rny_pxny[x]=[];}
if(this.ids_rny_pxny[x]==null||""+this.ids_rny_pxny[x]=="undefined"){this.ids_rny_pxny[x]=[];}
if(this.rfl_rny_pxny[x]==null||""+this.rfl_rny_pxny[x]=="undefined"){this.rfl_rny_pxny[x]=[];}
if(this.rot_rny_pxny[x]==null||""+this.rot_rny_pxny[x]=="undefined"){this.rot_rny_pxny[x]=[];}

if(this.atr_rny_pxny[x][0-fy]==null||""+this.atr_rny_pxny[x][0-fy]=="undefined"){this.atr_rny_pxny[x][0-fy]=this.atr_rpy_pxny[x][0-y];}
if(this.ids_rny_pxny[x][0-fy]==null||""+this.ids_rny_pxny[x][0-fy]=="undefined"){this.ids_rny_pxny[x][0-fy]=this.ids_rpy_pxny[x][0-y];}
if(this.rfl_rny_pxny[x][0-fy]==null||""+this.rfl_rny_pxny[x][0-fy]=="undefined"){this.rfl_rny_pxny[x][0-fy]=this.rfl_rpy_pxny[x][0-y];}
if(this.rot_rny_pxny[x][0-fy]==null||""+this.rot_rny_pxny[x][0-fy]=="undefined"){this.rot_rny_pxny[x][0-fy]=this.rot_rpy_pxny[x][0-y];}
}
}
else
{
if(x < 0)
{
if(this.atr_rny_nxpy[0-x]==null||""+this.atr_rny_nxpy[0-x]=="undefined"){this.atr_rny_nxpy[0-x]=[];}
if(this.ids_rny_nxpy[0-x]==null||""+this.ids_rny_nxpy[0-x]=="undefined"){this.ids_rny_nxpy[0-x]=[];}
if(this.rfl_rny_nxpy[0-x]==null||""+this.rfl_rny_nxpy[0-x]=="undefined"){this.rfl_rny_nxpy[0-x]=[];}
if(this.rot_rny_nxpy[0-x]==null||""+this.rot_rny_nxpy[0-x]=="undefined"){this.rot_rny_nxpy[0-x]=[];}

if(this.atr_rny_nxpy[0-x][fy]==null||""+this.atr_rny_nxpy[0-x][fy]=="undefined"){this.atr_rny_nxpy[0-x][fy]=this.atr_rpy_nxny[0-x][0-y];}
if(this.ids_rny_nxpy[0-x][fy]==null||""+this.ids_rny_nxpy[0-x][fy]=="undefined"){this.ids_rny_nxpy[0-x][fy]=this.ids_rpy_nxny[0-x][0-y];}
if(this.rfl_rny_nxpy[0-x][fy]==null||""+this.rfl_rny_nxpy[0-x][fy]=="undefined"){this.rfl_rny_nxpy[0-x][fy]=this.rfl_rpy_nxny[0-x][0-y];}
if(this.rot_rny_nxpy[0-x][fy]==null||""+this.rot_rny_nxpy[0-x][fy]=="undefined"){this.rot_rny_nxpy[0-x][fy]=this.rot_rpy_nxny[0-x][0-y];}
}
else
{
if(this.atr_rny_pxpy[x]==null||""+this.atr_rny_pxpy[x]=="undefined"){this.atr_rny_pxpy[x]=[];}
if(this.ids_rny_pxpy[x]==null||""+this.ids_rny_pxpy[x]=="undefined"){this.ids_rny_pxpy[x]=[];}
if(this.rfl_rny_pxpy[x]==null||""+this.rfl_rny_pxpy[x]=="undefined"){this.rfl_rny_pxpy[x]=[];}
if(this.rot_rny_pxpy[x]==null||""+this.rot_rny_pxpy[x]=="undefined"){this.rot_rny_pxpy[x]=[];}

if(this.atr_rny_pxpy[x][fy]==null||""+this.atr_rny_pxpy[x][fy]=="undefined"){this.atr_rny_pxpy[x][fy]=this.atr_rpy_pxny[x][0-y];}
if(this.ids_rny_pxpy[x][fy]==null||""+this.ids_rny_pxpy[x][fy]=="undefined"){this.ids_rny_pxpy[x][fy]=this.ids_rpy_pxny[x][0-y];}
if(this.rfl_rny_pxpy[x][fy]==null||""+this.rfl_rny_pxpy[x][fy]=="undefined"){this.rfl_rny_pxpy[x][fy]=this.rfl_rpy_pxny[x][0-y];}
if(this.rot_rny_pxpy[x][fy]==null||""+this.rot_rny_pxpy[x][fy]=="undefined"){this.rot_rny_pxpy[x][fy]=this.rot_rpy_pxny[x][0-y];}
}
}
}
else // when the tiles are empty. where fx and fy are not needed. 
{ this.actors_rpy[x][y] = "no actor"; //this.actors_rny[x][y] = "no actor";
if(x < 0)
if(this.atr_rnx_nxny[0-x]==null ||""+this.atr_rnx_nxny[0-x]=="undefined"){this.atr_rnx_nxny[0-x]=[];}
if(this.ids_rnx_nxny[0-x]==null||""+this.ids_rnx_nxny[0-x]=="undefined"){this.ids_rnx_nxny[0-x]=[];}
if(this.rfl_rnx_nxny[0-x]==null ||""+this.rfl_rnx_nxny[0-x]=="undefined"){this.rfl_rnx_nxny[0-x]=[];}
if(this.rot_rnx_nxny[0-x]==null||""+this.rot_rnx_nxny[0-x]=="undefined"){this.rot_rnx_nxny[0-x]=[];}
if(this.atr_rny_nxny[0-x]==null ||""+this.atr_rny_nxny[0-x]=="undefined"){this.atr_rny_nxny[0-x]=[];}
if(this.ids_rny_nxny[0-x]==null||""+this.ids_rny_nxny[0-x]=="undefined"){this.ids_rny_nxny[0-x]=[];}
if(this.rfl_rny_nxny[0-x]==null ||""+this.rfl_rny_nxny[0-x]=="undefined"){this.rfl_rny_nxny[0-x]=[];}
if(this.rot_rny_nxny[0-x]==null||""+this.rot_rny_nxny[0-x]=="undefined"){this.rot_rny_nxny[0-x]=[];}
if(this.ids_rnx_nxny[0-x][0-y]==null ||""+this.ids_rnx_nxny[0-x][0-y]=="undefined"){this.ids_rnx_nxny[0-x][0-y]="";}
if(this.ids_rny_nxny[0-x][0-y]==null ||""+this.ids_rny_nxny[0-x][0-y]=="undefined"){this.ids_rny_nxny[0-x][0-y]="";} 
}
else
if(this.atr_rnx_pxny[x]==null ||""+this.atr_rnx_pxny[x]=="undefined"){this.atr_rnx_pxny[x]=[];}
if(this.ids_rnx_pxny[x]==null ||""+this.ids_rnx_pxny[x]=="undefined"){this.ids_rnx_pxny[x]=[];}
if(this.rfl_rnx_pxny[x]==null ||""+this.rfl_rnx_pxny[x]=="undefined"){this.rfl_rnx_pxny[x]=[];}
if(this.rot_rnx_pxny[x]==null ||""+this.rot_rnx_pxny[x]=="undefined"){this.rot_rnx_pxny[x]=[];}

if(this.atr_rny_pxny[x]==null ||""+this.atr_rny_pxny[x]=="undefined"){this.atr_rny_pxny[x]=[];}
if(this.ids_rny_pxny[x]==null ||""+this.ids_rny_pxny[x]=="undefined"){this.ids_rny_pxny[x]=[];}
if(this.rfl_rny_pxny[x]==null ||""+this.rfl_rny_pxny[x]=="undefined"){this.rfl_rny_pxny[x]=[];}
if(this.rot_rny_pxny[x]==null ||""+this.rot_rny_pxny[x]=="undefined"){this.rot_rny_pxny[x]=[];}

if(this.ids_rnx_pxny[x][0-y]==null ||""+this.ids_rnx_pxny[x][0-x]=="undefined"){this.ids_rnx_pxny[x][0-x]="";}
if(this.ids_rny_pxny[x][0-y]==null ||""+this.ids_rny_pxny[x][0-x]=="undefined"){this.ids_rny_pxny[x][0-x]="";}
}
}
x = x+1; 
}
}
else // for all the positive Y. 
while(x < xmax)
if(this.actors_rpy[x]==null ||""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x]=[];}
if(this.actors_rny[x]==null ||""+this.actors_rny[x]=="undefined"){this.actors_rny[x]=[];}
if(x < 0)
{
if(this.ocu_nxpy[0-x]== null ||""+this.ocu_nxpy[0-x]=="undefined"){this.ocu_nxpy[0-x]=[];}
if(this.ocu_nxpy[0-x][y] == null ||""+this.ocu_nxpy[0-x][y]=="undefined"){this.ocu_nxpy[0-x][y]= false;}

if(this.atr_rpy_nxpy[0-x]==null||""+this.atr_rpy_nxpy[0-x]=="undefined"){this.atr_rpy_nxpy[0-x]=[];}
if(this.ids_rpy_nxpy[0-x]==null||""+this.ids_rpy_nxpy[0-x]=="undefined"){this.ids_rpy_nxpy[0-x]=[];}
if(this.rfl_rpy_nxpy[0-x]==null||""+this.rfl_rpy_nxpy[0-x]=="undefined"){this.rfl_rpy_nxpy[0-x]=[];}
if(this.rot_rpy_nxpy[0-x]==null||""+this.rot_rpy_nxpy[0-x]=="undefined"){this.rot_rpy_nxpy[0-x]=[];}

if(this.ocu_nxpy[0-x][y] == false)
{
if(this.atr_rpy_nxpy[0-x][y]==null||""+this.atr_rpy_nxpy[0-x][y]=="undefined"){this.atr_rpy_nxpy[0-x][y]=[];}
if(this.ids_rpy_nxpy[0-x][y]==null||""+this.ids_rpy_nxpy[0-x][y]=="undefined"){this.ids_rpy_nxpy[0-x][y]=this.randgen_ids();}
if(this.rfl_rpy_nxpy[0-x][y]==null||""+this.rfl_rpy_nxpy[0-x][y]=="undefined"){this.rfl_rpy_nxpy[0-x][y]=this.randgen_rfl();}
if(this.rot_rpy_nxpy[0-x][y]==null||""+this.rot_rpy_nxpy[0-x][y]=="undefined"){this.rot_rpy_nxpy[0-x][y]=this.randgen_rot();}
}
else if(this.ids_rpy_nxpy[0-x][y]==null||""+this.ids_rpy_nxpy[0-x][y]=="undefined"){this.ids_rpy_nxpy[0-x][y]="";}
a = this.ids_rpy_nxpy[0-x][y]; b = this.rfl_rpy_nxpy[0-x][y]; c = this.rot_rpy_nxpy[0-x][y]; 
}
else // undergoing redo. 
{
if(this.ocu_pxpy[x]==null||""+this.ocu_pxpy[x]=="undefined"){this.ocu_pxpy[x]=[];}
if(this.ocu_pxpy[x][y]==null||""+this.ocu_pxpy[x][y]=="undefined"){this.ocu_pxpy[x][y]=false;}

if(this.atr_rpy_pxpy[x]==null ||""+this.atr_rpy_pxpy[x]=="undefined"){this.atr_rpy_pxpy[x]=[];}
if(this.ids_rpy_pxpy[x]==null ||""+this.ids_rpy_pxpy[x]=="undefined"){this.ids_rpy_pxpy[x]=[];}
if(this.rfl_rpy_pxpy[x]==null ||""+this.rfl_rpy_pxpy[x]=="undefined"){this.rfl_rpy_pxpy[x]=[];}
if(this.rot_rpy_pxpy[x]==null ||""+this.rot_rpy_pxpy[x]=="undefined"){this.rot_rpy_pxpy[x]=[];}
if(this.ocu_pxpy[x][y]==false)
{
if(this.atr_rpy_pxpy[x][y]==null ||""+this.atr_rpy_pxpy[x][y]=="undefined"){this.atr_rpy_pxpy[x][y]=[];}
if(this.ids_rpy_pxpy[x][y]==null ||""+this.ids_rpy_pxpy[x][y]=="undefined"){this.ids_rpy_pxpy[x][y]=this.randgen_ids();}
if(this.rfl_rpy_pxpy[x][y]==null ||""+this.rfl_rpy_pxpy[x][y]=="undefined"){this.rfl_rpy_pxpy[x][y]=this.randgen_rfl();}
if(this.rot_rpy_pxpy[x][y]==null ||""+this.rot_rpy_pxpy[x][y]=="undefined"){this.rot_rpy_pxpy[x][y]=this.randgen_rot();}
}
else if(this.ids_rpy_pxpy[x][y]==null ||""+this.ids_rpy_pxpy[x][y]=="undefined"){this.ids_rpy_pxpy[x][y]="";}
a = this.ids_rpy_pxpy[x][y]; b = this.rfl_rpy_pxpy[x][y]; c = this.rot_rpy_pxpy[x][y];  
}
if(a != null && ""+a != "undefined" && a != "")
{
create_x = this.half_scew + x*64 + this.offsx; create_y = this.half_sceh + y*64 + this.offsy;
this.create_actor(a,create_x,create_y,1);this.number_of_objects +=1; this.actors_rpy[x][y]=this.last_created_actor;
if(b){this.actors_rpy[x][y].growTo(-1,1,0,null);}
if(c == 90 || c == 270)
{
sx = Conte.obdat_size_y(a); sy = Conte.obdat_size_x(a);
this.actors_rpy[x][y].spinTo(c,0,null);
if(sx != sy){this.actors_rpy[x][y].setX(this.actors_rpy[x][y].getX() + (sx-sy)*32); this.actors_rpy[x][y].setY(this.actors_rpy[x][y].getY() - (sx-sy)*32);}
}
else{sx = Conte.obdat_size_x(a); sy = Conte.obdat_size_y(a); this.actors_rpy[x][y].spinTo(c,0,null);}
fx = x + sx-1; fy = y + sy -1;
this.actors_rpy[x][y].setValue("Object_behav","fx",fx); this.actors_rpy[x][y].setValue("Object_behav","fy",fy);
this.actors_rpy[x][y].setValue("Object_behav","sx",sx); this.actors_rpy[x][y].setValue("Object_behav","sy",sy);
this.actors_rpy[x][y].setValue("Object_behav","render_dir","south");
this.actors_rny[x][fy] = this.actors_rpy[x][y]; 
this.set_ocu_true(fx,x,fy,y);
if(fx < 0) // for render rnx. 
{
if(this.atr_rnx_nxpy[0-fx]==null || this.atr_rnx_nxpy[0-fx]=="undefined"){this.atr_rnx_nxpy[0-fx]=[];}
if(this.ids_rnx_nxpy[0-fx]==null || this.ids_rnx_nxpy[0-fx]=="undefined"){this.ids_rnx_nxpy[0-fx]=[];}
if(this.rfl_rnx_nxpy[0-fx]==null || this.rfl_rnx_nxpy[0-fx]=="undefined"){this.rfl_rnx_nxpy[0-fx]=[];}
if(this.rot_rnx_nxpy[0-fx]==null || this.rot_rnx_nxpy[0-fx]=="undefined"){this.rot_rnx_nxpy[0-fx]=[];}
if(x < 0)
{
if(this.atr_rnx_nxpy[0-fx][y]==null || this.atr_rnx_nxpy[0-fx][y]=="undefined"){this.atr_rnx_nxpy[0-fx][y]= this.atr_rpy_nxpy[0-x][y];}
if(this.ids_rnx_nxpy[0-fx][y]==null || this.ids_rnx_nxpy[0-fx][y]=="undefined"){this.ids_rnx_nxpy[0-fx][y]= this.ids_rpy_nxpy[0-x][y];}
if(this.rfl_rnx_nxpy[0-fx][y]==null || this.rfl_rnx_nxpy[0-fx][y]=="undefined"){this.rfl_rnx_nxpy[0-fx][y]= this.rfl_rpy_nxpy[0-x][y];}
if(this.rot_rnx_nxpy[0-fx][y]==null || this.rot_rnx_nxpy[0-fx][y]=="undefined"){this.rot_rnx_nxpy[0-fx][y]= this.rot_rpy_nxpy[0-x][y];}
}
else
{
if(this.atr_rnx_nxpy[0-fx][y]==null || this.atr_rnx_nxpy[0-fx][y]=="undefined"){this.atr_rnx_nxpy[0-fx][y]= this.atr_rpy_pxpy[x][y];}
if(this.ids_rnx_nxpy[0-fx][y]==null || this.ids_rnx_nxpy[0-fx][y]=="undefined"){this.ids_rnx_nxpy[0-fx][y]= this.ids_rpy_pxpy[x][y];}
if(this.rfl_rnx_nxpy[0-fx][y]==null || this.rfl_rnx_nxpy[0-fx][y]=="undefined"){this.rfl_rnx_nxpy[0-fx][y]= this.rfl_rpy_pxpy[x][y];}
if(this.rot_rnx_nxpy[0-fx][y]==null || this.rot_rnx_nxpy[0-fx][y]=="undefined"){this.rot_rnx_nxpy[0-fx][y]= this.rot_rpy_pxpy[x][y];}
}
}
else
{
if(this.atr_rnx_pxpy[fx]==null || this.atr_rnx_pxpy[fx]=="undefined"){this.atr_rnx_pxpy[fx]=[];}
if(this.ids_rnx_pxpy[fx]==null || this.ids_rnx_pxpy[fx]=="undefined"){this.ids_rnx_pxpy[fx]=[];}
if(this.rfl_rnx_pxpy[fx]==null || this.rfl_rnx_pxpy[fx]=="undefined"){this.rfl_rnx_pxpy[fx]=[];}
if(this.rot_rnx_pxpy[fx]==null || this.rot_rnx_pxpy[fx]=="undefined"){this.rot_rnx_pxpy[fx]=[];}
if(x < 0)
{
if(this.atr_rnx_pxpy[fx][y]==null || this.atr_rnx_pxpy[fx][y]=="undefined"){this.atr_rnx_pxpy[fx][y]= this.atr_rpy_nxpy[0-x][y];}
if(this.ids_rnx_pxpy[fx][y]==null || this.ids_rnx_pxpy[fx][y]=="undefined"){this.ids_rnx_pxpy[fx][y]= this.ids_rpy_nxpy[0-x][y];}
if(this.rfl_rnx_pxpy[fx][y]==null || this.rfl_rnx_pxpy[fx][y]=="undefined"){this.rfl_rnx_pxpy[fx][y]= this.rfl_rpy_nxpy[0-x][y];}
if(this.rot_rnx_pxpy[fx][y]==null || this.rot_rnx_pxpy[fx][y]=="undefined"){this.rot_rnx_pxpy[fx][y]= this.rot_rpy_nxpy[0-x][y];}
}
else
{
if(this.atr_rnx_pxpy[fx][y]==null || this.atr_rnx_pxpy[fx][y]=="undefined"){this.atr_rnx_pxpy[fx][y]= this.atr_rpy_pxpy[x][y];}
if(this.ids_rnx_pxpy[fx][y]==null || this.ids_rnx_pxpy[fx][y]=="undefined"){this.ids_rnx_pxpy[fx][y]= this.ids_rpy_pxpy[x][y];}
if(this.rfl_rnx_pxpy[fx][y]==null || this.rfl_rnx_pxpy[fx][y]=="undefined"){this.rfl_rnx_pxpy[fx][y]= this.rfl_rpy_pxpy[x][y];}
if(this.rot_rnx_pxpy[fx][y]==null || this.rot_rnx_pxpy[fx][y]=="undefined"){this.rot_rnx_pxpy[fx][y]= this.rot_rpy_pxpy[x][y];}
}
}

if(fy < 0)
{
if(x < 0)
{
if(this.atr_rny_nxny[0-x]==null ||""+this.atr_rny_nxny[0-x]=="undefined"){this.atr_rny_nxny[0-x]=[];}
if(this.ids_rny_nxny[0-x]==null ||""+this.ids_rny_nxny[0-x]=="undefined"){this.ids_rny_nxny[0-x]=[];}
if(this.rfl_rny_nxny[0-x]==null ||""+this.rfl_rny_nxny[0-x]=="undefined"){this.rfl_rny_nxny[0-x]=[];}
if(this.rot_rny_nxny[0-x]==null ||""+this.rot_rny_nxny[0-x]=="undefined"){this.rot_rny_nxny[0-x]=[];}

if(this.atr_rny_nxny[0-x][0-fy]==null ||""+this.atr_rny_nxny[0-x][0-fy]=="undefined"){this.atr_rny_nxny[0-x][0-fy]=this.atr_rpy_nxpy[0-x][y];}
if(this.ids_rny_nxny[0-x][0-fy]==null ||""+this.ids_rny_nxny[0-x][0-fy]=="undefined"){this.ids_rny_nxny[0-x][0-fy]=this.ids_rpy_nxpy[0-x][y];}
if(this.rfl_rny_nxny[0-x][0-fy]==null ||""+this.rfl_rny_nxny[0-x][0-fy]=="undefined"){this.rfl_rny_nxny[0-x][0-fy]=this.rfl_rpy_nxpy[0-x][y];}
if(this.rot_rny_nxny[0-x][0-fy]==null ||""+this.rot_rny_nxny[0-x][0-fy]=="undefined"){this.rot_rny_nxny[0-x][0-fy]=this.rot_rpy_nxpy[0-x][y];}
}
else
{
if(this.atr_rny_pxny[x]==null ||""+this.atr_rny_pxny[x]=="undefined"){this.atr_rny_pxny[x]=[];}
if(this.ids_rny_pxny[x]==null ||""+this.ids_rny_pxny[x]=="undefined"){this.ids_rny_pxny[x]=[];}
if(this.rfl_rny_pxny[x]==null ||""+this.rfl_rny_pxny[x]=="undefined"){this.rfl_rny_pxny[x]=[];}
if(this.rot_rny_pxny[x]==null ||""+this.rot_rny_pxny[x]=="undefined"){this.rot_rny_pxny[x]=[];}

if(this.atr_rny_pxny[x][0-fy]==null ||""+this.atr_rny_pxny[x][0-fy]=="undefined"){this.atr_rny_pxny[x][0-fy]=this.atr_rpy_pxpy[x][y];}
if(this.ids_rny_pxny[x][0-fy]==null ||""+this.ids_rny_pxny[x][0-fy]=="undefined"){this.ids_rny_pxny[x][0-fy]=this.ids_rpy_pxpy[x][y];}
if(this.rfl_rny_pxny[x][0-fy]==null ||""+this.rfl_rny_pxny[x][0-fy]=="undefined"){this.rfl_rny_pxny[x][0-fy]=this.rfl_rpy_pxpy[x][y];}
if(this.rot_rny_pxny[x][0-fy]==null ||""+this.rot_rny_pxny[x][0-fy]=="undefined"){this.rot_rny_pxny[x][0-fy]=this.rot_rpy_pxpy[x][y];}
}
}
else
{
if(x < 0)
if(this.atr_rny_nxpy[0-x]==null ||""+this.atr_rny_nxpy[0-x]=="undefined"){this.atr_rny_nxpy[0-x]=[];}
if(this.ids_rny_nxpy[0-x]==null ||""+this.ids_rny_nxpy[0-x]=="undefined"){this.ids_rny_nxpy[0-x]=[];}
if(this.rfl_rny_nxpy[0-x]==null ||""+this.rfl_rny_nxpy[0-x]=="undefined"){this.rfl_rny_nxpy[0-x]=[];}
if(this.rot_rny_nxpy[0-x]==null ||""+this.rot_rny_nxpy[0-x]=="undefined"){this.rot_rny_nxpy[0-x]=[];}

if(this.atr_rny_nxpy[0-x][fy]==null ||""+this.atr_rny_nxpy[0-x][fy]=="undefined"){this.atr_rny_nxpy[0-x][fy]=this.atr_rpy_nxpy[0-x][y];}
if(this.ids_rny_nxpy[0-x][fy]==null ||""+this.ids_rny_nxpy[0-x][fy]=="undefined"){this.ids_rny_nxpy[0-x][fy]=this.ids_rpy_nxpy[0-x][y];}
if(this.rfl_rny_nxpy[0-x][fy]==null ||""+this.rfl_rny_nxpy[0-x][fy]=="undefined"){this.rfl_rny_nxpy[0-x][fy]=this.rfl_rpy_nxpy[0-x][y];}
if(this.rot_rny_nxpy[0-x][fy]==null ||""+this.rot_rny_nxpy[0-x][fy]=="undefined"){this.rot_rny_nxpy[0-x][fy]=this.rot_rpy_nxpy[0-x][y];}
else
if(this.atr_rny_pxpy[x]==null ||""+this.atr_rny_pxpy[x]=="undefined"){this.atr_rny_pxpy[x]=[];}
if(this.ids_rny_pxpy[x]==null ||""+this.ids_rny_pxpy[x]=="undefined"){this.ids_rny_pxpy[x]=[];}
if(this.rfl_rny_pxpy[x]==null ||""+this.rfl_rny_pxpy[x]=="undefined"){this.rfl_rny_pxpy[x]=[];}
if(this.rot_rny_pxpy[x]==null ||""+this.rot_rny_pxpy[x]=="undefined"){this.rot_rny_pxpy[x]=[];}

if(this.atr_rny_pxpy[x][fy]==null ||""+this.atr_rny_pxpy[x][fy]=="undefined"){this.atr_rny_pxpy[x][fy]=this.atr_rpy_pxpy[x][y];}
if(this.ids_rny_pxpy[x][fy]==null ||""+this.ids_rny_pxpy[x][fy]=="undefined"){this.ids_rny_pxpy[x][fy]=this.ids_rpy_pxpy[x][y];}
if(this.rfl_rny_pxpy[x][fy]==null ||""+this.rfl_rny_pxpy[x][fy]=="undefined"){this.rfl_rny_pxpy[x][fy]=this.rfl_rpy_pxpy[x][y];}
if(this.rot_rny_pxpy[x][fy]==null ||""+this.rot_rny_pxpy[x][fy]=="undefined"){this.rot_rny_pxpy[x][fy]=this.rot_rpy_pxpy[x][y];}
}
}
else
{
this.actors_rpy[x][y] = "no actor"; //this.actors_rny[x][y] = "no actor";
if(x < 0)
{   
if(this.atr_rnx_nxpy[0-x]==null ||""+this.atr_rnx_nxpy[0-x]=="undefined"){this.atr_rnx_nxpy[0-x]=[];}
if(this.ids_rnx_nxpy[0-x]==null ||""+this.ids_rnx_nxpy[0-x]=="undefined"){this.ids_rnx_nxpy[0-x]=[];}
if(this.rfl_rnx_nxpy[0-x]==null ||""+this.rfl_rnx_nxpy[0-x]=="undefined"){this.rfl_rnx_nxpy[0-x]=[];}
if(this.rot_rnx_nxpy[0-x]==null ||""+this.rot_rnx_nxpy[0-x]=="undefined"){this.rot_rnx_nxpy[0-x]=[];}
if(this.atr_rny_nxpy[0-x]==null ||""+this.atr_rny_nxpy[0-x]=="undefined"){this.atr_rny_nxpy[0-x]=[];}
if(this.ids_rny_nxpy[0-x]==null ||""+this.ids_rny_nxpy[0-x]=="undefined"){this.ids_rny_nxpy[0-x]=[];}
if(this.rfl_rny_nxpy[0-x]==null ||""+this.rfl_rny_nxpy[0-x]=="undefined"){this.rfl_rny_nxpy[0-x]=[];}
if(this.rot_rny_nxpy[0-x]==null ||""+this.rot_rny_nxpy[0-x]=="undefined"){this.rot_rny_nxpy[0-x]=[];}

if(this.ids_rnx_nxpy[0-x][y]==null ||""+this.ids_rnx_nxpy[0-x][y]=="undefined"){this.ids_rnx_nxpy[0-x][y]="";}
if(this.ids_rny_nxpy[0-x][y]==null ||""+this.ids_rny_nxpy[0-x][y]=="undefined"){this.ids_rny_nxpy[0-x][y]="";} 
else
if(this.atr_rnx_pxpy[x]==null ||""+this.atr_rnx_pxpy[x]=="undefined"){this.atr_rnx_pxpy[x]=[];}
if(this.ids_rnx_pxpy[x]==null ||""+this.ids_rnx_pxpy[x]=="undefined"){this.ids_rnx_pxpy[x]=[];}
if(this.rfl_rnx_pxpy[x]==null ||""+this.rfl_rnx_pxpy[x]=="undefined"){this.rfl_rnx_pxpy[x]=[];}
if(this.rot_rnx_pxpy[x]==null ||""+this.rot_rnx_pxpy[x]=="undefined"){this.rot_rnx_pxpy[x]=[];}

if(this.atr_rny_pxpy[x]==null ||""+this.atr_rny_pxpy[x]=="undefined"){this.atr_rny_pxpy[x]=[];}
if(this.ids_rny_pxpy[x]==null ||""+this.ids_rny_pxpy[x]=="undefined"){this.ids_rny_pxpy[x]=[];}
if(this.rfl_rny_pxpy[x]==null ||""+this.rfl_rny_pxpy[x]=="undefined"){this.rfl_rny_pxpy[x]=[];}
if(this.rot_rny_pxpy[x]==null ||""+this.rot_rny_pxpy[x]=="undefined"){this.rot_rny_pxpy[x]=[];}

if(this.ids_rnx_pxpy[x][y]==null ||""+this.ids_rnx_pxpy[x][y]=="undefined"){this.ids_rnx_pxpy[x][y]="";}
if(this.ids_rny_pxpy[x][y]==null ||""+this.ids_rny_pxpy[x][y]=="undefined"){this.ids_rny_pxpy[x][y]="";}
x = x+1; 
}
}
public function remo_rnx(){}
public function remo_rny(y:Int, xmax:Int, xmin:Int):Void
{
var x = xmin; 
while (x <= xmax)
{
if(this.actors_rny[x] == null || ""+this.actors_rny[x]=="undefined"){this.actors_rny[x]=[]; this.undefined_kill_list = x;}
if(this.actors_rny[x][y] != null && ""+this.actors_rny[x][y] !="undefined" && this.actors_rny[x][y] != "no actor")
{
Script.recycleActor(this.actors_rny[x][y]);
this.actors_rny[x][y] = "no actor"; 
this.number_of_objects -=1; 
} x=x+1;
}
}
public function remo_rpx(x:Int, ymax:Int, ymin:Int):Void
{
var y:Int = ymin; 
if(this.actors_rpy[x]==null || ""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x]=[];} // remove lines. 
while(y <= ymax)
{
if(this.actors_rpy[x][y] != null && ""+this.actors_rpy[x][y] != "undefined" && this.actors_rpy[x][y] != "no actor")
{
Script.recycleActor(this.actors_rpy[x][y]);
this.actors_rpy[x][y] = "no actor"; 
this.number_of_objects -=1; 
}
y = y+1; 
}
}
public function remo_rpy(y:Int, xmax:Int, xmin:Int):Void
{
var x:Int = xmin; 
while(x <= xmax)
if(this.actors_rpy[x] == null || ""+this.actors_rpy[x] == "undefined") {this.actors_rpy[x] = []; this.undefined_kill_list = x;} 
if(this.actors_rpy[x][y] != null && ""+this.actors_rpy[x][y] != "undefined" && this.actors_rpy[x][y] != "no actor")
{
Script.recycleActor(this.actors_rpy[x][y]);
this.actors_rpy[x][y] = "no actor"; 
this.number_of_objects -=1; 
} x = x+1; 
}
}

public function set_ocu_true(xmax:Int, xmin:Int, ymax:Int, ymin:Int):Void
{
var x:Int = xmin; var y:Int = ymin; 
while(x <= xmax)
{
y = ymin; if(x <= 0)
{
if(this.ocu_nxny[0-x] == null || ""+ this.ocu_nxny[0-x] == "undefined"){this.ocu_nxny[0-x]=[];}
if(this.ocu_nxpy[0-x] == null || ""+ this.ocu_nxpy[0-x] == "undefined"){this.ocu_nxpy[0-x]=[];}
while(y <= ymax)
{
if(y<0){ this.ocu_nxny[0-x][0-y] = true;}
else{ this.ocu_nxpy[0-x][y] = true;}
y = y+1; 
}
}
else
{
if(this.ocu_pxny[x] == null || ""+ this.ocu_pxny[x] == "undefined"){this.ocu_pxny[x]=[];}
if(this.ocu_pxpy[x] == null || ""+ this.ocu_pxpy[x] == "undefined"){this.ocu_pxpy[x]=[];}
while(y <= ymax)
{
if(y <= 0){this.ocu_pxny[x][0-y] = true;}
else{ this.ocu_pxpy[x][y] = true;}
y = y+1; 
}
}
x = x+1; 
}
}

public function shift_nx():Void
{
}

public function shift_ny():Void // while moving the camera upwards
{ for(actorInGroup in cast(Script.getActorGroup(6), Group).list)
{
if(actorInGroup != null && !actorInGroup.dead && !actorInGroup.recycled){
actorInGroup.setY(actorInGroup.getY() - this.half_sceh);
}
}
/*
var xmin:Int = this.initile_xmin; var xmax:Int = this.initile_xmax; 
var ymin:Int = this.initile_ymin; var ymax:Int = this.initile_ymax; 
var x:Int = xmin, y:Int = ymin; 

while(x <= xmax)
{ //if(this.actors_rpy[x]==null||""+this.actors_rpy[x]=="undefined"){this.actors_rpy[x] =[];}
y=ymin; while(y <= ymax)
{
if(this.actors_rpy[x][y] != null && ""+this.actors_rpy[x][y] != "undefined" && this.actors_rpy[x][y] != "no actor"){this.actors_rpy[x][y].setY(this.actors_rpy[x][y].getY() - this.half_sceh);}
y =  y+1; 
}
x = x+1; 
} */
}

public function shift_px():Void
{
}

public function shift_py():Void
{
for(actorInGroup in cast(Script.getActorGroup(6), Group).list)
{
if(actorInGroup != null && !actorInGroup.dead && !actorInGroup.recycled){
actorInGroup.setY(actorInGroup.getY() + this.half_sceh);
}
}
/*
var xmin:Int = this.initile_xmin; var xmax:Int = this.initile_xmax; 
var ymin:Int = this.initile_ymin; var ymax:Int = this.initile_ymax; 
var x:Int = xmin, y:Int = ymin; 

while(x < xmax)
{
y=0; while(y < ymax)
{
this.actors_rpy[x][y].setY(this.actors_rpy[x][y].getY() + this.half_sceh);
y = y+1; 
}
x = x+1; 
}
*/
}
}

}