767 posts
Posted 03 October 2013 - 04:58 PM
Hey everyone!
I just wanted to show you a nice thingy i found in my own "WIP" Code, for a game im going to develop.
this single table (called "data") is containing about 900 lilnes of variables and tables :o/> O.o
Spoiler
And im NOT even kidding! this is not just a massive amount of spaces… it is FILLED with tables and variables…
Also; This table is the only thing i've made so far and that big… (i used about 3 hours on it)
I've never seen any tables, being almost 900 lines :o/>
What do you think? Wierd, or totally wierd?
3790 posts
Location
Lincoln, Nebraska
Posted 03 October 2013 - 06:07 PM
Not really part of the "media" category…
Moved to General.
504 posts
Location
Seattle, WA
Posted 04 October 2013 - 12:42 AM
That's certainly interesting, but what exactly is in this table? A 900 line table of variables seems like a strange and memory intensive way to do things.
767 posts
Posted 04 October 2013 - 07:06 AM
Well… Thanks Cranium for moving it… I didn't know what to put this in…
Grim Reaper:
Well… Im having about 600 lines of tables, with IP-addresses( well not actually IRL ip-addresses… just some random numbers )… then im having a softwareTool-table ( about 100-ish lines) and then im having a lot of variables.
This is a blemish'd picture (so you cant see the actual code, because its a secret project)
Spoiler
171 posts
Location
Study: United Kingdom Native: Latvia
Posted 04 October 2013 - 08:45 AM
Well… Thanks Cranium for moving it… I didn't know what to put this in…
Grim Reaper:
Well… Im having about 600 lines of tables, with IP-addresses( well not actually IRL ip-addresses… just some random numbers )… then im having a softwareTool-table ( about 100-ish lines) and then im having a lot of variables.
This is a blemish'd picture (so you cant see the actual code, because its a secret project)
Spoiler
Why are you storing some IP addresses in a table? Why cant you just generate them dynamically?
3790 posts
Location
Lincoln, Nebraska
Posted 04 October 2013 - 09:13 AM
Or, save them to a file…
570 posts
Location
Germany
Posted 04 October 2013 - 02:30 PM
Most of my Lua projects have huge tables because I like OOP. But I don't really see the point of writing down 100s of IP-addresses, when you could just generate them automatically with just about 10 to 20 lines of code.
171 posts
Location
Eastern USA
Posted 04 October 2013 - 04:06 PM
How about we move this to forum games to see who can come up with the longest table (that actually did something useful in a real program)?
I have a sentence diagramer I'm working on. It has a table of methods that's 537 lines and a dictionary that's only 418 lines right now but could easily grow to thousands (but that would end up being automated). The method table's contents get dumped into the dictionary (i.e. if it's an adjective then give it the appropriate methods for an adjective, etc.) at runtime so I don't have to keep tons of identical methods updated and so I don't have to define multiple properties redundantly (so I don't say {pos = "adj", method = function() blah end}, just {pos = "adj"}). If I didn't rebuild the dictionary every time the program ran but changed nothing else, the dictionary would grow to be at least 5881 lines long.
8543 posts
Posted 04 October 2013 - 04:20 PM
Not really a game.
94 posts
Location
Computational Soup of the Cloud
Posted 04 October 2013 - 04:54 PM
That seems kind of resource wasteful…
1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 05 October 2013 - 03:31 PM
It'd be too easy to make a long table. I could just do this:
longTable = {}
i = 0
while true do
longTable[i] = "HUGE Table!"
i = i+1
sleep(0)
end
and I'd win, that generates an infinitely long table.
1522 posts
Location
The Netherlands
Posted 05 October 2013 - 07:33 PM
Im wanting to see the content of that huge table. PM or here, I dont really care where, but Im curious if there is even revelant data and not just some random bull****