Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by madpower2000. 07/22/26 10:56
ZorroGPT
by TipmyPip. 07/21/26 17:54
New Zorro version 3.11
by jcl. 07/21/26 13:42
Lapsa's very own thread
by Lapsa. 07/18/26 13:40
Purchase A8 full licence version
by ukgamer. 07/17/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (TipmyPip, madpower2000, VoroneTZ, 1 invisible), 1,591 guests, and 19 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Array size limited to 500?! This cant be true. #88879
09/05/06 20:11
09/05/06 20:11
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
OK, maybe I'm digging for nothing here but I recognized today that arrays can't exceed ~500 values or so.. And YES I read the manual.

Is there any reason for this limitation? Im' storing several cutscenedata in one big array and I'm exceeding >500 values with my data. Is this limitation broken free in LiteC and isnt there any way to increase this limit in CScript?

Re: Array size limited to 500?! This cant be true. [Re: HeelX] #88880
09/05/06 20:16
09/05/06 20:16
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
of course you can use bigger arrays. the limitation just is in array initialization.

you have to do it like that:

var array[2000000];

starter init_array()
{
array[0] = 1;
array[1] = 2;
...

Re: Array size limited to 500?! This cant be true. [Re: ventilator] #88881
09/05/06 20:22
09/05/06 20:22
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
omg this is really ugly

the real problem is that everything is pre-defined... [censored] and when this is a workaround, why shouldnt work it during "normal" initalization.

C'mon, why can't the compiler handle this?

Last edited by HeelX; 09/05/06 20:24.
Re: Array size limited to 500?! This cant be true. [Re: HeelX] #88882
09/05/06 20:39
09/05/06 20:39
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
why do you want to put your cutscenes into the code instead of loading them from a file?

Re: Array size limited to 500?! This cant be true. [Re: ventilator] #88883
09/05/06 20:51
09/05/06 20:51
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I discovered the possibility to extract textfiles from WRS, maybe I will solve that with this method..

We use a lot of fast cutted, speedy cutscenes and it would be very ugly to load for each cutscene or cutscene chunk a seperate file out of the WRS, plus it would be slow and it would be bad for the HD. The other reason is dataprotection and security in this case, so I dont want to expect that anyone comes and destroys or corrupts my data file if it is saved externally.

So you say I can have an array like var array[2048]; and in a starter function I just have to initialize it with each item being =0 and later on I can fill and access it (read/write) without any restriction? Uhm.... where I have been, my dear... ... omg

Last edited by HeelX; 09/05/06 20:52.
Re: Array size limited to 500?! This cant be true. [Re: HeelX] #88884
09/05/06 21:21
09/05/06 21:21
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I'm using arrays for the exactly same purpose, and I have made good experiences in loading them at runtime from an external file. If you have some free time, you could even write an editor, that is able to display and manipulate the data. I did it and it runs fine. Its a very comfortable way of having cutscenes.

Besides: A good old programming rule says, that you should divide data from code.


Always learn from history, to be sure you make the same mistakes again...
Re: Array size limited to 500?! This cant be true. [Re: Uhrwerk] #88885
09/05/06 21:27
09/05/06 21:27
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I wrote a complete cutscene editor featuring quaternion-code to avoid gimbal lock and spline interpolation for moving, jump flagging and arcus editing as well as speed adjusting as tool for our production. I could write any exporter if I wish to save it externally but I decided to save it in an array because we need so much cutscenes only in 10% of our game and in this special part I just need fast access. And because it is also a small amount where I need it I decided not to write any encrypted files.

I usually vote for dividing code and data but in this special case there are some reasons why I hesitate to do this and I don't want to talk anymore about this. I just asked for increasing this limit and if I cant do it, I do it with the starter-thingy which is evil hackery.

Re: Array size limited to 500?! This cant be true. [Re: HeelX] #88886
09/05/06 21:47
09/05/06 21:47
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Indeed, thats truely evil.


Always learn from history, to be sure you make the same mistakes again...
Re: Array size limited to 500?! This cant be true. [Re: Uhrwerk] #88887
09/06/06 07:00
09/06/06 07:00
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I don't know why they have this limit.
In any case I'd store it to a seperate file and unpack it from the resource, then read it into the array, and then delete the file.

It's a bit annoying because reading directly from the resource was possible with A5 (by using the abandoned database feature in a way which was not intended ) and isn't anymore with A6, but in your case it's probably the best way to solve this.

Re: Array size limited to 500?! This cant be true. [Re: FBL] #88888
09/06/06 08:14
09/06/06 08:14
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I have already implemented that way for our INI files and when it works (cant test it now) I will definitely use it with the cutscenedata.

Mr. Kleipa, this was silly.. argh no other programming language has this.

Page 1 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1