Search found 90 matches

by timmeh42
Sun Apr 15, 2012 10:24 am
Forum: Support and Development
Topic: Point following
Replies: 6
Views: 853

Re: Point following

Ah, was still editing when you posted. May as well leave the explanation there in case others want it. I also had to fix some things where I forgot to use the variable names, so its for the best.

Can't think why it's slow, though - I don't have any experience in optimisation of code.
by timmeh42
Sun Apr 15, 2012 10:06 am
Forum: Support and Development
Topic: Point following
Replies: 6
Views: 853

Re: Point following

Others can correct me if I'm wrong, but this would be what you want: function love.load() object_x = 300 object_y = 400 point_x = 600 point_y = 800 object_speed = 16 end function love.update(dt) if ( (((point_x - object_x)^2 + (point_y - object_y)^2)^0.5) < (speed*dt) ) then object_x = point_x objec...
by timmeh42
Thu Apr 12, 2012 5:03 am
Forum: Games and Creations
Topic: Wyrm
Replies: 14
Views: 2953

Re: Wyrm

Robin wrote:
timmeh42 wrote:it give an error when I press escape - I don't think that's intentional.
If you run it with 0.8.0, it doesn't error. ;)
Haha, still getting used to the fact that 0.8.0 is out - haven't even got it yet.
by timmeh42
Wed Apr 11, 2012 6:47 pm
Forum: Games and Creations
Topic: Wyrm
Replies: 14
Views: 2953

Re: Wyrm

it give an error when I press escape - I don't think that's intentional. I just stay in one place, because that kills all humans that try to walk past me. (And they all do. Maybe it would be more fun if they tried to run from you?) Although you have to make sure the player is sort-of "hopping" a bit...
by timmeh42
Mon Apr 02, 2012 8:29 am
Forum: General
Topic: Löve vs GameMaker - Drawing triangles
Replies: 8
Views: 3202

Re: Löve vs GameMaker - Drawing triangles

Screenshot of the tests running simultaneously (oddly, this did not affect the performance - similar results were achieved whether the tests were running concurrently or not). Remove love.timer.sleep() from love.run and that will change. Did, and the results were exactly the same, both running conc...
by timmeh42
Sun Apr 01, 2012 7:54 pm
Forum: General
Topic: Löve vs GameMaker - Drawing triangles
Replies: 8
Views: 3202

Löve vs GameMaker - Drawing triangles

(This may not be interesting to most users, but I thought it could interest people new to Löve and those who don't know its full cababilities) I was interested in how fast Löve/Lua is at drawing triangles, so I wrote a demo/benchmark that fills the screen with 60702 triangles - it got a decent 12 f...
by timmeh42
Fri Mar 30, 2012 9:57 am
Forum: Support and Development
Topic: [solved, stupid programmer me]<eof> error - string.gmatch()
Replies: 4
Views: 1375

Re: <eof> error - using string.gmatch()

Ah, I completely forgot about string being reserved.
Wojak wrote:local return_table = {} -- empty table represented by "{}"
...
function love.load()
Well that's embarrassing :|. I seriously have no idea how those happened.

EDIT: Ok, I'm dumb. Fixed completely.
by timmeh42
Fri Mar 30, 2012 7:31 am
Forum: Support and Development
Topic: [solved, stupid programmer me]<eof> error - string.gmatch()
Replies: 4
Views: 1375

[solved, stupid programmer me]<eof> error - string.gmatch()

Since I couldn't find a lua function equivalent to java's string.split() , which splits a string around a given string or character (actually regular expression which seems to be about equal to lua's patterns) and returns a table of the values, I decided to try making my own. Looking around the Lua ...
by timmeh42
Wed Mar 28, 2012 4:17 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1704
Views: 511141

Re: What's everyone working on? (tigsource inspired)

Framebuffer/canvas that whole tree. Can't. The tree has to dynamically react to wind, etc., which means that if I stick it into one image, "wind" would involve it shearing or rotating, which will look terrible. What I will do, though, is reduce its size and the number of iterations it goes through,...
by timmeh42
Wed Mar 28, 2012 3:02 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1704
Views: 511141

Re: What's everyone working on? (tigsource inspired)

Procedural trees - trying to get them to have some degree of randomness, but also need to save the angle values for every branch - bit of a dilemma. Also, drawing hundreds of images just for one tree is highly inefficient - that's the fps in the corner there. http://i638.photobucket.com/albums/uu109...