Search found 18 matches

by mcjohnalds45
Sat Jun 15, 2013 4:01 am
Forum: Support and Development
Topic: Any way to extend love objects? [Solved]
Replies: 3
Views: 2446

Re: Any way to extend love objects?

I just felt it made more sense to put functions like that into the only object it's going to be used on anyway. Thanks for that code though, I never think of doing that!
by mcjohnalds45
Sat Jun 15, 2013 2:32 am
Forum: Support and Development
Topic: Any way to extend love objects? [Solved]
Replies: 3
Views: 2446

Any way to extend love objects? [Solved]

Is there any way to add functions to love objects from within love2d without having to compile your own love2d?

E.g

Code: Select all

function love.Image:getSize()
	return self:getWidth(), self:getHeight()
end

hamster = love.graphics.newImage('hamster.png')

print(hamster:getSize()) -- Prints 128, 128
by mcjohnalds45
Mon Apr 08, 2013 10:09 am
Forum: Support and Development
Topic: Love2d lags with any game on ubuntu [solved, thanks T-Bone!]
Replies: 6
Views: 3154

Re: Love2d lags with any game on ubuntu

Yippy!!! Thanks, it's running super smooth now.
by mcjohnalds45
Sun Apr 07, 2013 11:44 pm
Forum: Support and Development
Topic: Love2d lags with any game on ubuntu [solved, thanks T-Bone!]
Replies: 6
Views: 3154

Love2d lags with any game on ubuntu [solved, thanks T-Bone!]

PROBLEM SOLVED, THANKS T-Bone All love2d games make my whole system lag to the point where everything is unplayable. Total CPU usage jumps from 5-10% to 50-60% when love2d starts, even just with the piggy. I can run what should be much more cpu intensive games just fine. System info , kind of outda...
by mcjohnalds45
Mon Dec 31, 2012 2:17 am
Forum: Support and Development
Topic: Can't find tutorials for 'love.graphics'
Replies: 3
Views: 1879

Re: Can't find tutorials for 'love.graphics'

You can just draw things directly to the screen in love.draw, e.g:

Code: Select all

function love.draw()
	love.graphics.print("Hello World", 400, 300)
end
by mcjohnalds45
Mon Dec 31, 2012 2:07 am
Forum: Support and Development
Topic: How to shorten a string?
Replies: 6
Views: 2880

Re: How to shorten a string?

Use love.timer.getTime() to return the seconds since startup and math.floor() to round it down to a whole number, so change line six to: time_passed = math.floor(love.timer.getTime()) Or alternatively in this case just change line ten to the following and forget about time_passed. love.graphics.prin...
by mcjohnalds45
Mon Dec 31, 2012 1:50 am
Forum: Support and Development
Topic: Why can't I see particles on a white background?
Replies: 3
Views: 2413

Re: Why can't I see particles on a white background?

I don't really know how blending and particles and other what-not works so I've tried messing with setColor, setBlendMode, setColorMode and the color of the particle sprite image used, nothing works. :( Right now I've just got the following, works on a black background, not on a white. function love...
by mcjohnalds45
Sat Dec 29, 2012 10:27 am
Forum: Support and Development
Topic: Why can't I see particles on a white background?
Replies: 3
Views: 2413

Why can't I see particles on a white background?

The closer the background is to white the less visible the particles are, can someone explain what's going on and how to go around it?
by mcjohnalds45
Mon Aug 13, 2012 8:43 am
Forum: Support and Development
Topic: Setting up love with Lua Development Tools
Replies: 3
Views: 3636

Re: Setting up love with Lua Development Tools

Note: Enclose an argument containing spaces using double-quotes ("). Well I'm incredibly silly for missing that, but using double quotes didn't work, neither did using ${project_loc} or creating a new project without the space in it's name (and changing the run config accordingly). But thanks ...
by mcjohnalds45
Sun Aug 12, 2012 6:06 am
Forum: Support and Development
Topic: Setting up love with Lua Development Tools
Replies: 3
Views: 3636

Setting up love with Lua Development Tools

I'm trying to set up love with the standalone version of LDT, I've got the love lua documentation working I just can't set up the run configuration to launch love2d with my game (right now I just get a rubber piggy popping up). (I'm on ubuntu 12.04 btw) Screenshot of what my eclipse looks like KTuxQ...