Search found 243 matches

by MrFariator
Sun Mar 21, 2021 6:44 pm
Forum: General
Topic: Example code of Platformer AI
Replies: 15
Views: 6674

Re: Example code of Platformer AI

What kind of AI do you need, specifically? If you mean enemy AI, then often those are driven by querying player's position in some fashion (eq. to check which direction to attack, when to awaken and become aggressive, etc), and some sensors (an enemy that might jump over obstacles queries the world ...
by MrFariator
Sun Mar 21, 2021 4:04 pm
Forum: Support and Development
Topic: Integrating Effekseer's efk files
Replies: 9
Views: 3928

Re: Integrating Effekseer's efk files

As far as I can tell, there isn't any easy solution to your conundrum. To me it seems you'd have to grab the code for Effekseer's OpenGL branch, and write some wrapper around it to include it in your project (the help page for Cocos2d may be useful here). Even then, you'd have to make it play ball w...
by MrFariator
Wed Mar 17, 2021 3:59 pm
Forum: Support and Development
Topic: Problem launching project
Replies: 1
Views: 997

Re: Problem launching project

You have written "load.update(dt)", where I presume you meant to write "love.update(dt)" instead. Same goes for "load.draw()". The error arises from your attempt to effectively index load like it is a table, even though it's a function value, hence the error.
by MrFariator
Wed Mar 17, 2021 7:38 am
Forum: General
Topic: Fast Rope Physics for bump.lua?
Replies: 21
Views: 5897

Re: Fast Rope Physics for bump.lua?

pgimeno is asking about how should the ropes ultimately behave, and your existing code (the test case) only gives us some vague entity representation that a rope should in your opinion have. What does it mean for the rope to have width and height, or even velocity? Do you actually want ropes to have...
by MrFariator
Tue Mar 16, 2021 5:43 pm
Forum: General
Topic: Fast Rope Physics for bump.lua?
Replies: 21
Views: 5897

Re: Fast Rope Physics for bump.lua?

You could use bump's querySegment or querySegmentWithCoords functions to check the rope's path from its origin to where it's supposed to end up. If any collisions happen between the origin and goal, draw a line between the origin and the appropriate corner, and then draw the remainder of the rope's ...
by MrFariator
Mon Mar 15, 2021 9:51 pm
Forum: Support and Development
Topic: Problems with slow movement speeds
Replies: 24
Views: 4094

Re: Problems with slow movement speeds

The thing is that you're multiplying the rect's speed by delta time, which is quite a small value (1/60, or maybe even smaller). Then, you round the number to the nearest integer (with math.floor by adding 0.5 to the resulting position), making it so that your objects can only ever more in the incre...
by MrFariator
Mon Mar 15, 2021 8:04 am
Forum: Support and Development
Topic: Avoiding moving objects going into walls in bump.lua
Replies: 21
Views: 3427

Re: Avoiding moving objects going into walls in bump.lua

I haven't had the chance to properly look through your code, but on line 262 in data/bullets.lua, is this right? function bullets.BouncyBullet.checkCollisiuon(item, other) -- "Collisiuon" instead of "Collision" -- ... end As far as I can tell, because of that typo you're using th...
by MrFariator
Sun Mar 14, 2021 8:58 pm
Forum: Support and Development
Topic: Getting error "background.lua:3: attempt to index local 'self' (a nil value)," how to fix this?
Replies: 2
Views: 957

Re: Getting error "background.lua:3: attempt to index local 'self' (a nil value)," how to fix this?

You need to call those functions with a colon (:) and not with a period (.) function love.load() Background:load() -- note the ":" end function love.update() Background:update(dt) end function love.draw() Background:draw() end The colon syntax implicitly sends the table (in this case, Back...
by MrFariator
Sun Mar 14, 2021 5:34 pm
Forum: General
Topic: Fast Rope Physics for bump.lua?
Replies: 21
Views: 5897

Re: Fast Rope Physics for bump.lua?

You could do this with bump, but I think you'd honestly be better off using love.physics/box2d for any realism. After all, bump.lua's README even says: bump is not a good match for: - Games that require polygons for the collision detection - Games that require highly realistic simulations of physics...
by MrFariator
Sun Mar 14, 2021 5:15 pm
Forum: Support and Development
Topic: Avoiding moving objects going into walls in bump.lua
Replies: 21
Views: 3427

Re: Avoiding moving objects going into walls in bump.lua

Just to add a bit more to pgimeno's responses... 1.I've been wondering, if an object that doesn't move at all(like a wall) has the vx and vy variables (though they still aren't applied) could it affect another moving object bumping into them? Since the vy/vx of the "other" could be negativ...