Search found 104 matches

by dusoft
Fri Apr 07, 2017 2:03 pm
Forum: Libraries and Tools
Topic: osmlove library (OSM maps in your Love2D projects)
Replies: 10
Views: 4152

Re: osmlove library (OSM maps in your Love2D projects)

Please, send me your ideas on what to prioritize during development. What would you use this in your games for? Generating worlds based on maps? If yes, is data table with existing structures (roads, rivers etc.) useful for you? Drawing maps in-game? If yes, what further options you need for drawing...
by dusoft
Wed Apr 05, 2017 12:03 pm
Forum: Support and Development
Topic: canvas black & white only?
Replies: 14
Views: 5239

Re: canvas black & white only?

I guess you mean the BlendModes documentation, since BlendModes have almost nothing to do with canvas'! The problem is that it's quite hard to demonstrate the different blend modes, since each of them has 8 input parameters per pixel. Just overlapping a red and a blue triangle for example won't dem...
by dusoft
Tue Apr 04, 2017 3:44 pm
Forum: Support and Development
Topic: canvas black & white only?
Replies: 14
Views: 5239

Re: canvas black & white only?

I guess you mean the BlendModes documentation, since BlendModes have almost nothing to do with canvas'! The problem is that it's quite hard to demonstrate the different blend modes, since each of them has 8 input parameters per pixel. Just overlapping a red and a blue triangle for example won't dem...
by dusoft
Tue Apr 04, 2017 10:13 am
Forum: Support and Development
Topic: canvas black & white only?
Replies: 14
Views: 5239

Re: canvas black & white only?

Tinting (coloring) the canvas if you forget to clear the drawing color back to white is not a bug. :3 (the red line drawn premultiplied and tinted red coming out as a grey line may be, though i haven't done the math on that) Well, if this is correct behaviour, then I apparently don't seem to get th...
by dusoft
Mon Apr 03, 2017 11:38 pm
Forum: Support and Development
Topic: canvas black & white only?
Replies: 14
Views: 5239

Re: canvas black & white only?

Actually, taking my statement back, I seem to have identified a bug: try this code v1: rules = { highway = { motorway = {255, 0, 0} } } map.finalstate=love.graphics.newCanvas(800, 600) love.graphics.setCanvas(map.finalstate) love.graphics.setColor(map.rules.highway['motorway']) love.graphics.line(1,...
by dusoft
Mon Apr 03, 2017 9:52 pm
Forum: Support and Development
Topic: canvas black & white only?
Replies: 14
Views: 5239

Re: canvas black & white only?

How is this not as expected? Layering behaves the same way as without a canvas. If you want to mix the color of the pixel that was under the one that you are drawing you need to change the BlendMode or alpha. A 255-alpha pixel on the default 'alpha' blendmode is going to completely replace the one ...
by dusoft
Mon Apr 03, 2017 9:49 pm
Forum: Libraries and Tools
Topic: osmlove library (OSM maps in your Love2D projects)
Replies: 10
Views: 4152

Re: osmlove library (OSM maps in your Love2D projects)

Can it create a simple political map of a region? It would be cool to be able to select individual countries, states, provinces, etc. Could be so many possibilities :) Indeed, it can draw anything based on the preset rules. However, as of now only rules for "highway" type of "ways" are supported. S...
by dusoft
Mon Apr 03, 2017 10:25 am
Forum: Support and Development
Topic: canvas black & white only?
Replies: 14
Views: 5239

Re: canvas black & white only?

OK, thanks for the answer. The culprit is the layering - when I am drawing multiple pixels over each other, the last drawn (color) takes precedence, so I'll have to layer into multiple canvas and then draw ascending by priority.

Does layering work fine when putting multiple canvas over each other?
by dusoft
Mon Apr 03, 2017 9:52 am
Forum: Libraries and Tools
Topic: osmlove library (OSM maps in your Love2D projects)
Replies: 10
Views: 4152

Re: osmlove library (OSM maps in your Love2D projects)

Indeed, creating worlds based on this was my goal (creating street network for transport game) - that's basically, why I have decided to develop this.