Arrays and Tables - Printable Version +- NaaLaa (https://www.naalaa.com/forum) +-- Forum: Other (https://www.naalaa.com/forum/forum-8.html) +--- Forum: Everything else (https://www.naalaa.com/forum/forum-10.html) +--- Thread: Arrays and Tables (/thread-165.html) |
Arrays and Tables - johnno56 - 11-24-2024 I am familiar with arrays and gradually getting my head around tables... My question may be lame but I need to know... How does one determine whether to use an array or a table? J RE: Arrays and Tables - kevin - 11-25-2024 (11-24-2024, 09:17 PM)johnno56 Wrote: I am familiar with arrays and gradually getting my head around tables... My question may be lame but I need to know... How does one determine whether to use an array or a table? HI Johnno, I have never felt the need to distinguish between the two, but perhaps the explanation of Tables in the document for migrating from N6 will help: ReadMe.pdf (Size: 124.85 KB / Downloads: 8) All the best - Kevin. RE: Arrays and Tables - johnno56 - 11-26-2024 Cool. Thank you for the PDF. Hopefully it will make things a lot clearer... J RE: Arrays and Tables - Marcus - 11-26-2024 It doesn't really matter what you use I think tables (arrays are just a special case) make things look clearer. Let's say you want to have an array with 100 enemies, where each enemy has an image, a position (x, y) and speed (x, y): Code: anImage = loadimage("dummy.png") RE: Arrays and Tables - johnno56 - 11-27-2024 Thanks Marcus. Much appreciated. |