|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
07-12-2006 21:48
Hi all, I'm building a word game, and I'd like a "logical" 2D list/array to back up the actual presentation. Is there any "best practice" when it comes to storing gridded data? Thanks, Jesse
|
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-12-2006 22:04
|
|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
07-13-2006 05:34
Awesomeness! Thanks a ton!
|
|
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
|
07-13-2006 06:56
It's still more convoluted to use than a C array, which we all want and constantly pester the Lindens for ("Top 5 Ways to Improve Scripting"  .
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
07-13-2006 10:13
Actually, I would recommend using a string instead of a list, if you can manage it. Strings use much less memory than lists-- what kind of data would need to go into this array?
|
|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
07-13-2006 10:45
From: Keknehv Psaltery Actually, I would recommend using a string instead of a list, if you can manage it. Strings use much less memory than lists-- what kind of data would need to go into this array? Letters. It's a word game with similar grid mechanics as Scrabble.
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
07-13-2006 11:01
In that case, I would highly recommend using a string. Letters are a constant size, so you don't need the ability of a list to adjust in size.
What are the dimensions of this array -- 50x50? Do you need functions to manipulate it, or would you rather work them out yourself?
|
|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
07-13-2006 15:13
From: Keknehv Psaltery In that case, I would highly recommend using a string. Letters are a constant size, so you don't need the ability of a list to adjust in size.
What are the dimensions of this array -- 50x50? Do you need functions to manipulate it, or would you rather work them out yourself? 15x15, and I'd like the most abstracted implementation possible. The library 2D script looks good, I think I'm gonna use that 
_____________________
Ruby loves me like Japanese Jesus. Did Jesus ever go back and clean up those footprints he left? Beach Authority had to spend precious manpower. Japanese Jesus, where are you? Pragmatic!
|