The Daily Click ::. Forums ::. General Chat ::. Arrays are pure evil!
 

Post Reply  Post Oekaki 
 

Posted By Message

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
19th March, 2009 at 21:23:41 -

I just wanted to say that!
Mostly because today a had a coding battle versus an evil array, and i won!
But i can still feel the consequences of that battle Its like my head will explode one of these days.

freakin pure evilsh not very friendly arrays



 
Code me a sausage!

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
19th March, 2009 at 21:33:20 -

Try doing what you do with arrays using INI's. THEN you will know what is true evil.

 

  		
  		

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
19th March, 2009 at 21:37:35 -

Even evil is frightened by that

 
Code me a sausage!

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
19th March, 2009 at 21:38:49 -


Originally Posted by OldManClayton
Try doing what you do with arrays using INI's. THEN you will know what is true evil.



see my sig :~)

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
19th March, 2009 at 21:51:50 -

Pixelthief's INI/data saving skills are top-notch.

 

  		
  		

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
19th March, 2009 at 23:32:06 -


Originally Posted by Pixelthief

Originally Posted by OldManClayton
Try doing what you do with arrays using INI's. THEN you will know what is true evil.



see my sig :~)



you r certainly good with ini's, nice game by the way...

 
Code me a sausage!

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
20th March, 2009 at 01:34:18 -

for the record i didn't even use the INI++ object in that game, just the old fashioned .ini object

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
20th March, 2009 at 02:07:07 -

Wow, how long did it take you to do that alone?!?!?

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
21st March, 2009 at 01:09:38 -

That's why I use Lua. Lua has arrays, but not as evil Never turned back since.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
21st March, 2009 at 01:33:06 -

seriously? an array is no more evil than a piece of graph paper. arrays are the backbone of data storage in memory.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
21st March, 2009 at 02:21:47 -

lua arrays are sucky. It won't let you access multidimensional arrays with variables unless they are loop indexes. My code that looked like this:


function updateChain(timeStep,id)
timeArray[timeStep][id] = {};
timeArray[timeStep][id]["X"] = mmf.Object.GetX(id);
timeArray[timeStep][id]["Y"] = mmf.Object.GetY(id);
end



doesn't work, by my code that does the exact same thing like this, does:


function updateChain(timeStep,id)
for i=timeStep,timeStep do
for j=id,id do
timeArray[i][j] = {};
timeArray[i][j]["X"] = mmf.Object.GetX(id);
timeArray[i][j]["Y"] = mmf.Object.GetY(id);
end
end
end




if you actually READ that, you'll see how evil lua arrays are


Edited by Pixelthief

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
21st March, 2009 at 06:19:57 -

@cecil: Dude, graph papers are so evil. I never touched one since I got MATLAB, not even to copy paste results onto paper. Not a good comparison. MMF makes arrays more evil. There was a nasty bug in one of my games from arrays. I made an active, transferred data from the array to that active's alterable value, then transferred it to a counter and it worked.

@pixelthief: Heh, you need to add timeArray[i]={}
I don't see your point, though. That's about it. It's easier to read and fix than an array in MMF. If there's a bug, I can see it at a glance. I could stuff data into it and pull it out in no time.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
21st March, 2009 at 07:37:36 -

arrays are a breeze. you guys are ridiculous.

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
21st March, 2009 at 07:44:00 -

That's what they want you to think.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
21st March, 2009 at 07:57:07 -



@pixelthief: Heh, you need to add timeArray[i]={}



my initialization looks like this:
timeArray = {};
for i=1, 1000 do
timeArray[i] = {};
end

but it won't let you input variables into multidimensional array references except for the *rightmost* slot.

Edited by Pixelthief

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
   

Post Reply



 



Advertisement

Worth A Click