Search found 5 matches
- Sat Jul 11, 2020 12:16 pm
- Forum: Support and Development
- Topic: Scoping in hump gamestate.lua
- Replies: 9
- Views: 4733
Re: Scoping in hump gamestate.lua
Ok, thanks for all the help!
- Fri Jul 10, 2020 3:41 pm
- Forum: Support and Development
- Topic: Scoping in hump gamestate.lua
- Replies: 9
- Views: 4733
Re: Scoping in hump gamestate.lua
Right, I understand. I've implemented your suggestions (except for omitting parentheses), many thanks for your review. Two follow-up questions then: 1. Is local scoping everything always the ideal scenario, or are there exceptions? For example, I'm declaring fonts and sizes to be used throughout the...
- Fri Jul 10, 2020 6:17 am
- Forum: Support and Development
- Topic: Scoping in hump gamestate.lua
- Replies: 9
- Views: 4733
Re: Scoping in hump gamestate.lua
Ha, that was the missing part. As I'm not setting any default values or passing defaults upon object construction, I was under the impression I didn't need a metatable (which I do use for game entities). I understand now that it's actually the missing piece. Full working code below for whomever come...
- Thu Jul 09, 2020 7:44 pm
- Forum: Support and Development
- Topic: Scoping in hump gamestate.lua
- Replies: 9
- Views: 4733
Re: Scoping in hump gamestate.lua
First of all: zorg and pgimeno, many thanks for your help! I've re-read chapters 13.4.1 and 16 and followed your advise, but the behavior is still the same. I'll probably facepalm myself once I realize what I overlooked / misunderstood, but I still haven't been able to wrap my head around it. Here's...
- Wed Jul 08, 2020 7:59 pm
- Forum: Support and Development
- Topic: Scoping in hump gamestate.lua
- Replies: 9
- Views: 4733
Scoping in hump gamestate.lua
Hi all, I recently starting exploring Lua and Love2D and so far I'm amazed by the ease and versatility of the framework! It's been a really fun journey so far :) It didn't take long before I stumbled across the hump library and started playing with gamestate.lua , but I'm struggling to understand is...