Search found 50 matches

by DanielPower
Wed Jul 20, 2016 3:22 am
Forum: Libraries and Tools
Topic: Barrack - A simple type checking library
Replies: 7
Views: 3672

Barrack - A simple type checking library

This library is meant to make it easier to track down errors when a variable of the wrong type is passed to a function. When enabled, barrack will check the arguments of a function against a list of definitions to ensure that invalid arguments do not get passed. If an argument fails the definition t...
by DanielPower
Thu Jun 23, 2016 2:20 am
Forum: General
Topic: Love2D game jam / mod jam / community projects ?
Replies: 9
Views: 6477

Re: Love2D game jam / mod jam / community projects ?

There was a Love2D Community RPG in development at one point. That was before I joined the community, and I don't think it ever got very far into development.

https://cloud.github.com/downloads/love ... elyRPG.pdf
by DanielPower
Mon Jun 20, 2016 12:42 am
Forum: Support and Development
Topic: Diagonal pathfinding
Replies: 15
Views: 10193

Re: Diagonal pathfinding

That was an awesome read! The only issue I have however, is I don't think Jump Point Search can incorporate G costs for different tiles? Please correct me if I'm wrong about this. One of the features I need for my game (though I haven't added it to zStar yet, I will soon), is to have tiles with diff...
by DanielPower
Sun Jun 19, 2016 6:04 pm
Forum: Support and Development
Topic: 'self' (a nil value)
Replies: 4
Views: 2858

Re: 'self' (a nil value)

I'm assuming your issue lies either here:

Code: Select all

if ent.update then 
	ent:update(dt)
end
or here:

Code: Select all

if ent.draw then 
	ent.draw()
end
You're mixing up '.' and ':' on the ent.update call. But without the .love file, I can't help any more than that.
by DanielPower
Sun Jun 19, 2016 5:44 pm
Forum: Support and Development
Topic: Diagonal pathfinding
Replies: 15
Views: 10193

Re: Diagonal pathfinding

No, that wouldn't work because the pathfinding algorithm would look around the red pieces. So as long as there is a path of white space between the start and finish, the game cannot be won. Example: [B][0][0][0][R] [0][b][0][0][0] [0][0][b][0][0] [r][r][0][b][0] [R][r][0][0][B] This would cause a vi...
by DanielPower
Sun Jun 19, 2016 4:58 am
Forum: Support and Development
Topic: Circular Require Woes
Replies: 17
Views: 8519

Re: Circular Require Woes

If you don't want to use globals, you need to give 'player' a local variable that lets it find the scene that created it. Also, in terms of performance, you're not really passing an entire module. Simply creating a link. 'player.scene' will be the exact same variable as 'scene' in scene's scope. So ...
by DanielPower
Sun Jun 19, 2016 4:35 am
Forum: Support and Development
Topic: Diagonal pathfinding
Replies: 15
Views: 10193

Re: Diagonal pathfinding

Perhaps this will be useful to you. It's a pathfinding library I wrote a few weeks back for a project I'm working on. It uses the astar algorithm and does support diagonals. https://github.com/DanielPower/zStar zArray = require('zArray') zStar = require('zStar') red.start = {x=5, y=1} red.finish = {...
by DanielPower
Sun Jun 19, 2016 4:26 am
Forum: Support and Development
Topic: Circular Require Woes
Replies: 17
Views: 8519

Re: Circular Require Woes

One option would be to pass 'scene' to your player. In your scene.lua file:

Code: Select all

local player = require('player')
player.scene = scene
Then you should simply be able to access player.scene, or self.scene from your player.lua file.
by DanielPower
Mon Jun 06, 2016 8:59 pm
Forum: Libraries and Tools
Topic: Starkkz's GUI [WIP]
Replies: 6
Views: 4716

Re: Starkkz's GUI [WIP]

This looks like a promising project, but I actually can't get it to draw anything on-screen. I just get a black screen. Something I'm doing wrong? local gui = require('gui') Window = gui.create("Window", "Window Name", 100, 100, 200, 200) Button = gui.create("Button", &...
by DanielPower
Tue May 31, 2016 10:28 pm
Forum: Libraries and Tools
Topic: zStar - Pathfinding with the astar algorithm
Replies: 1
Views: 1853

zStar - Pathfinding with the astar algorithm

This is my first attempt at a pathfinding library, and I'm quite pleased with it. Right now it's single-threaded, but performance is quite good. I'm working on multi-threading it, and will post an update when I have that working. I'd love to hear from anyone who has suggestions to improve performanc...