Search found 64 matches

by stout
Sat Nov 03, 2012 1:04 am
Forum: Support and Development
Topic: (Resolved)Basic camera stuff (was: tile scrolling problem)
Replies: 6
Views: 1813

Re: Basic tile scrolling problem

Well it's not quite there yet. The bottom row (so, worldMap[50]) and the rightmost column (worldMap[anything][50])) are not displaying in the zoomed mode. Controls: 1 and 2 change the zoom level Arrow keys move the view around when zoomed in r will give you a new world You can use the pink corners t...
by stout
Fri Nov 02, 2012 10:35 pm
Forum: Support and Development
Topic: (Resolved)Basic camera stuff (was: tile scrolling problem)
Replies: 6
Views: 1813

Re: Basic tile scrolling problem

Translate is not doing it for me, or I don't understand how to use it. But I came up with something so-so. cam = {x = 1, y = 1} camera = { } function cameraSet() local cameraSize = 20 for y = 1, cameraSize do camera[y] = {} for x = 1, cameraSize do camera[y][x] = worldMap[y + cam.y][x + cam.x] end e...
by stout
Fri Nov 02, 2012 8:09 pm
Forum: Support and Development
Topic: (Resolved)Basic camera stuff (was: tile scrolling problem)
Replies: 6
Views: 1813

(Resolved)Basic camera stuff (was: tile scrolling problem)

EDIT: this part is solved, see post further down for current issue The problem: I'm a dummy, and am missing something incredibly obvious. for rowIndex,row in ipairs(worldMap) do for columnIndex,quadID in ipairs(row) do local x,y = (columnIndex-1)*TileW, (rowIndex-1)*TileH love.graphics.drawq(Tileset...
by stout
Fri Nov 02, 2012 1:59 am
Forum: Support and Development
Topic: Enemies work, no bosses?
Replies: 5
Views: 2275

Re: Enemies work, no bosses?

I'm going to poke at it more tomorrow, probably, if you or someone else doesn't get this sorted, but: the issue is @ line 391 in foe.lua, like the error log says. The code itself is fine, except.. it's being called in an update function. It's CONSTANTLY trying to remove the boss from the table, even...
by stout
Thu Nov 01, 2012 6:59 pm
Forum: Support and Development
Topic: Enemies work, no bosses?
Replies: 5
Views: 2275

Re: Enemies work, no bosses?

If the forum complains about size, can you upload the file to a public dropbox folder or something? (you have a lot of images, so just copy-pasting the code onto our location machines won't do any good, and it's easier to see the thing in action)
by stout
Thu Nov 01, 2012 6:25 pm
Forum: Support and Development
Topic: Checking to see if table elements exist, then do a thing
Replies: 8
Views: 2001

Re: Checking to see if table elements exist, then do a thing

gentest2.png Success! for i,mt in ipairs(mountains) do -- start plains for pt = -3,3 do if worldMap[mt.y + pt] then for count = -3,3 do if worldMap[mt.y + pt][mt.x - count] then worldMap[mt.y + pt][mt.x - count] = 2 end end end end end -- ending plains for i,mt in ipairs(mountains) do -- start hill...
by stout
Thu Nov 01, 2012 3:45 pm
Forum: Support and Development
Topic: Checking to see if table elements exist, then do a thing
Replies: 8
Views: 2001

Re: Checking to see if table elements exist, then do a thing

Okay that SEEMED like it made perfect sense but I'm staring at it and testing it more and.. now I'm not so sure. Also, it still crashes; you can press r to refresh with new values, and if you do that a dozen times or so, it should eventually die with the same problem as before. if worldMap[mountains...
by stout
Thu Nov 01, 2012 2:11 pm
Forum: Support and Development
Topic: Checking to see if table elements exist, then do a thing
Replies: 8
Views: 2001

Re: Checking to see if table elements exist, then do a thing

AHHHHH. That makes perfect sense. Thank you! (also explains why, when it works, it works wonky.. but I should already know how to fix that, so, yay)
by stout
Thu Nov 01, 2012 1:25 pm
Forum: Support and Development
Topic: Checking to see if table elements exist, then do a thing
Replies: 8
Views: 2001

Re: Checking to see if table elements exist, then do a thing

substitute: yep, that's it. Sorry for not providing a better example! I'm trying to figure out some world generation ideas and want to use the mountains as locus points from which the rest of the terrain is made.

Robin: no dice. Here's the .love. Relevant lines are 108-112.
by stout
Thu Nov 01, 2012 5:33 am
Forum: Support and Development
Topic: Checking to see if table elements exist, then do a thing
Replies: 8
Views: 2001

Checking to see if table elements exist, then do a thing

for i = 1,9 do if worldMap[mountains[i].y + i][mountains[i].x + i] then -- if this index exists then worldMap[mountains[i].y + i][mountains[i].x + i] = 2 -- only changing "diagonals" but that's fine for this test end end So if worldMap[2 + 1][8 +1] - translated to worldMap[3][9] - exists,...