Search found 12 matches
- Thu Aug 22, 2024 12:34 am
- Forum: General
- Topic: What is your solution to inventory management?
- Replies: 7
- Views: 17986
Re: What is your solution to inventory management?
I’m making a roguelike dungeon crawler and I’m batting around number of different questions for my game, like if items should be sellable. That is, should the player have a reason to carry items they don’t intend to use. If no, the inventory should limit their ability to carry assistive items like p...
- Wed Aug 21, 2024 2:42 pm
- Forum: General
- Topic: Atom alternatives
- Replies: 12
- Views: 26019
Re: Atom alternatives
Please don’t edit /etc/paths. If you’re trying to add something to your path, you would edit the environment variable PATH, but that shouldn’t be necessary for this. VS Code had a love2d extension that adds a command to run the love executable with the current project. You can just install love2d as...
- Wed Aug 21, 2024 2:37 pm
- Forum: General
- Topic: Hesitate to come back on Love2D
- Replies: 12
- Views: 24498
Re: Hesitate to come back on Love2D
You absolutely do not have to use classes or OOP in Love2D. In fact, in my game, I don’t use any classes at all, just tables and functions. I generally dislike OOP. It is an okay system for code organization, but makes it really difficult to track object lifecycles in my experience. So just write yo...
- Fri Aug 16, 2024 11:56 pm
- Forum: Support and Development
- Topic: Coroutines any advantage in my case ?
- Replies: 7
- Views: 7443
Re: Coroutines any advantage in my case ?
You probably shouldn’t use coroutines to solve architectural problems for your game. First of all, coroutines in Lua don’t give you parallel execution. You’re still running with one thread, that thread is just bouncing between different stacks as it moves from one coroutine to another. You need to u...
- Tue Jul 09, 2024 9:25 pm
- Forum: Support and Development
- Topic: function outputs two values, but i dont know how to use booth
- Replies: 3
- Views: 2558
Re: function outputs two values, but i dont know how to use booth
That’s weird, does it change anything if you use multiple return values instead of returning a table?
- Wed Feb 28, 2024 5:05 pm
- Forum: Support and Development
- Topic: Finding which object in the table is closest
- Replies: 5
- Views: 3448
Re: Finding which object in the table is closest
You don’t even have to sort the list of enemies. For each tower, walk through the list of all enemies (using a for loop), keeping track of the “closest enemy so far” and how far away from the tower they are. When you get to the end of the list, you know “closest so far” is actually the closest, peri...
- Fri Feb 23, 2024 4:32 pm
- Forum: Support and Development
- Topic: Trying to figure out collision with tiles in platformer game
- Replies: 11
- Views: 3811
Re: Trying to figure out collision with tiles in platformer game
Honestly don’t worry about performance at first, there re ways to make collision checking faster later (using some kind of spatial partitioning data structure for everything your player could collide with). Having blocks that each have their own dimensions and a position that isn’t necessarily snapp...
- Mon Feb 05, 2024 1:23 am
- Forum: Support and Development
- Topic: How to get the position of a moving object once? without it being updated
- Replies: 2
- Views: 1540
Re: How to get the position of a moving object once? without it being updated
If you’re hung up on efficiency, hence having trouble choking from your 10 ideas, try not to worry about it!
If that’s not possible, implement Bobbie68’s idea as a ring buffer.
If that’s not possible, implement Bobbie68’s idea as a ring buffer.
- Sat Feb 03, 2024 6:16 pm
- Forum: General
- Topic: Please help with my code
- Replies: 3
- Views: 2790
Re: Please help with my code
I don’t k is what anim8 is, but it expects its first parameter to be a positive integer and you aren’t passing anything.
- Sat Feb 03, 2024 5:53 pm
- Forum: General
- Topic: why is my code not working? (i am following sheepolution tutorial on how to make a game)
- Replies: 2
- Views: 1924
Re: why is my code not working? (i am following sheepolution tutorial on how to make a game)
Is this all of the code? If not then you need to provide everything you’ve written. Right now I don’t see self.x and self.y being set anywhere.
Also, for context, what, if any, programming background do you have?
Also, for context, what, if any, programming background do you have?