Page 1 of 1

Graphics appears and disappears again. Why?

Posted: Sun Jul 10, 2011 4:22 am
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

Re: Graphics appears and disappears again. Why?

Posted: Sun Jul 10, 2011 6:04 pm
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.