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.
Search found 90 matches
- Sun Apr 15, 2012 10:24 am
- Forum: Support and Development
- Topic: Point following
- Replies: 6
- Views: 2350
- Sun Apr 15, 2012 10:06 am
- Forum: Support and Development
- Topic: Point following
- Replies: 6
- Views: 2350
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...
- Thu Apr 12, 2012 5:03 am
- Forum: Games and Creations
- Topic: Wyrm
- Replies: 14
- Views: 7107
Re: Wyrm
Haha, still getting used to the fact that 0.8.0 is out - haven't even got it yet.Robin wrote:If you run it with 0.8.0, it doesn't error.timmeh42 wrote:it give an error when I press escape - I don't think that's intentional.
- Wed Apr 11, 2012 6:47 pm
- Forum: Games and Creations
- Topic: Wyrm
- Replies: 14
- Views: 7107
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&q...
- Mon Apr 02, 2012 8:29 am
- Forum: General
- Topic: Löve vs GameMaker - Drawing triangles
- Replies: 8
- Views: 4996
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...
- Sun Apr 01, 2012 7:54 pm
- Forum: General
- Topic: Löve vs GameMaker - Drawing triangles
- Replies: 8
- Views: 4996
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...
- Fri Mar 30, 2012 9:57 am
- Forum: Support and Development
- Topic: [solved, stupid programmer me]<eof> error - string.gmatch()
- Replies: 4
- Views: 4730
Re: <eof> error - using string.gmatch()
Ah, I completely forgot about string being reserved.
. I seriously have no idea how those happened.
EDIT: Ok, I'm dumb. Fixed completely.
Well that's embarrassingWojak wrote:local return_table = {} -- empty table represented by "{}"
...
function love.load()
![Neutral :|](./images/smilies/ms-unplzd.png)
EDIT: Ok, I'm dumb. Fixed completely.
- Fri Mar 30, 2012 7:31 am
- Forum: Support and Development
- Topic: [solved, stupid programmer me]<eof> error - string.gmatch()
- Replies: 4
- Views: 4730
[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 ...
- Wed Mar 28, 2012 4:17 pm
- Forum: General
- Topic: What's everyone working on? (tigsource inspired)
- Replies: 1796
- Views: 1568638
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 goe...
- Wed Mar 28, 2012 3:02 pm
- Forum: General
- Topic: What's everyone working on? (tigsource inspired)
- Replies: 1796
- Views: 1568638
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...