Do you have to use the callback functions?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Do you have to use the callback functions?
Hi, I've only recently begun programming in LOVE, and I'm liking it so far. However, the callback functions are a bit strange for me, and i was wondering if I could use the love lib outside of the callback functions. Thanks!
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Do you have to use the callback functions?
I assume you mean callbacks like love.keypressed and love.mousereleased? No, you don't have to use them if you don't want to. But you do need to at least use love.update and love.draw.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Do you have to use the callback functions?
You can redefine the game loop if you want.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Do you have to use the callback functions?
Oh, yeah, that too. I forgot about that.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Do you have to use the callback functions?
Yeah. So basically, the only one you have to use is love.run. Still, love.update and love.draw only makes things cleaner and easier.slime wrote:You can redefine the game loop if you want.
- slime
- Solid Snayke
- Posts: 3163
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Do you have to use the callback functions?
Indeed. Pretty much every game in existence has update and draw functions, in one form or another.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests