Search found 7 matches

by Tyler821
Mon Nov 11, 2013 1:46 am
Forum: Support and Development
Topic: Centering an Image
Replies: 6
Views: 4098

Re: Centering an Image

You need the window / screen dimensions. In your code, you center the image, based on its width and height, around position 0,0. That will place the image's centre at the top left. Do something like this: love.graphics.draw(map, love.graphics.getWidth()/2, love.graphics.getHeight()/2, 0, 1, 1, map:...
by Tyler821
Mon Nov 11, 2013 1:23 am
Forum: Support and Development
Topic: Centering an Image
Replies: 6
Views: 4098

Re: Centering an Image

Pebsie wrote:
I want to center it in the middle of the screen so that the margins on all sides are equal. I'm using my application in fullscreen mode, if that makes a difference. Also, the map takes up most of the screen, but the margins are all weird. If there's a way to center margins, that's what I need.
by Tyler821
Mon Nov 11, 2013 1:13 am
Forum: Support and Development
Topic: Centering an Image
Replies: 6
Views: 4098

Centering an Image

Hi. I can't find any way to center an image. :? I tried: love.graphics.draw(map, 0, 0, 0, 1, 1, map:getWidth()/2, map:getWidth()/2) "map" is the name of the variable for my image. I found that piece of code on the forums, but it didn't work. PS: I need this urgently since I have a project ...
by Tyler821
Fri Nov 08, 2013 9:53 pm
Forum: Support and Development
Topic: Just Getting Started???
Replies: 14
Views: 5155

Re: Just Getting Started???

The font file extension is probably ttf, not tff. -facepalm- Thanks. :ehem: Wait a second, now I'm getting another error! D:< So on my main.lua, I have a line that says: require"mainmenu.lua" I get an error saying that mainmenu.lua doesn't exist. (And this time I made sure I didn't misspe...
by Tyler821
Fri Nov 08, 2013 9:33 pm
Forum: Support and Development
Topic: Just Getting Started???
Replies: 14
Views: 5155

Re: Just Getting Started???

I fixed the require error. Apparently, parentheses shouldn't be in it. :\ New problem though. I tried making a new font, but it says the font file doesn't exist. It's in the same directory. I used: titleFont = love.graphics.newFont("titleFont.tff",50); titleFont.tff is in the same director...
by Tyler821
Fri Nov 08, 2013 12:25 am
Forum: Support and Development
Topic: Just Getting Started???
Replies: 14
Views: 5155

Re: Just Getting Started???

I'm getting the hang of it now, but now I came across another problem: require() is being a complete biotch. So, I have a file called main.lua and mainmenu.lua in the main directory, and I have a libs folder with Love Frames and a font. I tried using require("libs.loveframes"); but it kee...
by Tyler821
Thu Nov 07, 2013 10:31 pm
Forum: Support and Development
Topic: Just Getting Started???
Replies: 14
Views: 5155

Just Getting Started???

Hi. I'm new to Love, but not to Lua. I've used Lua in many other scenarios, but I have to develop a videogame about taking over the world. The Love format is confusing me with the love.draw, etc. So, how would I start..? :nyu: