Multiple Array Support

Ideas for Game Editor evolution.

Multiple Array Support

Postby Bee-Ant » Fri Jun 05, 2009 11:32 pm

As we know, GE only uses 1D array that can be saved in group. I would like be able to save 2D and 3D array as well.

Also, please fix the array handler. It gets problem when handling high array. I encounter the problem when trying to read 50x50 array from external file.
The middle row shifted.

I would like also be able to change animation through animindex.
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Multiple Array Support

Postby BeyondtheTech » Sat Jun 06, 2009 3:56 am

speaking very generally, how about flattening out a two-dimensional array to something like this?

Code: Select all
i=0;
for (y=0;y<10;y++)
{
   for (x=0;x<10;x++)
      {
         matrix[y*10+x]=i;
         i++;
      }
}


I use this as it's probably better on memory consumption, too.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Re: Multiple Array Support

Postby Fuzzy » Sat Jun 06, 2009 7:41 am

It is far easier to load a 1D array from file. A little math will make it seem like a 2D array.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Multiple Array Support

Postby Bee-Ant » Sat Jun 06, 2009 8:00 am

BeyondtheTech wrote:speaking very generally, how about flattening out a two-dimensional array to something like this?
Code: Select all
i=0;
for (y=0;y<10;y++)
{
   for (x=0;x<10;x++)
      {
         matrix[y*10+x]=i;
         i++;
      }
}

I use this as it's probably better on memory consumption, too.

I know this...but all I want is to save the array in a group.
OK, I can store that array in a file, but I want it saved in group...
Fuzzy wrote:It is far easier to load a 1D array from file. A little math will make it seem like a 2D array.

Do you have example to prove it?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Multiple Array Support

Postby Fuzzy » Sat Jun 06, 2009 8:42 am

Beyondthetech just showed you how.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Multiple Array Support

Postby Bee-Ant » Sat Jun 06, 2009 8:54 am

Oh...just change the 10 to make another size huh?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Multiple Array Support

Postby Kalladdolf » Sat Jun 06, 2009 9:35 am

And a very good idea, too!
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Multiple Array Support

Postby Bee-Ant » Tue Jun 09, 2009 3:39 am

Whats the limit of the array anyway?
And whats the limit of the variable?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Multiple Array Support

Postby makslane » Tue Jun 09, 2009 12:23 pm

I need to look he code, but I think the array index limit is the size of int C type (up to 2,147,483,647)
I can´t remember the limits for array dimension or number of itens but is a huge number.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Multiple Array Support

Postby Bee-Ant » Tue Jun 09, 2009 12:37 pm

Oh, but in variable bar, it seems about 999...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron