Well iv looked and looked and i'm hoping someone can help... Iv been loving playing around with love for the last couple of weeks, made the bones of a top down shooter that's working surprisingly well! A lot of that is due to this forum and all the great posts and wiki.
So onto my issue. everything is working great except for the love.graphics.print function will not print to my screen. Animations and physics no problem but a little bit of text, oh no can't do that! Driving me bonkers.
So far iv tried messing with all the variables I can think of. Figured the default font might not be working right so I tried setting the font to one I load with no luck and also tried creating a text object and drawing that directly with still no luck. I'm setting the color opposite the background and making sure to set the xy... I am completely lost and its the only thing holding me back from doing more with my game. I'm about ready to make a sprite sheet for all my text and make my own print function but that's a lot of work i don't want to do if I can avoid it.
love.graphics.print not printing to screen!
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: love.graphics.print not printing to screen!
function love.load()
local font = love.graphics.newFont()
love.graphics.setFont( font ,144)
text = love.graphics.newText( font, 'textstring' )
end
function love.update(dt)
end
function love.draw()
love.graphics.setBackgroundColor( 1, 1, 1)
love.graphics.setColor(0, 0, 0)
love.graphics.draw(text, 25, 25)
love.graphics.print('some text' ,25, 25)
end
Not really doing anything fancy just will not show any text i try and draw.
local font = love.graphics.newFont()
love.graphics.setFont( font ,144)
text = love.graphics.newText( font, 'textstring' )
end
function love.update(dt)
end
function love.draw()
love.graphics.setBackgroundColor( 1, 1, 1)
love.graphics.setColor(0, 0, 0)
love.graphics.draw(text, 25, 25)
love.graphics.print('some text' ,25, 25)
end
Not really doing anything fancy just will not show any text i try and draw.
Last edited by dudeMan on Mon Jun 04, 2018 4:13 pm, edited 1 time in total.
Re: love.graphics.print not printing to screen!
Is that the whole code? I don't see anything wrong with that.,
Re: love.graphics.print not printing to screen!
All I get with this code is a blank window
Re: love.graphics.print not printing to screen!
The code you posted works fine on both my desktop and my old thinkpad.
I noticed you're using the 0-1 color range, which was introduced in 11.0, but you're using a variant of setFont that was removed in 0.8.0. With the old 0-255 color range (0,0,0) text on a (1,1,1) background would be pretty much invisible. Make sure you're using the correct LOVE version.
Otherwise, this seems to be a driver issue if only text fails to render. Consider updating your graphics card drivers, and post specs so that we have some more information to work with.
I noticed you're using the 0-1 color range, which was introduced in 11.0, but you're using a variant of setFont that was removed in 0.8.0. With the old 0-255 color range (0,0,0) text on a (1,1,1) background would be pretty much invisible. Make sure you're using the correct LOVE version.
Otherwise, this seems to be a driver issue if only text fails to render. Consider updating your graphics card drivers, and post specs so that we have some more information to work with.
Re: love.graphics.print not printing to screen!
Sounds like you are having the same issue as me... https://bitbucket.org/rude/love/issues/ ... ken-in-v11
I haven't used LOVE since April because of it... I'm hoping 11.2 fixes it.
I haven't used LOVE since April because of it... I'm hoping 11.2 fixes it.
Re: love.graphics.print not printing to screen!
yeah... that seems to be my exact issue. I went ahead and loaded love onto my laptop and ran it and it printed just fine! Seems to be a system specific issue. Any thoughts on what if anything i can do to help find the issue?
Re: love.graphics.print not printing to screen!
No clue TBH... I'm assuming it has to do with the graphics card, but I'm on the latest driver and haven't found any other solutions there either. If you figure it out I'd LOVE to know!
Re: love.graphics.print not printing to screen!
Ok so just a quick update! My graphics card died, it was an older amd radeon card. Luckly I had a less beefy but newer nvidia card to replace it so had no downtime. I also noticed as soon as I got an error the next time messing with my game, that the text actully showed up on screen! So its definitely a graphics card issue.
Who is online
Users browsing this forum: No registered users and 2 guests