Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (vicknick, AndrewAMD), 1,292 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
array limit? #183687
02/13/08 15:07
02/13/08 15:07
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
How big can be the array index?

var id[n], n ->oo ?
can it be 1000? 1000000000000000000000? more?
-what is the limit?
- Is the frame rate affected ?

Re: array limit? [Re: MMike] #183688
02/13/08 15:27
02/13/08 15:27
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hello,

in C-Script an arrays length should be limitid to 1048576 (which is the range of var).

Iterating through an array of that size may decrease FPS.
Especially when using a sorting algorithm or something similar.

Re: array limit? [Re: Fenriswolf] #183689
02/13/08 15:33
02/13/08 15:33
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
ok but between a array of 100 and 1000 .. the frame rate is almost equal right?

BtWay, the execute command, what is the speed of it? manual has no information concerning that..

Re: array limit? [Re: MMike] #183690
02/14/08 05:01
02/14/08 05:01
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline
Junior Member
Futurulus  Offline
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
Iterating through an array of 100 or 1000 just to check values, even every frame, shouldn't change the frame rate much.

execute(), I believe, is fast enough that you can call it a few times each frame without serious consequences.

If you're thinking about calling execute() 100 or 1000 times each frame, the frame rate will drop noticeably, although maybe not disastrously, depending on the commands executed.

Re: array limit? [Re: Futurulus] #183691
02/14/08 13:25
02/14/08 13:25
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
hum.. well i have a execute command that is recieving commands from a UDP message from Adobe Flash program i did.. So it comunicates with an webcam..

Ok so ... the webcam is tracked and the flash sends me the values, that are processed to identify movement..
and when a string is recieved from the flash from socket UDp server .. like " create(x,y,id);
i then just use:

if recieved>0 then:
Execute(recieved_string);


the execute will assign each id value an array[1000] .. so ... we are dealing with arrays every frame.. yes..
it runs very very fast of course each time frame.. but it is not decreasing the frame rate that much.. .. and im working with a laptop.. no core duo.. or something fast..

And im getting my webcam interative game working now ) im happy..

Last edited by MMike; 02/14/08 13:27.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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