Search found 31 matches
- Tue Feb 23, 2021 5:23 pm
- Forum: General
- Topic: Any idea in implementing steering behaviour
- Replies: 19
- Views: 1522
Re: Any idea in implementing steering behaviour
https://natureofcode.com/book/chapter-6-autonomous-agents/ this book is very nice and free btw the weighing part is something like this in pseudocode 0.4 * pathfollowing + 0.6 * obstacle avoidance = the force you want to apply this frame oh and obstacle avoidance is basically just calculating a forc...
- Wed Jan 13, 2021 2:18 pm
- Forum: Libraries and Tools
- Topic: Let's Make Useful LOVE2D Extensions For Coders!
- Replies: 3
- Views: 2959
- Sun Dec 13, 2020 1:44 am
- Forum: Support and Development
- Topic: Worried about continuing my relationship with LÖVE :(
- Replies: 9
- Views: 2474
Re: Worried about continuing my relationship with LÖVE :(
Programming languages aren't monogamous!
It's good to snoop around occasionally
It's good to snoop around occasionally
- Fri Dec 04, 2020 5:13 pm
- Forum: General
- Topic: Looking for advice
- Replies: 9
- Views: 7860
Re: Looking for advice
My advice would be to not upfront pick OOP or ECS, both have their advantages for specific cases but none of them are necessary at all. Lua is a prototype based language meaning you dont need all the OOP jazz at all, and when you arent developing a RPG with countless enemy types and effects i person...
- Sun Nov 15, 2020 4:36 pm
- Forum: General
- Topic: I want to know the process of erasing bullets in a shooting game
- Replies: 4
- Views: 4576
Re: I want to know the process of erasing bullets in a shooting game
Instead of all the instancing, adding and deleting from a list you could also look at a Pool Bullets are the perfect case for them I think. edit: here is a little example of a very simple pool implementation in action in love2d: 50k bullets onscreen runs smoothly at 60fps on my low end machine over ...
- Sun Nov 01, 2020 8:07 am
- Forum: Libraries and Tools
- Topic: lovemi: Integrate the Konami code +custom patterns (cheats!)
- Replies: 7
- Views: 4300
Re: lovemi: Integrate the Konami code +custom patterns (cheats!)
"if the pattern is entered within a span of 2 seconds from the first keypress to the last."
I havent used the library (yet) but in the linked example :
https://github.com/Ulydev/lovemi/blob/m ... e/love.lua
it looks like you can just do : to get your desired behaviour
I havent used the library (yet) but in the linked example :
https://github.com/Ulydev/lovemi/blob/m ... e/love.lua
it looks like you can just do :
Code: Select all
duration = 2
- Mon Sep 14, 2020 8:15 am
- Forum: Support and Development
- Topic: Getting a key as a number
- Replies: 8
- Views: 4639
Re: Getting a key as a number
I am not sure I understand completely,
but do you mean something like this:
which will print
1 10
2 11
3 12
that 'k' here is the key (1,2,3) and the 'v' is the value (10,11,12)
but do you mean something like this:
Code: Select all
local var = {10,11,12}
for k,v in ipairs(var) do
print(k,v)
end
1 10
2 11
3 12
that 'k' here is the key (1,2,3) and the 'v' is the value (10,11,12)
- Wed Sep 02, 2020 10:58 am
- Forum: Games and Creations
- Topic: Fast 2D mesh animation
- Replies: 9
- Views: 5352
Re: Fast 2D mesh animation
Hi RNavega, cool stuff, i am a bit new to blender and have installed 2.83. I had to make quite some changes to the python script, but i *think* its working. (its exporting some other blend files now) could you put the original .blend file in the repo so i can test if the output is identical? Ill mak...
- Wed Aug 12, 2020 8:56 am
- Forum: Support and Development
- Topic: Unable to use variables from another class in a class
- Replies: 3
- Views: 1022
Re: Unable to use variables from another class in a class
when you want to use a variable in some code you have to have access to that variable - one way would be by having that variable global, in your main function you have a love.load() with these 2 variables obstacle1 obstacle2 so if you would use either obstacle1 or obstacel2 in that Player:update() f...
- Sat Jul 11, 2020 10:18 am
- Forum: Support and Development
- Topic: Sound Pool (manager)
- Replies: 5
- Views: 1015
Re: Sound Pool (manager)
Not a pool implementation, but are you aware you can use clone() on the Source ?
that way you can play the same sound many times
https://love2d.org/wiki/Source:clone
that way you can play the same sound many times
https://love2d.org/wiki/Source:clone