Search found 33 matches

by zorfmorf
Thu May 29, 2014 12:46 pm
Forum: Support and Development
Topic: Need A* Help
Replies: 25
Views: 7972

Re: Need A* Help

I assume you mean the exception you get when calculating paths: Error: pathfind.lua:155: attempt to index a nil value That is pretty easy to explain. ... if not nodes[y-1][x].collidable and nodes[y-1][x].parent == nil then ... When checking neighbors, you are not checking if that neighbor node actua...
by zorfmorf
Tue May 27, 2014 5:41 pm
Forum: Support and Development
Topic: controller player jumping problem
Replies: 8
Views: 773

Re: controller player jumping problem

I never used joysticks/gamepads in löve, but the documentation seems to imply that you should use the button's index, not name:

Code: Select all

 
anyDown = Joystick:isDown( buttonN, ... )

number buttonN
    The index of a button to check. 


Wuups, I misread. Ignore what I wrote.
by zorfmorf
Mon May 26, 2014 10:18 pm
Forum: Support and Development
Topic: How do I change card graphic?
Replies: 13
Views: 3919

Re: How do I change card graphic?

I took a look but for now I'm afraid I can't help you as I've no idea whats going on. I can place blue cards on the field, red cards appear and move around and sooner or later blue cards start to turn red. Maybe you can explain a little bit more? When does a card beat another? And do you want to act...
by zorfmorf
Mon May 26, 2014 9:54 pm
Forum: Support and Development
Topic: Need A* Help
Replies: 25
Views: 7972

Re: Need A* Help

As I've written before, this specifc astar library doesn't take into account that finding neighbors in a grid is trivial (4-8 depending on whether you can walk diagonally). It looks at all tiles and checks for each on if it is a neighbor. (Which is totally fine if you're not working with a grid and ...
by zorfmorf
Mon May 26, 2014 3:36 pm
Forum: Support and Development
Topic: Migrating 0.8 to 0.9: usage of Channel instead of Thread:set
Replies: 3
Views: 637

Re: Migrating 0.8 to 0.9: usage of Channel instead of Thread

It's channel:push instead of channel.push ;)

Edit: Seems like I was too late
by zorfmorf
Mon May 26, 2014 2:13 pm
Forum: Support and Development
Topic: Need A* Help
Replies: 25
Views: 7972

Re: Need A* Help

Wow this is a great post! You'd be well advised to read and follow Roland_Yonaba's post, it is really well written and in the long run it always pays off to understand something instead of just using it. In fact, the astar library that was posted and that I added to your project is NOT perfect in th...
by zorfmorf
Mon May 26, 2014 11:12 am
Forum: Support and Development
Topic: Need A* Help
Replies: 25
Views: 7972

Re: Need A* Help

I took a look at that astar library and plugged it into your project. I tried to change as little as possible but removed most code in pathfind.lua as it wasn't needed anymore. If you rightclick somewhere, a path from the player position to the clicked position is calculated and saved in the global ...
by zorfmorf
Sun May 25, 2014 9:17 am
Forum: Support and Development
Topic: Need A* Help
Replies: 25
Views: 7972

Re: Need A* Help

Okay I took a look at your code. First: Don't get hung up on details. It does not matter for now how the player will move on the path you find with A* and you should not try to account for that in your implementation. The only thing you want to do is calculate a path to the target on squares that ar...
by zorfmorf
Sat May 24, 2014 3:50 pm
Forum: Support and Development
Topic: Small Shader Effect Applier
Replies: 3
Views: 614

Re: Small Shader Effect Applier

Okay I took a quick look and got it working. The problem was that your shader handler (shader/init.lua) was written for an older löve version and could not work but because it catches basically any exception and prints strange error messages instead you did not notice. * it used love.graphics.drawq ...
by zorfmorf
Sat May 24, 2014 3:03 pm
Forum: Support and Development
Topic: Need A* Help
Replies: 25
Views: 7972

Re: Need A* Help

I'd love to help but but your description seems a bit vague. Are you having trouble getting your code to run or don't you know where to start? Do you have any existing code that you want to add on to or are you starting from scratch? One: How do I use multidimensional arrays in the case of creating ...