Search found 76 matches

by subrime
Tue Nov 18, 2008 7:29 pm
Forum: Support and Development
Topic: Proper random number generation and radian/degree.
Replies: 22
Views: 25522

Re: Proper random number generation and radian/degree.

I think the conventional understanding is that a pseudo-random function will use a deterministic function to supply the same sequence of pseudo-random numbers every time it is reset, while a (non pseudo) random function will use a deterministic function with a changing seed (such as the current syst...
by subrime
Tue Nov 18, 2008 1:48 pm
Forum: Support and Development
Topic: default to default font
Replies: 12
Views: 9776

Re: default to default font

Ah... you're right, I see the glitch now you point it out. In my head the last line of first_draw was meant to call original_draw directly, not the currently-pointed-to-love.graphics.draw. The slightly refined version: function original_draw(...) -- just a new name -- the existing draw code in all i...
by subrime
Tue Nov 18, 2008 4:03 am
Forum: Support and Development
Topic: .conf /.cfg?
Replies: 11
Views: 19455

Re: .conf /.cfg?

So a bit of lua history: it was originally designed as a configuration language. This is lua's strong suit, and the love infrastructure already provides the ability to do this in a simple manner: it's called the load function. If you have your configuration settings in a file called 'something.conf'...
by subrime
Mon Nov 17, 2008 6:50 am
Forum: Support and Development
Topic: default to default font
Replies: 12
Views: 9776

Re: default to default font

Or, rather than putting the test/load-the-default-font code into the load function, it could be embedded at the start of the love.graphics.draw function such that any attempt to draw a message before a font has been set will trigger the loading of the default font. function original_draw(...) -- jus...
by subrime
Thu Nov 13, 2008 8:28 pm
Forum: Support and Development
Topic: default to default font
Replies: 12
Views: 9776

Re: default to default font

Ah... I had no idea you were so keen on optimisation. Maybe a way to offset this a little (at least for programs that load at least one font) is load the default font by default, and the to swap it out the first time an explicit font load is performed. Down sides are a little extra startup time, and...
by subrime
Thu Nov 13, 2008 8:04 pm
Forum: Support and Development
Topic: default to default font
Replies: 12
Views: 9776

default to default font

Just been browsing through the getting started section, and thought that something in keeping with making it as simple as possible to get things going would be to have the current font set to the default font when starting the load function. Existing code would continue to work without change, and t...