Tips on coding in love2d and lua

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
User avatar
Gunroar:Cannon()
Party member
Posts: 141
Joined: Thu Dec 10, 2020 1:57 am

Tips on coding in love2d and lua

Post by Gunroar:Cannon() » Sun Dec 13, 2020 2:51 pm

Can you provide advice and tips when it comes to programming. Stuff about storing variables, useful libraries and stuff. I'm not new to the engine (though I'm am ...prole at the time of this post) so I already know a few tricks of the trade but you can never know all, like recently I learnt about object pools, which seem neat enough: http://love2d.org/forums/viewtopic.php ... 98356ec796 and
https://gameprogrammingpatterns.com/object-pool.html
So any advice is appreciated. thnx.
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow

Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests