Search found 19 matches
- Sun Feb 28, 2010 7:02 pm
- Forum: General
- Topic: Not scrolling! :(
- Replies: 3
- Views: 1702
Re: Not scrolling! :(
Updated....
- Sun Feb 28, 2010 6:44 pm
- Forum: General
- Topic: Not scrolling! :(
- Replies: 3
- Views: 1702
Not scrolling! :(
I cannot for the life of me get my tilemap to scroll. I incorporated some changes that TechnoCat made for me on IRC, but it's still not working! My main.lua: require("PlayerShip") require("Bullet") require("TileMap") function love.load() love.graphics.setBlendMode('alph...
- Sat Feb 27, 2010 5:29 pm
- Forum: General
- Topic: 2D array? 3D array? What?
- Replies: 8
- Views: 3658
Re: 2D array? 3D array? What?
Thanks guys!
- Sat Feb 27, 2010 2:28 pm
- Forum: General
- Topic: 2D array? 3D array? What?
- Replies: 8
- Views: 3658
Re: 2D array? 3D array? What?
Thanks! How come you're not using strsub() at all here? ipairs() is kind of confusing to me, but the first loop seems to be iterating through all the lines, correct? And then the second call, ipairs(t), iterates through every letter in the current line? kikito: Yes I'm trying to do that, but I'm try...
- Sat Feb 27, 2010 2:11 pm
- Forum: General
- Topic: 2D array? 3D array? What?
- Replies: 8
- Views: 3658
Re: 2D array? 3D array? What?
Yeah, how do I put the values into the array once I extract them from a line in the file with strsub()? edit: My current Map array looks like: TileMap.Map = {} Thinking about it, I'm guessing I'd have to pluck out two values at once, and then put them each into the X and Y dimension of the array? I'...
- Sat Feb 27, 2010 1:53 pm
- Forum: General
- Topic: 2D array? 3D array? What?
- Replies: 8
- Views: 3658
2D array? 3D array? What?
Alright, I needed a way to fill out my map array, but I couldn't understand the way the Löve filesystem worked, so I sort of hacked together my own file loading, which seems to work; --Must be called before TileMap:Draw()! function TileMap:LoadMap(Path) local File = assert(io.open(Path, "r"...
- Thu Feb 25, 2010 8:51 pm
- Forum: General
- Topic: Class member variables?
- Replies: 5
- Views: 2135
Re: Class member variables?
Line 34: self.Tiles[self.Map[y+self.MapY][x+self.MapX]], I tried changing MapY and MapX to 1, since my Tiles array starts at 1 I.E: local NewInstance = { MapWidth = 20, MapHeight = 20, MapX = 1, MapY = 1, MapOffsetX = 30, MapOffsetY = 30, MapDisplayWidth = 14, MapDisplayHeight = 10, TileWidth = 32, ...
- Thu Feb 25, 2010 8:42 pm
- Forum: General
- Topic: Class member variables?
- Replies: 5
- Views: 2135
Re: Class member variables?
Sigh, I did that. Now it says "TileMap.lua:34:Tried to access field '?' a nil value" I'm confused! :P Thanks though! Edit: Here's my main code: require("PlayerShip") require("Bullet") require("TileMap") function love.load() love.graphics.setBlendMode('alpha') ...
- Thu Feb 25, 2010 7:59 pm
- Forum: General
- Topic: Class member variables?
- Replies: 5
- Views: 2135
Class member variables?
First off, I'm sorry for all my questions, but classes in Lua still has me a bit confused. Please bear with me here! TileMap = {} TileMapMT = { __index = TileMap } --This metatable will be attached to every created class instance. TileMap.Tiles = {} for i = 1,2 do TileMap.Tiles[i] = love.graphics.ne...
Re: Folders?
Ah, that worked!
May I ask what is the difference between \\ and /? I.E why should you use one and not the other?
May I ask what is the difference between \\ and /? I.E why should you use one and not the other?