Search found 134 matches

by Wojak
Thu Aug 14, 2014 8:20 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 410992

Re: "Questions that don't deserve their own thread" thread

That's what the code already does, but it loops around 3 times throught all lines, it might get laggy, but if this is the best way then I might write this on the loveblog, if no one minds :P If you want just translation (no scaling), you know the exact grid size and no fancy color stuff I would rec...
by Wojak
Tue Aug 12, 2014 8:29 am
Forum: Support and Development
Topic: Height boundaries don't seem to be working correctly.
Replies: 3
Views: 2384

Re: Height boundaries don't seem to be working correctly.

Well this code is strange... 1)  math.randomseed(os.time()) - is something that You usually should do once, so it should be in love.load 2) You call  target() in love.update and in love.draw and this a bad thing to do, you should make two functions targetdraw() with all the drawing stuff and targetu...
by Wojak
Mon Aug 11, 2014 9:27 am
Forum: Support and Development
Topic: Hi all! - Various questions on Love2d
Replies: 31
Views: 16100

Re: Hi all! - Various questions on Love2d

Well the only info on this parameter is: @param frames The number of frames, 0 for autodetect So there is a small chance that the behavior of this function with a negative value of the parameter is unintended (winch would be strange as You are allowed to manually add frames and it would be awful if ...
by Wojak
Mon Aug 11, 2014 7:26 am
Forum: Support and Development
Topic: Hi all! - Various questions on Love2d
Replies: 31
Views: 16100

Re: Hi all! - Various questions on Love2d

First of all download Your love file and try to run it by double-clicking... (You should read the documentation on distributing files one more time ;)) I think You should stick with the current lib (if it's missing functionality You can always expand it ;) ) You had a nice idea of solving the proble...
by Wojak
Thu Aug 07, 2014 2:52 pm
Forum: Support and Development
Topic: Hi all! - Various questions on Love2d
Replies: 31
Views: 16100

Re: Hi all! - Various questions on Love2d

local maketransparent = function(file) local imgdata = love.image.newImageData(file) for i=0,ratimgdata:getWidth()-1 do for j=0,imgdata:getHeight()-1 do local r,g,b,a = imgdata:getPixel(i,j) if r == 255 and g == 255 and b == 255 and a == 255 then imgdata:setPixel(i,j,255,255,255,0) end end end retu...
by Wojak
Thu Aug 07, 2014 12:31 pm
Forum: Support and Development
Topic: Hi all! - Various questions on Love2d
Replies: 31
Views: 16100

Re: Hi all! - Various questions on Love2d

Well the main problem is that You copy-pasted the tutorial from the wiki, without understanding it completely... The frame size in Your case is 32x48 not 96x96 (like in the tutorial) If You want something on the center of the screen, you need to get the game window size s_w,s_h = love.window.getDime...
by Wojak
Wed Aug 06, 2014 6:15 am
Forum: Support and Development
Topic: Code Structure
Replies: 14
Views: 6458

Re: Code Structure

The simplest solutions are sometimes the best. I think Plu is over thinking this one a bit... (unless this is what He meant in the first line of His post) Assuming that the set_danger method is something like this: tile_danger_level = max_bomb_range – distance_from_bomb and remove_danger is: tile_da...
by Wojak
Mon Mar 10, 2014 6:42 am
Forum: Support and Development
Topic: Position?
Replies: 4
Views: 2522

Re: Position?

An image by it self don't have a position property, to solve it you need to create a custom object that has all the property You need. The best way is using tables: local allobjects = {} -- an empty table for all objects image1= love.graphics.newImage('someimage1.png') image2= love.graphics.newImage...
by Wojak
Fri Mar 07, 2014 8:30 am
Forum: General
Topic: Delay on a loop?
Replies: 28
Views: 16090

Re: Delay on a loop?

You should check out this article: http://www.love2d.org/wiki/Game_Distribution Alternatively you can open any .love file with an archiving application, remove the content add replace it with the files and folders from Your project folder Also a blue screen is not 'nothing' but an error! You should ...
by Wojak
Wed Mar 05, 2014 7:14 am
Forum: General
Topic: Delay on a loop?
Replies: 28
Views: 16090

Re: Delay on a loop?

1) You should post a love file or post a full code in any other way 2) When posting a code on the forum use the 'code' tag 3) use the space or tab to highlight the scopes like here: http://love2d.org/forums/viewtopic.php?p=163955#p163955 In other words: “Help us to help You” the possible problems: 1...