Search found 3550 matches
- Tue Feb 13, 2024 2:42 pm
- Forum: General
- Topic: Code Doodles!
- Replies: 196
- Views: 265132
Re: Code Doodles!
I was toying around with mazes the other day and found the recursive backtracker to be pretty easy to implement and generally nice to look at. It guarantees a maze where every spot is filled in and all spots are on a single network. There's a thread expressly dedicated to mazes: https://love2d.org/...
- Mon Feb 12, 2024 2:54 pm
- Forum: General
- Topic: Optimisation of drawing 3d
- Replies: 1
- Views: 893
Re: Optimisation of drawing 3d
I can only reply to this question: what calculations should i do in update, what is better to keep in draw, and is there any differences at all? I'm not fully sure what you mean. love.update and love.draw are executed one after the other, in that order. There's no difference other than the fact that...
- Thu Feb 01, 2024 1:11 pm
- Forum: General
- Topic: game not register 'space' while held lshift+w
- Replies: 6
- Views: 1497
- Sun Jan 21, 2024 6:12 pm
- Forum: Support and Development
- Topic: Z-sections with T-crossings
- Replies: 4
- Views: 1482
Re: Z-sections with T-crossings
The idea is quite interesting, but I'm not convinced that all possible rectangles are solvable. It's easy to come up with a dead end. For example, I took your fourth example and after the second stage, I placed the next Z on the left differently, and then one more on the right, and came up with this...
- Mon Jan 01, 2024 3:13 pm
- Forum: General
- Topic: [Just for fun] Roast my code.
- Replies: 14
- Views: 252158
Re: [Just for fun] Roast my code.
I did this myself at one point - for some unknown reason, I have one module that uses a local variable named, and a global for the rest of the program also called mouse. For a while it wasn't an issue, but when I eventually wanted to make use of the functionality of the global version, I found that...
- Sun Dec 31, 2023 12:41 pm
- Forum: General
- Topic: New User / Game Idea Help
- Replies: 5
- Views: 25389
Re: New User / Game Idea Help
I don't know that particular game, but I've played quite a few text adventure games, and even used a text adventure writing system called The Quill for ZX Spectrum and another called DAAD for PC. Most text adventures in that time were based on one- or two-word sentences: INVENTORY, TAKE GEM, OPEN CH...
- Sun Dec 31, 2023 12:14 pm
- Forum: General
- Topic: [Just for fun] Roast my code.
- Replies: 14
- Views: 252158
Re: [Just for fun] Roast my code.
Globals have two big pitfalls. First, they are prone to bugs. Consider this situation (very simplified, but hopefully you'll understand how it generalizes): function swap_a_and_b() tmp = a a = b b = tmp end a = 7 b = 8 tmp = 9 swap_a_and_b() print(tmp) You typically expect tmp to still be 9, but bei...
- Tue Dec 26, 2023 2:59 pm
- Forum: General
- Topic: I used ChatGPT
- Replies: 16
- Views: 223682
Re: I used ChatGPT
It appears that I'm smarter than ChatGPT. lol Surprised? You shouldn't ;) The formulas answered for one of the questions make no sense whatsoever (the ones "based on the ratio of the longer and shorter axes"). The answer you need is: local speed = 1 -- in pixels per second local dt = 1/60...
- Mon Dec 25, 2023 12:53 pm
- Forum: General
- Topic: I Imagine A Color Picker Has Been Done A Thousand Times
- Replies: 5
- Views: 21541
Re: I Imagine A Color Picker Has Been Done A Thousand Times
I'm not sure which method is best suited for a more complex game. Interested in hearing others' opinions on this. If you don't care missing presses or releases within a single frame, then you're good using isScancodeDown (generally speaking, always avoid isDown, for the benefit of non-QWERTY keyboa...
- Fri Dec 15, 2023 11:18 pm
- Forum: Support and Development
- Topic: Black screen
- Replies: 11
- Views: 38613
Re: Black screen
Maybe you wanted to use love.graphics.setBackgroundColor instead?