• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Multidimensional array (matrix)

Status
Not open for further replies.
Level 17
Joined
Apr 13, 2008
Messages
1,597
Hi, I have problem figuring out how to use multidimensional arrays efficiently in WE(U) or JASS and after being flamed and told to GTFO on THW chat I thought I'll try to ask here. (I have NewGenPack installed)

Of course, I figured out that much I could create an array of 100 to create a 10x10 matrix, for example.
I also read that I could use the game cache but then again, I read that the game cache is slow.
I've been told that I could use structs to handle matrix-like structures, but then I read I can't store arrays in structs, so it seems to be a brute-force method again, but I guess I'm wrong.

Would someone please guide me in the right direction?
 
Level 12
Joined
Mar 16, 2006
Messages
992
Hi, I have problem figuring out how to use multidimensional arrays efficiently in WE(U) or JASS and after being flamed and told to GTFO on THW chat I thought I'll try to ask here. (I have NewGenPack installed)

Of course, I figured out that much I could create an array of 100 to create a 10x10 matrix, for example.
I also read that I could use the game cache but then again, I read that the game cache is slow.
I've been told that I could use structs to handle matrix-like structures, but then I read I can't store arrays in structs, so it seems to be a brute-force method again, but I guess I'm wrong.

Would someone please guide me in the right direction?

It's funny how some people can write so much, and say so little.

There is no question in your post.
 
Level 17
Joined
Apr 13, 2008
Messages
1,597
It's a perfectly phrased problem. Here is the question:

Hi, I have problem figuring out how to use multidimensional arrays efficiently in WE(U) or JASS...
Would someone please guide me in the right direction?

And the rest of the text is supposed to speed up the process of finding the solution by providing information to all the future posters so they won't post information redundant for me.

I would also like to point out that your reply was offtopic, especially since it did not contain any reasoning behind your statement (just like this post).
 
  • Like
Reactions: nGy
Level 12
Joined
Mar 16, 2006
Messages
992
It's a perfectly phrased problem. Here is the question:

And the rest of the text is supposed to speed up the process of finding the solution by providing information to all the future posters so they won't post information redundant for me.

I would also like to point out that your reply was offtopic, especially since it did not contain any reasoning behind your statement (just like this post).

Well, for starters, a multi-dimensional array is not just a single large array. It's multiple arrays used together.

Secondly, No one knows what you'd be using the array or game cache for, so no one can really advise what would be a smart move for you. You mention storing arrays in structs, what for? A brute force method? For what?

There is no question in your post. Only a declaration of what you think you know and a plea for vague guidance. I like math, but I'm not gonna start reading to you from Page 1. If you ever get a clue and figure out how to ask the question you want an answer for, perhaps you'll actually ask it next time.

And incase you don't understand it at this point, the reasoning behind my post was to understand your problem so I could help you. If you weren't such a pompous ass about it, you probably would have gotten some help.
 
Level 17
Joined
Apr 13, 2008
Messages
1,597
I'm sorry, I can't decide if it's your brain or your eyes. The question is there, honey, can't you comprehend it? I like drawing, but I'm not gonna draw you a nice picture with crayons showing you smiling suns, fluvurs and matrices. If you ever get a clue and figure out how to behave on a forum board perhaps I let you come back.

And again, we are flaming in offtopic. If you can't see the question or can't answer it or you don't want to, please don't post here - take your frustration elsewhere.

I asked a well phrased question in a polite manner, after your questionable mooded reply I still maintained my polite manner then you came back flaming. Despite this I'm still looking for the answer to the question:

"How to create arrays the most efficient way. How to m=array[1..6] of array [40] of integer in JASS? How to int matr [6][40]; in JASS?"

That, was the question.
 
Level 12
Joined
Mar 16, 2006
Messages
992
I asked a well phrased question in a polite manner, after your questionable mooded reply I still maintained my polite manner then you came back flaming. Despite this I'm still looking for the answer to the question:

"How to create arrays the most efficient way. How to m=array[1..6] of array [40] of integer in JASS? How to int matr [6][40]; in JASS?"

That, was the question.

You're still looking for the answer to the question you just asked?

You could have saved the both of us the trouble by just asking that to begin with, instead of bicker about how well phrased your question wasn't. It wasn't even a question until just now!

Unfortunately, I don't understand your machine code, so I can't help you. Check the JASS forums. Either here, or at wc3campaigns, or thehelper.net. If you want to convert that into English, I'll take a shot at it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
make a normal array

set varname[x*128+y] = your value

x is variable location between 0 and 63
y is variable location between 0 and 127

This emulates D arrays and come have unlimated deminsions but remember that the more deminsions you emulate, the smaller the sizes of each.

For bigger emulation you will have to use slower gamecache.
 
Status
Not open for further replies.
Top