Page 1 of 1

Really mysterios problem [BlackScreen]

Posted: Sat Apr 17, 2010 11:34 am
by buster55
Hi !
I've a big problem with many games/projects are posted here. When I start a love file I just see a black screen and nothing happens. :ehem:
I tried to make a simple animation with anal but i have the same problem. ( just this example http://love2d.org/wiki/AnAL )
I'am using Windows 7 32bit.

Can anybody help me ? That would be great!

//Code of my examplecode
of course the used files are existing

Code: Select all

require( 'AnAL.lua' )





function load()
   local img  = love.graphics.newImage("exp.png")
   anim = newAnimation(img, 96, 96, 0.1, 0)

end

function update(dt)
   -- Updates the animation. (Enables frame changes)
   anim:update(dt)  
end

function draw()
   -- Draw the animation at (100, 100).
  	if love.keyboard.isDown( ' ' ) then 
  anim:draw(100, 100)
  end
end

Re: Really mysterios problem [BlackScreen]

Posted: Sat Apr 17, 2010 12:01 pm
by Robin
Are you using LÖVE 0.6.0?

If so, the API has changed considerably since 0.5.0, see http://love2d.org/wiki/0.6.0.

Specifically, load() is now called love.load(), update() love.update() and draw() love.draw(). Also see http://love2d.org/wiki/love#Callbacks

Re: Really mysterios problem [BlackScreen]

Posted: Sat Apr 17, 2010 12:09 pm
by buster55
B!G THX

the solution for people having the same problem

Code: Select all

require( 'AnAL.lua' )





function love.load()
   local img  = love.graphics.newImage("exp.png")
   anim = newAnimation(img, 96, 96, 0.1, 0)

end

function love.update(dt)
   -- Updates the animation. (Enables frame changes)
   anim:update(dt)
end

function love.draw()
   -- Draw the animation at (100, 100).
     if love.keyboard.isDown( ' ' ) then
  anim:draw(100, 100)
  end
end
sorry for this noobquestion - iam new at this language :)
If you need help @ Delphi you can ask me :nyu:

greetz

Re: Really mysterios problem [BlackScreen]

Posted: Sat Apr 17, 2010 2:03 pm
by bartbes
Oh shit, that wiki page sucks, I will correct it.