Search found 3074 matches

by zorg
Fri Oct 03, 2014 7:04 pm
Forum: General
Topic: [SOLVED] About drawing images on screen
Replies: 4
Views: 1327

Re: [QUESTION] About drawing images on screen

It does not matter where your project folder is, as long as the assets are inside that folder; love.filesystem handles files relatively, with the "top" folder being... both the project's and the save directory. As for me recommending the use of love.filesystem functions instead of io funct...
by zorg
Fri Oct 03, 2014 4:57 pm
Forum: General
Topic: [SOLVED] About drawing images on screen
Replies: 4
Views: 1327

Re: [QUESTION] About drawing images on screen

You are correct, that you are to draw things inside love.graphics, and for actually creating the stuff you want to draw (like making a new image with love.graphics.newImage) can be done as you did, in love.load, or somewhere where it's not called every frame. (calling this in love.draw would needles...
by zorg
Fri Oct 03, 2014 12:04 pm
Forum: General
Topic: this blog post looks weird
Replies: 8
Views: 2704

Re: this blog post looks weird

My guess: The code box works with one type of line-end, and it was written with anoter (e.g. CRLF and LF), but i might be wrong.
by zorg
Thu Oct 02, 2014 6:13 am
Forum: Support and Development
Topic: [SOLVED] Nested context scale doesn't work
Replies: 4
Views: 2192

Re: Nested context scale doesn't work

Sorry I should have been more clear, the scaling is an issue because I need to retain the translation and rotation but reset the scale. this is because I am drawing many canvases, then having them all added to a last one that I want to scale up. in that case, the code: love.graphics.translate(tx,ty...
by zorg
Wed Oct 01, 2014 8:07 am
Forum: Support and Development
Topic: [SOLVED] Nested context scale doesn't work
Replies: 4
Views: 2192

Re: Nested context scale doesn't work

Untested, but you probably want something like this: function love.draw() love.graphics.push() love.graphics.scale(scale) love.graphics.push() love.graphics.origin() -- the addition; reset all transformations. love.graphics.scale(1) -- This does not work at all local w, h = love.graphics.getWidth(),...
by zorg
Wed Sep 17, 2014 7:40 am
Forum: Support and Development
Topic: String format related question
Replies: 5
Views: 2431

Re: String format related question

Edit: Roland explained what i tried to better below me DaedalusYoung probably meant this then: TEsound.play("assets/music/" .. songname[filename] .. ".mp3") On the other hand, when sorting, you could sort with using gsub and a pattern that returns only what's after the last /, o...
by zorg
Wed Sep 10, 2014 9:57 am
Forum: General
Topic: Checking pixels on a line
Replies: 4
Views: 1823

Re: Checking pixels on a line

Keep in mind that using getPixel constantly is probably (a lot) slower than pulling the whole image into a lua-table and accessing that. On the other hand, tables have some overhead in memory, while imagedata is (to my knowledge) just a simple c array holding byte quadruplets for the pixel colors; ...
by zorg
Wed Aug 27, 2014 6:33 pm
Forum: General
Topic: ABC Music Notation and how bad it sounds
Replies: 12
Views: 4192

Re: ABC Music Notation and how bad it sounds

what i hear on win7: https://dl.dropboxusercontent.com/u/36445632/music/teddybearpicnic_test.mp3 By the way, if you want a more consistent sounding track, why not just use a module format like .mod (that libmodplug also supports)? with samples that were used in chiptunes, it can easily be used to cr...
by zorg
Thu Aug 21, 2014 9:08 pm
Forum: Libraries and Tools
Topic: [Lib-Tool] Multi-partite Performance Graph
Replies: 1
Views: 1245

[Lib-Tool] Multi-partite Performance Graph

Hi everyone! Looking through the forums, i saw a post in a thread having a screenshot and code snippet for a pretty simple minecraft-like performance graph. I thought i'd make it a bit more interesting, so (with the approval of the original coder) here's my first released library, a multipartite per...
by zorg
Thu Aug 14, 2014 3:36 pm
Forum: Support and Development
Topic: Canvases and thin lines.
Replies: 7
Views: 1533

Re: Canvases and thin lines.

veethree wrote:But why?
This post has a neat image that i think explains it (i think) :3

...also, the whole tread actually.