Search found 101 matches

by Mr. Strange
Tue Dec 09, 2008 7:37 am
Forum: Support and Development
Topic: Finding a love image by string
Replies: 9
Views: 3660

Re: Finding a love image by string

Well duh....

I just created the image objects inside a table! Problem solved.

--Mr. Strange
by Mr. Strange
Tue Dec 09, 2008 7:10 am
Forum: Support and Development
Topic: Finding a love image by string
Replies: 9
Views: 3660

Finding a love image by string

I often find it hand to find a table by string using _G[table_name].

How can I do the same for a love image? I have a whole series of images I've created and I need to pull one out by string.

--Mr. Strange
by Mr. Strange
Mon Dec 08, 2008 7:30 pm
Forum: Support and Development
Topic: Fonts - Again!
Replies: 8
Views: 2689

Re: Fonts - Again!

There is no way to make two characters represent a single glyph. If you want to use a smiley face, perhaps you should initialize the image font with the "☺" character and use that for every smile? Note: Font is bad and broken and bitter. It is going to be re-done. I would love to "in...
by Mr. Strange
Sun Dec 07, 2008 10:45 am
Forum: Support and Development
Topic: Profiling data
Replies: 1
Views: 1784

Profiling data

I want to be able to profile the performance of my application. Specifically, I want: 1 - frame rate display. 2 - allocated memory information. 3 - callback with the name of the particular function I'm spending most of my time in. (Or just "a lot" of time in.) 4 - information about the num...
by Mr. Strange
Sun Dec 07, 2008 10:39 am
Forum: Support and Development
Topic: Fonts - Again!
Replies: 8
Views: 2689

Fonts - Again!

Alright, after getting lots of good font-stuff working, I now want to delve deeper. I want to make a font which included non-traditional characters. Love has "image fonts" supported, but the examples a too short to be useful, and the referenced images do not exist. I want a font which is a...
by Mr. Strange
Fri Dec 05, 2008 8:33 am
Forum: General
Topic: Unlearn
Replies: 3
Views: 4002

Re: Unlearn

rude has been pretty clear in some posts that the dev team is committed to keeping all baseline lua functionality intact. Case in point: love uses degrees, though the lua math functions are in radians. So now the plan is apparently to change the defaults in love, to better conform to vanilla lua. Th...
by Mr. Strange
Thu Dec 04, 2008 12:53 am
Forum: General
Topic: How should I scramble a table?
Replies: 11
Views: 7797

Re: How should I scramble a table?

http://en.wikipedia.org/wiki/Fisher-Yates_shuffle edit: you can also read a bit more at http://en.wikipedia.org/wiki/Shuffle#Shuffling_algorithms which describes your method as well (which is slightly less efficient because sorting an array is slower than just traversing it). Perfect. Thank you. --...
by Mr. Strange
Wed Dec 03, 2008 11:50 pm
Forum: General
Topic: How should I scramble a table?
Replies: 11
Views: 7797

How should I scramble a table?

I have a table of 52 elements - a deck of cards. I want to shuffle them - that is, assign each of the 52 elements to a new, unique, random location. My first idea was to use table.sort along with some random number generator. I could assign each element a random value, and then sort by those, or may...
by Mr. Strange
Wed Dec 03, 2008 11:29 pm
Forum: General
Topic: picky question about length operator
Replies: 3
Views: 3813

Re: picky question about length operator

If i remember correctly the length operator don't count the length but returns a stored length value. If you modify a list with table.insert & co it gets updated. So the length operator should work as long as you don not manually set entries like l["lala"] = 1 or l[40] = 1. But you ca...
by Mr. Strange
Wed Dec 03, 2008 11:23 pm
Forum: Support and Development
Topic: Inefficiencies with loading data
Replies: 8
Views: 6138

Re: Inefficiencies with loading data

My question is whether or not calling newImage() on the same file eats up memory or not. It's not a question of how to avoid redundancy, but rather a question of whether or not my script as it stands creates any memory redundancy already. And my question about "unloading" data from memory ...