How fast?

Blitz3D Forums/Blitz3D Beginners Area/How fast?

Gauge(Posted 2003) [#1]
I created 100,000 instances of the type player. And used a for/next loop to cycle thru each instance. It cycled thru this in 34 to 43 millisecs, which is how fast? Not to mention i'm only on a 633 dinosaur now.

I'm really happy, cause I ran this on my mudserver, and I might not have to do types within types like I was doing, It might slow it down a touch, but i can do for/next loops without slowing it down hopefully. Ie:

Command ="say"
for p.player=Each player
if p\Curr_room=room
writeline p\stream, message$
next


What do ya think?


Curtastic(Posted 2003) [#2]
the list of players could look like this:
room(1,1)-> player
            player
room(2,1)-> player
room(3,1)-> player
            player
            player
            player
so room(1,1) would have 2 players
so room(2,1) would have 1 player
so room(3,1) would have 4 players


to go though all players in the room:
p=curroom\firstplayer
for a=1 to curroom\players
writeline p\stream, message$
p=after p
next


to move a player to another room, insert it after the room's firstplayer and increase the room's players amount