Search found 17 matches

by tehryanx
Sun May 18, 2014 8:23 pm
Forum: Support and Development
Topic: Animation logic using anim8
Replies: 4
Views: 4493

Re: Animation logic using anim8

Okay, this makes a lot of sense but I'm confused on one aspect. My attack animation has 7 frames. If I'm using a counter to determine when the animations finished, you suggest increasing the counter by dt every frame. Do I then just wait for the counter to be > 7? If I'm calling animation:update() i...
by tehryanx
Sat May 17, 2014 2:52 pm
Forum: Support and Development
Topic: Animation logic using anim8
Replies: 4
Views: 4493

Animation logic using anim8

I'm using anim8 to handle animations for a platformer. I'm finding myself at a roadblock with some animations and I'm not sure how to proceed. The way my animations are set up currently is in a table like so: player.animations['walk'] = anim8.newAnimation(grid('1-8',1), 0.1) player.animations['idle'...
by tehryanx
Tue Apr 29, 2014 5:10 am
Forum: Support and Development
Topic: Conways Game of Life in Love2d... sorta
Replies: 0
Views: 1421

Conways Game of Life in Love2d... sorta

I made conways game of life and as far as I can tell everything in the code looks right... until I run it. It doesn't behave like it should despite using conways rules. There's explosive growth, weird tunneling and other behaviors not seen in proper implementations of cgol. Anyone with a second wann...
by tehryanx
Mon Apr 28, 2014 4:08 am
Forum: Support and Development
Topic: Frame skipping issue when using dt
Replies: 3
Views: 2011

Frame skipping issue when using dt

I finished my Ludum Dare submission tonight and posted it without realizing there was a nasty bug in the code. https://www.dropbox.com/s/qh9gq8b4kc4n63h/ld29.love The code is pretty messy but the problem lies in charge.lua function charge:update(dt) self.x = self.x + self.xVel * self.direction * dt ...
by tehryanx
Mon Apr 21, 2014 11:58 pm
Forum: Support and Development
Topic: yet another collision question thread.
Replies: 12
Views: 6297

Re: yet another collision question thread.

Thanks for having a look :) A few followup questions. First, are you sure this is the case? The reason I'm asking is because when I collide with the ceiling just jumping straight up into it my yvel is set to 0 and I immediately fall. Second, if you're right and this is what's causing the problem doe...
by tehryanx
Mon Apr 21, 2014 1:44 am
Forum: Support and Development
Topic: yet another collision question thread.
Replies: 12
Views: 6297

Re: yet another collision question thread.

I imagine there must be a standard way to accomplish this. It's a fundamental part of every platformer so I'm sure I'm reinventing the wheel or tripping myself up in some way that other people have before. I also realize that there are libraries like hardon and bump.lua that could probably handle th...
by tehryanx
Sun Apr 20, 2014 8:24 pm
Forum: Support and Development
Topic: yet another collision question thread.
Replies: 12
Views: 6297

Re: yet another collision question thread.

I'm confused as to how that would work. If I only collide with the top left corner, how do I know which velocity to zero? I might be hitting it from below, but I might be hitting it from the left.
by tehryanx
Sun Apr 20, 2014 7:59 pm
Forum: Support and Development
Topic: yet another collision question thread.
Replies: 12
Views: 6297

Re: yet another collision question thread.

So is it insufficient to just kill the velocity on collision? I'm doing it differently now and I still have problems. I now have 8 separate collision points as in this picture: https://love2d.org/imgmirrur/2lFdwKK.png The problem is as illustrated on the right. If I hit a platform directly on the co...
by tehryanx
Sun Apr 20, 2014 2:38 pm
Forum: Support and Development
Topic: yet another collision question thread.
Replies: 12
Views: 6297

Re: yet another collision question thread.

I just watched it, but he doesn't actually go into any explanation on the collision detection. He just codes the whole thing without really explaining the logic. :(
by tehryanx
Sun Apr 20, 2014 2:12 am
Forum: Support and Development
Topic: yet another collision question thread.
Replies: 12
Views: 6297

Re: yet another collision question thread.

Wait, nevermind. I solved most of my collision problems, but I have a new one. The problem is that if I don't don't land far enough onto a block i'll fall through it.