Graphics appears and disappears again. Why?

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
BorzoyExist
Prole
Posts: 3
Joined: Sat Jul 09, 2011 7:27 am

Graphics appears and disappears again. Why?

Post by BorzoyExist »

I'm making the game with the top view(2d), I made stuff for completing the window with fields, main character can walk among them with left, right, up, down, and I tried to make new fields appear when character goes from main window, but there is just black color, I made fields appear, but they only exists for half a seconds and then they disappears again. I tried a lot, I really need some help. I think I just don't understand how engine works. Also I think I need to use love.update(dt). Please do not ignore this request! If You need more information for helping. Contact my e-mail: moroz_fil@mail.ru
Thanks :)
,Philipp
Attachments
engine.love
Its full folder with game.
(36.37 KiB) Downloaded 175 times
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Graphics appears and disappears again. Why?

Post by T-Bone »

You cannot call love.graphics-functions from anything other than the function love.draw(). In love.keypressed(), you call your add pole-functions, which in turn call love.graphics.draw(). That doesn't work.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests