Search found 12 matches

by hardcrawler
Sun Sep 28, 2014 1:53 pm
Forum: General
Topic: Subtle issue with Lua require
Replies: 5
Views: 2030

Re: Subtle issue with Lua require

Is there any reason you can't just use love.filesystem.load(file)() to execute a file instead when you need to load it multiple times? One of the features of require is that it will only perform file I/O and parsing on a particular module once. Subsequent uses of "require" will simply return the ta...
by hardcrawler
Sun Sep 28, 2014 1:43 pm
Forum: General
Topic: Subtle issue with Lua require
Replies: 5
Views: 2030

Re: Subtle issue with Lua require

Of course, all this works with module names, if you give it another module name (an incorrect one at that), it considers it a different module. Bear in mind that the Lua loads the module in both cases. It doesn't generate an error. I use the "." syntax everywhere, I just happened to mess it up in o...
by hardcrawler
Sun Sep 28, 2014 5:12 am
Forum: General
Topic: Subtle issue with Lua require
Replies: 5
Views: 2030

Subtle issue with Lua require

Just a random Lua tip. This is something I didn't know, and it cost me a few hours. local foo = require("libs.foo") local foo2 = require("libs.foo") if foo2 ~= foo then print("This will not happen") end local foo3 = require("libs/foo") if foo3 ~= foo then print("Oh my. Using a slash instead of a dot...
by hardcrawler
Fri Sep 26, 2014 2:04 am
Forum: Support and Development
Topic: How to call Löve functions from regular lua?
Replies: 2
Views: 1149

Re: How to call Löve functions from regular lua?

Lua is an embedded language. That means that its intent is to be embedded in other programs for the purpose of scripting them. Usually, this is a C/C++ application. When you run "lua" from the command line, you are running a very small executable C program that has minimal abilities. You pretty much...
by hardcrawler
Wed Sep 24, 2014 2:37 am
Forum: Support and Development
Topic: self (A nil value)
Replies: 4
Views: 2252

Re: self (A nil value)

To add a little (I hope) more to the explanations... The behavior of "self" in Lua is not quite the same the behavior of self/this in say C++, Java, PHP etc. In those languages, the self/this is inherently available on any methods that are defined within the classes. It is essentially invalid to inv...
by hardcrawler
Fri Sep 12, 2014 12:32 am
Forum: Support and Development
Topic: Checking if an entity is in a table.
Replies: 3
Views: 1259

Re: Checking if an entity is in a table.

This code is "working too hard" to find the entity. You are not taking advantage of the benefit provided by tables' keys. (i.e. you are using integer keys and trying to iterate through to find your named entity) Here is my cleanup of your code to make it work, without straying too much from the patt...
by hardcrawler
Wed Sep 10, 2014 10:50 pm
Forum: General
Topic: Sprite animation software
Replies: 11
Views: 3582

Re: Sprite animation software

one further question, do you know if it is possible from the API of either spine or sprite, to control one aspect of the skeleton without using animations? for instance, I want the head of the character to keep looking at the mouse cursor, so I just need to rotate one bone continuously. is this pos...
by hardcrawler
Tue Sep 09, 2014 1:37 pm
Forum: General
Topic: Sprite animation software
Replies: 11
Views: 3582

Re: Sprite animation software

I wrote a Love2D library for rendering Spriter animations: http://www.love2d.org/forums/viewtopic.php?f=5&t=78280&hilit=spriter I made heavy use of it in my LoveJam2 entry: http://hardcrawler.itch.io/undead-fusion The UI can be a tad twitchy, but overall I am pretty happy with Spriter. It is fairly ...
by hardcrawler
Tue Sep 02, 2014 11:57 pm
Forum: General
Topic: LÖVE-Jam 2 [VOTING!]
Replies: 51
Views: 10187

Re: LÖVE-Jam 2 [Voting for themes]

I am planning on participating, and this will be my first "real" game jam (I have done a bunch on my own just to crank stuff out for fun) I assume that common open-source libraries like Anal, TESound etc. are acceptable? Also, what are the rules regarding using pre-existing code of our own? I don't ...
by hardcrawler
Sat Aug 16, 2014 3:05 pm
Forum: Libraries and Tools
Topic: Spriter .scon loading/rendering library v0.9
Replies: 3
Views: 2200

Re: Spriter .scon loading/rendering library v0.9

Hi, this looks interesting. Have you thought about putting the source code somewhere where it's easy to open issues and send changes, like github or bitbucket? It's been a while, but I just put it up on Bitbucket: https://bitbucket.org/hardcrawler/spriter Previously, I wasn't doing my rotation inte...