Search found 1459 matches

by T-Bone
Wed Jun 22, 2011 7:31 am
Forum: Support and Development
Topic: Double pixel size?
Replies: 9
Views: 2579

Re: Double pixel size?

Can this be extended to also apply for drawn text? Like overriding love.graphics.print() or something font-related with something that scales up the text in a pixelated manner?
by T-Bone
Tue Jun 21, 2011 6:55 am
Forum: Support and Development
Topic: sound files fail to play
Replies: 4
Views: 2333

Re: sound files fail to play

Putting a bit of text inside quotes (" "), for example "apple", in almost any programming language means that you're referring to the word apple, as in a sort of list of letters ('a','p','p','l' and 'e') (this is called a string ), while writing just apple without quotes means yo...
by T-Bone
Mon Jun 20, 2011 8:20 am
Forum: Support and Development
Topic: Reduce memory usage by consolidating tiles.
Replies: 15
Views: 4967

Re: Reduce memory usage by consolidating tiles.

The game world is enourmous, no doubt it takes a lot of memory. Still runs pretty well on my crappy netbook, so I guess it's not that big of an issue either.
by T-Bone
Sun Jun 19, 2011 7:50 pm
Forum: Support and Development
Topic: Proper way to run a different .lua file
Replies: 6
Views: 4201

Re: Proper way to run a different .lua file

bartbes wrote:Usually I just set a variable 'state' or 'curstate' to the current state's table, then you can easily do stuff like:

Code: Select all

function love.draw()
    return state:draw()
end
Yes, that was what I had in mind.
by T-Bone
Sun Jun 19, 2011 7:39 pm
Forum: Support and Development
Topic: Proper way to run a different .lua file
Replies: 6
Views: 4201

Re: Proper way to run a different .lua file

Sounds like a slow solution, having to check the current state every single time I want to draw the screen. But if there's no better way to do it, I guess it will have to do. It's not that bad. It's a simple 'if' check for a computer that can do billions of calculations per second! There are other ...
by T-Bone
Sun Jun 19, 2011 7:25 pm
Forum: Support and Development
Topic: Proper way to run a different .lua file
Replies: 6
Views: 4201

Re: Proper way to run a different .lua file

Love itself runs main.lua, if that in turn loads other files, it doesn't care. Now, after main.lua has been executed it uses the environment it is then in, which you've set up. If you define a love.draw in main.lua, it will use that, if you define it somewhere else, it uses that, it just uses whate...
by T-Bone
Sun Jun 19, 2011 9:38 am
Forum: Support and Development
Topic: Proper way to run a different .lua file
Replies: 6
Views: 4201

Proper way to run a different .lua file

Hi lövers! I've understood how you can call functions and refer to variables from .lua files other than main.lua by using the "require" function, but I don't really understand how LÖVE runs the different scripts. If I define a love.draw() function in a separate .lua file and require it, it...
by T-Bone
Sat Jun 18, 2011 10:12 am
Forum: Support and Development
Topic: Efficient Tile-Based Scrolling tutorial doesn't work?
Replies: 11
Views: 5223

Re: Efficient Tile-Based Scrolling tutorial doesn't work?

Ah, of course. Yes, this totally works. Something wrong with the way the tutorial uses the SpriteBatch then. Does the tutorial's code work on your computers, or is it just mine? If the tutorial is wrong, it should be changed as soon as possible.
by T-Bone
Sat Jun 18, 2011 10:05 am
Forum: Support and Development
Topic: Efficient Tile-Based Scrolling tutorial doesn't work?
Replies: 11
Views: 5223

Re: Efficient Tile-Based Scrolling tutorial doesn't work?

Lemme write up what I mean. local map -- stores tiledata local mapWidth, mapHeight -- width and height in tiles local mapX, mapY -- view x,y in tiles. can be a fractional value like 3.25. local tilesDisplayWidth, tilesDisplayHeight -- number of tiles to show local zoomX, zoomY local tilesetImage lo...
by T-Bone
Sat Jun 18, 2011 9:52 am
Forum: Support and Development
Topic: Efficient Tile-Based Scrolling tutorial doesn't work?
Replies: 11
Views: 5223

Re: Efficient Tile-Based Scrolling tutorial doesn't work?

No, I mean using exactly what you had, just taking out the SpriteBatch and drawing directly to the screen. I don't understand what you mean. By "taking out", do you mean removing or ignoring the SpriteBatch? If so, what excactly do I have that I can draw on the screen? Just drawing the en...