Search found 9 matches

by kirbunkle
Fri Mar 27, 2015 4:33 am
Forum: Support and Development
Topic: love.graphics.setColor not persistent
Replies: 8
Views: 3931

Re: love.graphics.setColor not persistent

I've looked into your snippet more carefully and realized that this lines: if layer.opacity then love.graphics.setColor(r, g, b, a) end are inside the first loop "for x = minx,maxx do". So, presumably, this is the place where goes color setting. Wow. Chalk this one up to bad code formatti...
by kirbunkle
Fri Mar 27, 2015 12:59 am
Forum: Support and Development
Topic: love.graphics.setColor not persistent
Replies: 8
Views: 3931

Re: love.graphics.setColor not persistent

In case anyone really wants to see my full modified code, here it is. -- see https://love2d.org/wiki/TiledMapLoader for latest version -- loader for "tiled" map editor maps (.tmx,xml-based) http://www.mapeditor.org/ -- supports multiple layers -- NOTE : function ReplaceMapTileClass (tx,ty,...
by kirbunkle
Fri Mar 27, 2015 12:52 am
Forum: Support and Development
Topic: love.graphics.setColor not persistent
Replies: 8
Views: 3931

Re: love.graphics.setColor not persistent

I modified the code to provide more debug output: for x = minx,maxx do for y = miny,maxy do if layer.opacity then print(x, y, love.graphics.getColor()) end local gfx = gTileGfx[TiledMap_GetMapTile(x,y,z)] if (gfx) then local sx = x*kTileSize - camx + screen_w/2 local sy = y*kTileSize - camy + screen...
by kirbunkle
Fri Mar 27, 2015 12:36 am
Forum: Support and Development
Topic: love.graphics.setColor not persistent
Replies: 8
Views: 3931

Re: love.graphics.setColor not persistent

What modifications has been made? Especially with TiledMap_GetMapTile function. The only modifications are the ones in the code snippet (except just that when I read in an opacity I set it to the layer). As far as I understand , nothing should be resetting the color in between me setting it and me ...
by kirbunkle
Thu Mar 26, 2015 9:04 pm
Forum: Support and Development
Topic: love.graphics.setColor not persistent
Replies: 8
Views: 3931

Re: love.graphics.setColor not persistent

What modifications has been made? Especially with TiledMap_GetMapTile function. The only modifications are the ones in the code snippet (except just that when I read in an opacity I set it to the layer). As far as I understand, nothing should be resetting the color in between me setting it and me d...
by kirbunkle
Thu Mar 26, 2015 5:08 am
Forum: Support and Development
Topic: love.graphics.setColor not persistent
Replies: 8
Views: 3931

love.graphics.setColor not persistent

Hi all, I've modified the tiled map loader library to use the opacity setting that gets saved out with tiled map editor, however, after setting the color, it seems to be reset somehow. I'm wondering if anyone can tell me what's going on. Here's a snippet: local layer = gMapLayers[z] local r, g, b, a...
by kirbunkle
Tue Jul 17, 2012 6:38 pm
Forum: Support and Development
Topic: Mouse delay?
Replies: 9
Views: 3795

Re: Mouse delay?

I'm glad I could help! :D It's there to prevent screen tearing . I have no idea about CPU usage sorry. :D Using dt properly inside love.update means the framerate won't affect the speed of things in game. Maybe I'll play with it to see if there's any negative effects. Now that I know what I can do ...
by kirbunkle
Tue Jul 17, 2012 6:15 pm
Forum: Support and Development
Topic: Mouse delay?
Replies: 9
Views: 3795

Re: Mouse delay?

You may or may not want to turn vsync off using love.graphics.setMode or conf.lua (discussed further here: https://love2d.org/forums/viewtopic.php?f=4&t=9098) Amazing, it works. The delay is gone. But I noticed that the fps shot up to like 500. Are there any reasons why I would want to leave vs...
by kirbunkle
Tue Jul 17, 2012 8:28 am
Forum: Support and Development
Topic: Mouse delay?
Replies: 9
Views: 3795

Mouse delay?

I've noticed that there is a small delay between when the actual mouse moves and when I draw my custom mouse. I draw it as just an image using the mouse.getPosition() coordinates to find out where to put it, but it always seems to be just a split second behind. It is noticeable. It seems to be an is...