arrays

dannyboydude

Ultra Cool Member
Reaction score
33
does anybody know if starcraft 2 will be using multidimensional arrays?

because if they do itl save LOTS of time and lots of un-used variables being created

and im going straight to SCII mapping as soon as

its a real shame : no heroes , inventories , all that lot.

But anyway thanks for replies

~Dbd~
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> lots of unused variables being created

I fail to see how multi-dimensional arrays are going to prevent that...


And, there probably won't be any. What for anyway? It's a nice-to-have but nothing more.

Actually, there will be Heroes. For the precise details, we'll have to wait though.
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
Why don't you ask your dad? :rolleyes: He was working for Blizzard, right?

And anyway, it seems you are really uninformed, as there will be heroes. Seems you dad forgot to tell you a lot of things :).
 

dannyboydude

Ultra Cool Member
Reaction score
33
lol he didnt tell me i was eves dropping reading his emails

he told me his job was secret and very wicked and hed tell me a bit later because he just quit his last job

and i was like just looking and i opened his emails and i got startled and like stars shined in my eyes

but like @AceHart

MDA = well saving player number and unit

pick all players
integer + 1
X = [ player number ] [ Integer ]

as supposed to

integer = +1
P1 X = [ integer ]
integer = +1
P2 X = [ Integer ]


hope you understand what im trying to say

and erm i didnt know there was heroes
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
All i know is that it would make my life easier.
3 of my games and a few more i got planed, i used them.
Tetris Playersfeild[rows*col] And i didn't have too but tetris is sure could have helped. plus if i make it 6 player, it will be [playernum*rows*col]
Also My AI Game could have helped. i am forced to do things like Units[50*6] Units[300]. Basically its makes it a little harder to code, and harder to look at. because now when i want to access player 3's 50 units i have to. Units[(playernumber - 1 * 50 ) + i]
My Train Game i had to make normal arrays act like them. and using the gui can make your hand go numb as is, but this would have helped me alot.

For me it would be useful, i don't think its required, but i think it wont hurt to allow them.
And have to play with it. No reason for this. Why would it hurt to add this.

p.s. my train game was a pain with out them, my roller coaster game i am working on is becoming a pain with out them. I would like an array of x[num][num][num][num]. But instead i just get [num*num*num*num]
 

dannyboydude

Ultra Cool Member
Reaction score
33
anyway i think this thead is over but

howz your game comnig on and what part are you doing now ?

EDIT: hey could you give me alink to your train game
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
Sure

Been doing alot of work on it recently and its not updated.
(a few weeks worth of work not up yet, but will be in a week or so)

But best version i have uploaded still shows the basic concepts.

http://www.thehelper.net/forums/showthread.php?t=94400&highlight=battle+trains

thehelper.net/forums/showthread.php?t=94400&highlight=battle+trains

as for the roller coster one, theres not much to show. i still waiting for a model from someone.
 

dannyboydude

Ultra Cool Member
Reaction score
33
man your train game is awesome i might test on b.net

and cant wait til your rollercoaster designer

Rock on....
 
Reaction score
333
Sorry for mild off-topic, but you can use two-dimensional arrays in vJass. Try this:

JASS:
//! textmacro Matrix takes NAME, TYPE, SCOPE, WIDTH
$SCOPE$ struct $NAME$
    private static $TYPE$ array a
        
    method operator [] takes integer i returns $TYPE$
        return .a[this+i]
    endmethod
        
    method operator []= takes integer i, $TYPE$ t returns nothing
        set .a[this+i] = t
    endmethod
        
    static method operator [] takes integer i returns $NAME$
        return i*$WIDTH$
    endmethod
endstruct
//! endtextmacro


In the interest of speed there is no bounds checking on column access. Use like this:

JASS:
library Example initializer Init
    //! runtextmacro Matrix("Table", "string", "private", "10")
    // max rows is roughly floor(8191 / width) - 1, 818 in this case.
    
    private function Init takes nothing returns nothing
        set Table[1][9] = "zzzz"
        set Table[1][8] = "wwww"
        set Table[2][8] = "xxxx"
        set Table[1][18] = "yyyy" // overflow, don't try to access columns beyond width - 1.
        set Table[3][6] = "vvvv"
        
        call BJDebugMsg(Table[1][9]) // prints "zzzz"
        call BJDebugMsg(Table[1][8]) // prints "wwww"
        call BJDebugMsg(Table[2][8]) // prints "yyyy", not "xxxx"
        call BJDebugMsg(Table[3][6]) // prints "vvvv"
    endfunction
endlibrary
 

dannyboydude

Ultra Cool Member
Reaction score
33
waaaaaaa

im trying people , its taking long time for me to learn lol

i know u can do it in the vjass but i dont even know whether to vjass or to jass straight away( i cant ever find a good tut on vjass they all say u gotta do jass before , look at some people they dont even know jass they use vjass)
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
All of my games are GUI 100% :)

But soon will have a little jass to clean leaks. (but current games don't need it)

edit: dannyboydude, i am sure you would understand my tetris game if you looked at the the triggers. its alot more simple then people think.
But some of the other ones, the triggers arnt as easy to look at, or as clean, but they are the way thats easyest for me.

Also i dont lock my games. I do when they start to get pretty polished. but i nominally upload a non locked one too.
 

dannyboydude

Ultra Cool Member
Reaction score
33
wow i didnt think your games were gui i didnt bother to look at the triggers because i knew i wouldnt understand lol
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top