Hi, I need someone to help me ... I'm starting in Love and when I try a simple example made by me, only I get a black window .... I do not understand why?. The main.lua I have :
function load( )
font = love.graphics.newFont( love.default_font, 12 )
love.graphics.setFont( font )
message = " Test "
player=love.graphics.newImage("player.gif")
end
function draw()
love.graphics.draw(message, 100, 100)
love.graphics.draw(player, 100, 100)
end
Gracias....
Starting with love...
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Starting with love...
That's some rather old syntax. Were did you get that from? This must be 0.5.0 or even older...
Currently, you'll want to use:
Currently, you'll want to use:
Code: Select all
function love.load( )
font = love.graphics.newFont( 12 )
love.graphics.setFont( font )
message = " Test "
player=love.graphics.newImage("player.gif")
end
function love.draw()
love.graphics.print(message, 100, 100) --i'm sorry, this shouldn't be draw
love.graphics.draw(player, 100, 100)
end
Last edited by Robin on Sat Oct 30, 2010 8:46 pm, edited 1 time in total.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Starting with love...
And even you make a mistake:
Code: Select all
function love.load( )
font = love.graphics.newFont( 12 )
love.graphics.setFont( font )
message = " Test "
player=love.graphics.newImage("player.gif")
end
function love.draw()
love.graphics.print(message, 100, 100)
love.graphics.draw(player, 100, 100)
end
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests