This is Bibhandgemalt.
love.graphics.line, circle and rectangle to make them look like they where painted with a pen.
Instructions in the file.
A lib that when loaded and activated intercepts Bibhandgemalt
- BrotSagtMist
- Party member
- Posts: 661
- Joined: Fri Aug 06, 2021 10:30 pm
Bibhandgemalt
- Attachments
-
- bibhandgemalt.zip
- (5.46 KiB) Downloaded 141 times
Last edited by BrotSagtMist on Tue Oct 04, 2022 5:25 pm, edited 2 times in total.
obey
Re: Bibhandgemalt
That is a neat effect and the demo with showcase is nice as well.
1) Would be nice if it worked with text and love.graphics.polygon
For example when shapes are drawn like this:
2) When drawing rectangles with "line" style then setLineWidth () has no effect.
(the rect outline is always 1 pixel wide)
As test, I added it to my game viewtopic.php?p=250233#p250233 See the screenshots, to be honest it did not look as good as I had hoped but I did not try any adjustments yet. Just added BH.on() on top main.lua
I think there is lots of potential in this lib.
3) Somehow it draws over the letter-boxes of TLfres (yes, I know it an older lib and my version is a bit customized)
4) It seems as if canvases are drawn with transparent alpha when handgemalt is active?
1) Would be nice if it worked with text and love.graphics.polygon
For example when shapes are drawn like this:
Code: Select all
love.graphics.polygon ("line", v.b:getWorldPoints(v.s:getPoints()))
(the rect outline is always 1 pixel wide)
As test, I added it to my game viewtopic.php?p=250233#p250233 See the screenshots, to be honest it did not look as good as I had hoped but I did not try any adjustments yet. Just added BH.on() on top main.lua
I think there is lots of potential in this lib.
3) Somehow it draws over the letter-boxes of TLfres (yes, I know it an older lib and my version is a bit customized)
4) It seems as if canvases are drawn with transparent alpha when handgemalt is active?
- BrotSagtMist
- Party member
- Posts: 661
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Bibhandgemalt
Polygons are not in my scope really. Anyone advanced enough to use them could write such lib themself.
This lib basically only uses love.graphics.points.
I can probably just add setLineWidth=setPointSize to make thickness work, ill add that if i do an update.
BUT the pen styles have their own thickness already.
It draws over the letterbox?
No it should not mess with any canvas stuff.
Looking at your circles i should tweak the default values to something sane, but hey it works, not bad for a drop in.
This lib basically only uses love.graphics.points.
I can probably just add setLineWidth=setPointSize to make thickness work, ill add that if i do an update.
BUT the pen styles have their own thickness already.
It draws over the letterbox?
No it should not mess with any canvas stuff.
Looking at your circles i should tweak the default values to something sane, but hey it works, not bad for a drop in.
obey
- BrotSagtMist
- Party member
- Posts: 661
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Bibhandgemalt
The new default values do look nicer.
The blue rectangle is the playable area where stuff gets drawn. The red circle at bottom left should only be barely visible since it is "off screen." (compare with attachment without handgemalt)
download/file.php?id=21586
How can I just post a link to the attached picture without it automatically showing as picture?
Yes, or rather pillarbox in this case. https://en.wikipedia.org/wiki/Pillarbox
The blue rectangle is the playable area where stuff gets drawn. The red circle at bottom left should only be barely visible since it is "off screen." (compare with attachment without handgemalt)
download/file.php?id=21586
How can I just post a link to the attached picture without it automatically showing as picture?
- BrotSagtMist
- Party member
- Posts: 661
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Bibhandgemalt
Huh i can not explain this.
I dont even see how this picture can be transformed into the upper picture by this lib
Like this are circle silouhetes and the lib tries to fill them.
And anything that covers this circle at the letterbox would cover the lib circles too.
Fun fun fun.
I dont even see how this picture can be transformed into the upper picture by this lib
Like this are circle silouhetes and the lib tries to fill them.
And anything that covers this circle at the letterbox would cover the lib circles too.
Fun fun fun.
obey
Re: Bibhandgemalt
It is a mystery.
Here is another strange effect, which I guess has to do with transparency of canvases.
Sorry, I am too lazy to make a minimal test example:
1) Start the gamebasewithhandgemalt24092022.love
2) Press space to switch from "single view" to "multiple view"
3) Use asdw to move around in the top left screen. all is well.
4) Now uncomment --BH.on() in line 2 of main.lua
5) Start, press space, move around
6) Notice how the static single-view level is still drawn in the background.
7) Comment out line 11 drawLevel (0,20,0,20) in ingame.lua and there is no more "over draw"
My ingameDraw function is something like:
So it draws the level and if "splitscreen" is active then it just draws those extra views on top of the single-view. (this is just wip-code, obviously)
Thing is, when handgemalt is active then the drawLevel (0,20,0,20)'s graphics are still visible, while without handgemalt they get fully drawn over by the other draw-stuff.
It could well be something wrong in my code, so I do not want to see you on a wild goose chase. Just thought it was interesting.
Here is another strange effect, which I guess has to do with transparency of canvases.
Sorry, I am too lazy to make a minimal test example:
1) Start the gamebasewithhandgemalt24092022.love
2) Press space to switch from "single view" to "multiple view"
3) Use asdw to move around in the top left screen. all is well.
4) Now uncomment --BH.on() in line 2 of main.lua
5) Start, press space, move around
6) Notice how the static single-view level is still drawn in the background.
7) Comment out line 11 drawLevel (0,20,0,20) in ingame.lua and there is no more "over draw"
My ingameDraw function is something like:
Code: Select all
drawLevel (0,20,0,20)
printAllPlayers (800,20)
drawUnits ()
if splitScreen then
for i=1, #views do
drawView(views[i])
end
Thing is, when handgemalt is active then the drawLevel (0,20,0,20)'s graphics are still visible, while without handgemalt they get fully drawn over by the other draw-stuff.
It could well be something wrong in my code, so I do not want to see you on a wild goose chase. Just thought it was interesting.
- Attachments
-
- gamebasewithhandgemalt24092022.love
- (19.15 KiB) Downloaded 136 times
- BrotSagtMist
- Party member
- Posts: 661
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Bibhandgemalt
Oh i had wrong defaults for rectangles too.
Fixed they look pretty nice.
Okey it took me way longer to see this too so dont feel ashamed: There is no bug. Its behaving exactly as it is supposed to do.
Youre overwriting your entire screen with black bars, these black bars now have holes in them, the holes are partly defined by their shape, so being a long vertical block they just have this pattern:
Personally id say this looks like a mayor resource waste. You can just make these bars using scissors which stop rendering in that area instead to render and then overwrite it.
You can _fix_ this by just moving BH.on() under your require stack since the black bars apparently make their own copy of rectangle.
Also note that your game screen appears to be rendered several times, see how thick the right boxes are compared to the left.
Fixed they look pretty nice.
Okey it took me way longer to see this too so dont feel ashamed: There is no bug. Its behaving exactly as it is supposed to do.
Youre overwriting your entire screen with black bars, these black bars now have holes in them, the holes are partly defined by their shape, so being a long vertical block they just have this pattern:
Personally id say this looks like a mayor resource waste. You can just make these bars using scissors which stop rendering in that area instead to render and then overwrite it.
You can _fix_ this by just moving BH.on() under your require stack since the black bars apparently make their own copy of rectangle.
Also note that your game screen appears to be rendered several times, see how thick the right boxes are compared to the left.
obey
Re: Bibhandgemalt
Ah, yes, so obvious in hindsight. The solid filled rects are just not fully opaque anymore.BrotSagtMist wrote: ↑Sat Sep 24, 2022 6:22 pm...these black bars now have holes in them, the holes are partly defined by their shape, so being a long vertical block they just have this pattern:
Thanks, I did not not know about scissors. I think in this case the resource waste is negligible because the game's whole graphics are only a dozen circles and some lines.Personally id say this looks like a mayor resource waste. You can just make these bars using scissors which stop rendering in that area instead to render and then overwrite it.
I think that is just a left-over test code that I had forgotten.Also note that your game screen appears to be rendered several times, see how thick the right boxes are compared to the left.
In file ingame.lua, line 11 there is drawLevel (0,20,0,20)
That line is not needed and its output gets overdrawn by the actual graphics. Just with the handgemalt it became noticeable.
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Bibhandgemalt
I'm telling the truth.BrotSagtMist wrote: ↑Sat Sep 24, 2022 11:24 am
love.graphics.line, circle and rectangle to make them look like they where painted with a pen.
The ding dong truth.
I SWEAR ON THE RED-EYED-DEATH-OGRE-EATING-DRAGON THAT LIVES UNDER MY BED I WAS WISHING A LIB LIKE THIS EXISTED JUST THE OTHER DAY!!
I haven't visited the library section of the forum in years
Wow, real nice. What does it mean? Bib...hand painted? Baby paint?
Maybe you could make it more sketch like (edit: I mean chaotic) with different passes or something ... I don't know, kinda like this
Who is online
Users browsing this forum: Amazon [Bot] and 4 guests