| 07-14-2006, 10:49 PM | #1 |
I have a question, Let's suppose I have created functions like CreateArray(size) , SetArrayInt(arrayid,index,value) and GetArrayInt(arrayid,index) . Well the question is: Would you ever need to use a dynamic array with a size bigger than 144 when making things for your map? |
| 07-14-2006, 11:04 PM | #2 |
By dynamic array u mean something like a collection object? If so then I'd be using a lot of those, but each one would be smaller than 144 indexes, why do u ask? |
| 07-14-2006, 11:12 PM | #3 |
Mostly because I noticed that making the limit quite small like that makes things better but if there are good uses for more than 144 then I should use a better limit |
| 07-14-2006, 11:13 PM | #4 |
Of any given type, I don't feel I've ever, EVER used more than 144. There's only one instance I have, and it was for use with assistance timers for the assistance system in my map. Aside from that, I think 144 is a very reasonable upper limit. If you're that concerned though, might you just add an option to increase the limit at the user's own risk? |
| 07-14-2006, 11:15 PM | #5 |
144 is fine as long as you can have plenty of different arrays |
| 07-14-2006, 11:19 PM | #6 |
Is not my developement but usefull http://xgm.ru/forum/attachment.php?attachmentid=7161 Following copyright i give original link, forum is russian but map have eng readme |
| 07-14-2006, 11:19 PM | #7 |
The limit of the number of arrays is , well infinite. Of course the computer's ram memory should influence it . Maybe also the actual limit of integers. But well if you use a lot of arrays, the arrays created later will use gamecache and then be as slow as gamecache |
| 07-14-2006, 11:25 PM | #8 |
And how many would u have to use in order to get to gamecache? Also, how would u make the first ones? |
| 07-14-2006, 11:26 PM | #9 | |
Quote:
I am guessing that map is kind of old what makes me wonder why is that the Russian modding community hardly shares. The full screen inventory wouldn't have came out of Russia if it wasn't for an unofficial poster that uploaded it to wc3sear.ch ... I think I should use hex in comparissions as well. It looks cool |
| 07-14-2006, 11:33 PM | #10 | |
Quote:
I have the final code at home it is going to be really useful and will be released in the new version of CSCache. |
| 07-14-2006, 11:50 PM | #11 |
I think the multiple array is a good way to expand the space. Rather than serially though do it in parallel, such that each slot is a union over all possible objects. If all your objects are size 1-10 this is fairly practical. Most people could probably get away with an atomic allocator with this strategy, and it lets you use arrays of say unit type, so you can avoid a slow return bug. When you need something object like(GetObjectX(obj)) rather than array like(GetObject(obj,X)), it's a good way to fly. Eventually someone will write an OO compiler to automate this with a sexy syntax. |
| 07-14-2006, 11:54 PM | #12 | |
Quote:
|
| 07-14-2006, 11:57 PM | #13 |
Lemme just see if I got this right: You're using locations to form a double-linked list and storing their adresses in global variables, and getting all the regular functionality out of them a lot faster than gamecache. If so, then awesome! But why a limit of 144 indexes? Some special reason or? |
| 07-15-2006, 12:29 AM | #14 |
More likelly 144 is # 10 in the fibonacci number list. I am using the fibonacci sequence but not really in the same way as pipedream. |
