Search found 911 matches

by Ranguna259
Fri Aug 02, 2013 3:17 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Here ya go, now all you need to do is to implement this to your code: print('back remover') mapa = { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 1 }, { 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1 }, { 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1 }, { 1, 0, 0, 1, 0...
by Ranguna259
Fri Aug 02, 2013 12:55 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Ok I'm gonna look into it, but basicly what you want is something like a random generated map right ? like minecraft or terraria ?
by Ranguna259
Thu Aug 01, 2013 8:51 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Oh great :| I can't code anything unless I know how you manage you tables and player coordinates so take a look at the code in this page which is this one: local input = { 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p' } local remove = { f=true, g=true, j=true, n=true, o=true, p=tru...
by Ranguna259
Thu Aug 01, 2013 7:38 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Lets just say it's 60x100. So removing shouldn't be that much of a problem, but that means after removing you will need to save it somewhere, I already have a table serializer. Actualy it wont be easy, removing vars from a table is actually a delicate matter but luckly I've already done something l...
by Ranguna259
Thu Aug 01, 2013 6:45 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Thank you! :D Works perfectly! Infinite worlds, here I come! :joker: infinite :ultrashocked: well.. don't forget to optimize it so it will discard maps as you move forward or backward and reload them once you get close to them again because if you don't there'll be a massive impact on the performan...
by Ranguna259
Thu Aug 01, 2013 6:07 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Thank you! :D Works perfectly! Infinite worlds, here I come! :joker: infinite :ultrashocked: well.. don't forget to optimize it so it will discard maps as you move forward or backward and reload them once you get close to them again because if you don't there'll be a massive impact on the performan...
by Ranguna259
Thu Aug 01, 2013 1:36 pm
Forum: Libraries and Tools
Topic: Debug - A whole new way of debugging your game
Replies: 106
Views: 36925

Re: Debug - A whole new way of debugging your game

I picked up Qcode's code and added some of my own (I've been adding stuff to this since I downloaded it) There was one thing that I hated about this, it was when I had a lot of output in the console and I had to scroll all the way down to see the end, I've even spent MINUTES just scrolling and scrol...
by Ranguna259
Thu Aug 01, 2013 11:50 am
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

Are you trying to make the two 2D tables into a single 3D table or one single double-wide 2D table with table A on the left and table B on the right? I was assuming the 3D one. (Where they are on top of each other. So basically the top-left cell for your new table would be the values of table 1 and...
by Ranguna259
Wed Jul 31, 2013 10:53 pm
Forum: Support and Development
Topic: Combining 2D Arrays?
Replies: 16
Views: 2576

Re: Combining 2D Arrays?

if what you want is what mich said then: a = {1,2,3} b = {5,6,7} Then this should do the trick: for i=1,#b do table.insert(a,b[i]) end I'll code a for loop for 2d arrays, just wait a few mins. EDIT: This should do the trick(it'll concatenate table a with b): a = {{1,2,3}, {8,9,10}, {14,15,16}} b = {...
by Ranguna259
Wed Jul 31, 2013 10:13 pm
Forum: Support and Development
Topic: File lines to table (lua question)
Replies: 8
Views: 2676

Re: File lines to table (lua question)

Heres the code, it's heavily commented so everyone can understand it, if not then don't hesitate to ask. This code can only load files with the following format: number,number,number ... number, The last number should always have a comma (,) at the end and it can have as many numbers(each composed o...