Search found 5 matches

by zd
Sat Mar 10, 2012 3:29 pm
Forum: Support and Development
Topic: strange behavior w/ graphics
Replies: 5
Views: 2210

Re: strange behavior w/ graphics

It's nice and I'm glad to see other tile engines suitable for roguelikes and similar games. Do have future plans or just testing? Anyway good work zd! I don't have any specific future plans but I don't think I'm going to make a roguelike with it (although it was originally a port of a python+libtco...
by zd
Sat Mar 10, 2012 7:35 am
Forum: Support and Development
Topic: strange behavior w/ graphics
Replies: 5
Views: 2210

strange behavior w/ graphics

The issue I seem to be having is when I'm determining which tile to display based on the underlying map generated. The "problem" seems to be cropping up here: function orzia_map:determineTileGraphics(tile_config) for x = 0, self.size_x - 1 do for y = 0, self.size_y - 1 do if self.tiles[x][...
by zd
Fri Mar 09, 2012 9:12 am
Forum: Support and Development
Topic: [SOLVED]Centering text to screen
Replies: 3
Views: 4362

Re: Centering text to screen

You could use a fixed width font which would allow you to calculate the width easily
by zd
Fri Mar 09, 2012 12:26 am
Forum: Support and Development
Topic: Small LUA question
Replies: 3
Views: 1964

Re: Small LUA question

You've got the right idea. The problem is that something in the first dimension of your 2d array is nil. To prevent this from causing an error you need to change your code here: if tiles[x][y] == nil then to this: if tiles[x] == nil or tiles[x][y] == nil then Another trick is that nil is the only t...
by zd
Thu Mar 08, 2012 2:31 am
Forum: Support and Development
Topic: Small LUA question
Replies: 3
Views: 1964

Small LUA question

This isn't specific to LOVE, but I'm having trouble finding an answer elsewhere so I figured I'd give it a shot here. function countWalls(tiles) local walls = 0 for x = self.x - 1, self.x + 1 do for y = self.y - 1, self.y + 1 do if tiles[x][y] == nil then -- doesn't work, but needs to walls = walls ...