<SOLVED> Pixelated (out)lines

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
ffive
Prole
Posts: 16
Joined: Wed Oct 22, 2014 3:22 pm

<SOLVED> Pixelated (out)lines

Post by ffive »

Hi.

How to make LOVE draw sharp, pixlated lines and outlines?
Is there something to change in conf.lua or I have to write a function for that?
Last edited by ffive on Fri Dec 05, 2014 1:28 pm, edited 1 time in total.
.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Pixelated (out)lines

Post by micha »

You can set the line-style to "rough". Wiki

Code: Select all

love.graphics.setLineStyle( 'rough' )
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: <SOLVED> Pixelated (out)lines

Post by s-ol »

Disable Antialiasing in conf.lua

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
ffive
Prole
Posts: 16
Joined: Wed Oct 22, 2014 3:22 pm

Re: <SOLVED> Pixelated (out)lines

Post by ffive »

S0lll0s wrote:Disable Antialiasing in conf.lua
That doesn't solve the problem
.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙·.·˙
User avatar
D0NM
Party member
Posts: 250
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

<NOT SOLVED> Pixelated (out)lines

Post by D0NM »

Sorry for bumping,
but CONF.LUA changing had no effect.

Code: Select all

t.window.msaa = 0  -- The number of samples to use with multi-sampled antialiasing (number)
I don't want any sprites anti-aliasing feature.
Image
Here are my sprites source and the LOVE2d output at the right part of the picture.

I used to use SDL canvas with C++. Now, WebGL brings up some eyesore.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: <SOLVED> Pixelated (out)lines

Post by Davidobot »

Try doing:

Code: Select all

love.graphics.setDefaultFilter("nearest", "nearest")
At the top of your main.lua.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
D0NM
Party member
Posts: 250
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: <SOLVED> Pixelated (out)lines

Post by D0NM »

Thank you very much!
Now I'm happy with the result.

Image

Added Flip Sprite Horizontally & Vertically into the old sprite manager by Dejaime
and going to start a game.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:
User avatar
zorg
Party member
Posts: 3451
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: <SOLVED> Pixelated (out)lines

Post by zorg »

For the record, the answers of all 3 people (Micha, S0lll0s and Davidobot) are solutions to problems similar to each other; it could have been either, or a combination of them that caused your issue. :3
(You did mention pixellated lines as well as outlines; Micha's solution is for lines, S0ll0s' is an "affects every drawing" thing defined in conf.lua (though editable in-code as well), and Davidobot's is applicable to images, canvases and fonts.)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests