Search found 59 matches
- Sat May 12, 2018 6:20 pm
- Forum: General
- Topic: Is this a good way to handle tile collision and generation?
- Replies: 8
- Views: 5292
Re: Is this a good way to handle tile collision and generation?
These articles are really old (like me), but do cover some interesting approaches in dealing with tile-based games, walkablility, layering and so on. They're not Love2d or even Lua-based, but the concepts are applicable to anything. https://www.gamedev.net/articles/programming/general-and-gameplay-p...
- Sat May 12, 2018 5:56 pm
- Forum: Games and Creations
- Topic: First project with Lua and LOVE, would love some feedback if possible
- Replies: 5
- Views: 4452
Re: First project with Lua and LOVE, would love some feedback if possible
Oh cool! I will look into that. I guess it makes sense; the global scope is a table, and if you can change its metatable you could detect writes. Thanks
- Sat May 12, 2018 5:47 pm
- Forum: Games and Creations
- Topic: First project with Lua and LOVE, would love some feedback if possible
- Replies: 5
- Views: 4452
Re: First project with Lua and LOVE, would love some feedback if possible
It's weird - the "global by default, implicit declaration" approach seems utterly wrong to me, coming from a c/c++ background too. I distinctly remember hating AS2 for this very reason. I get where it comes from though, as it's mostly used as a scripting language. Wish there was a "us...
- Fri May 11, 2018 11:49 am
- Forum: Support and Development
- Topic: Make an object face the mouse cursor?
- Replies: 6
- Views: 4659
Re: Make an object face the mouse cursor?
Good point on the radians there, that might not be obvious to everyone. Another thing I didn't actually mention is that I'm assuming the position of A (the player) is also the centre of rotation for it - if you draw the player at that position without an offset, it would naturally rotate around the ...
- Fri May 11, 2018 11:18 am
- Forum: Support and Development
- Topic: Make an object face the mouse cursor?
- Replies: 6
- Views: 4659
Re: Make an object face the mouse cursor?
"math.atan2" is indeed the right answer :) But to be more specific, but still with zero code - I was confused on how to go about making a player face towards the mouse The "player" isn't special. The "mouse" isn't special. If you think about it in those terms you'll be ...
- Fri May 11, 2018 10:50 am
- Forum: Support and Development
- Topic: Fixing color 'issues' brought in by 11.0
- Replies: 3
- Views: 2501
Re: Fixing color 'issues' brought in by 11.0
In Notepad++ (it's probably similar in other editors) you can do a regex search/replace easily enough. Search : (0x[0-9a-f][0-9a-f]) Replace : \1/255 That would work nicely on your dictionary file - for more general use-cases you'd need to make a better regexp - that one would for example see "...
- Tue May 08, 2018 3:18 pm
- Forum: Support and Development
- Topic: Multiplayer using sock.lua | Can't host a server
- Replies: 17
- Views: 14435
Re: Multiplayer using sock.lua | Can't host a server
Might be a long shot, but if your friend can host it and you can connect, but not vice-versa, check your firewall settings.
- Tue Apr 10, 2018 8:59 pm
- Forum: Support and Development
- Topic: Is there an effective way to cut down lag?
- Replies: 26
- Views: 18356
Re: Is there an effective way to cut down lag?
Is there a way to upvote comments here?
- Mon Apr 09, 2018 2:51 pm
- Forum: Support and Development
- Topic: Hitbox Help (Issue With Locations)
- Replies: 3
- Views: 2562
Re: Hitbox Help (Issue With Locations)
Oh I didn't mention it above, but it's worth mentioning - Lua uses implicit global scope. What this means, for example, is that your global "bullet" variable which you set in `love.load` on line 15 is being overwritten by the variable called "bullet" in your `enemy:fire()` functi...
- Mon Apr 09, 2018 2:15 pm
- Forum: Support and Development
- Topic: Hitbox Help (Issue With Locations)
- Replies: 3
- Views: 2562
Re: Hitbox Help (Issue With Locations)
Hi Loyfe :) I don't think you have a problem with hitboxes - your entire logic flow seems a bit confused as to what it's trying to achieve. You declare a global variable `bullet` on line 15 in `love.load`, then inside `love.update` you create (or set) another global variable called `bullets` which s...