Really mysterios problem [BlackScreen]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
buster55
Prole
Posts: 2
Joined: Sat Apr 17, 2010 11:19 am

Really mysterios problem [BlackScreen]

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Really mysterios problem [BlackScreen]

Post 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
Help us help you: attach a .love.
buster55
Prole
Posts: 2
Joined: Sat Apr 17, 2010 11:19 am

Re: Really mysterios problem [BlackScreen]

Post 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
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Really mysterios problem [BlackScreen]

Post by bartbes »

Oh shit, that wiki page sucks, I will correct it.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests