Search found 27 matches
- Fri Jun 19, 2009 11:52 pm
- Forum: Support and Development
- Topic: My ongoing newbie questions
- Replies: 43
- Views: 33895
Re: My ongoing newbie questions
Jake: This code will make the object accelerate smoothley. newX, newY = -0.5*math.cos(-3) + vx, -0.5*math.sin(-3) + vy Ofcourse you can do something like this if you don't want any acceleration: //Move left newX, newY = vx -5, vy //Move right newX, newY = vx + 5, vy But when you do that, the veloci...
- Wed Jun 17, 2009 9:23 pm
- Forum: Support and Development
- Topic: My ongoing newbie questions
- Replies: 43
- Views: 33895
Re: My ongoing newbie questions
What's this all about?Code: Select all
newX, newY = -0.5*math.cos(-3) + vx, -0.5*math.sin(-3) + vy
- Fri Jun 12, 2009 7:54 pm
- Forum: Games and Creations
- Topic: Inventory Tetris
- Replies: 4
- Views: 6926
Re: Inventory Tetris
This is a cool concept! The problem is that it's hard to see what cells the items occupy. And the keys are too responsive
- Fri Jun 12, 2009 2:34 pm
- Forum: Libraries and Tools
- Topic: Using easing equations
- Replies: 16
- Views: 13697
Re: Using easing equations
These functions are definitely helpful. However I don't like how everything is based on strings. So I edited anim.lua to be more class based. anim.lua function anim.create( from, to, time, delay, eq, ... ) function anim:start() function anim:pause() function anim:callback( delay, func, ... ) functi...
- Fri Jun 12, 2009 2:30 pm
- Forum: Libraries and Tools
- Topic: Some parametric functions.
- Replies: 11
- Views: 9142
Re: Some parametric functions.
Brilliant!
(Animation library - awesome )
(Animation library - awesome )
- Fri Jun 12, 2009 2:22 pm
- Forum: General
- Topic: Avatars: OBEY!
- Replies: 763
- Views: 1193753
Re: Avatars: OBEY!
I made one
- Thu Jun 11, 2009 8:52 pm
- Forum: Support and Development
- Topic: My ongoing newbie questions
- Replies: 43
- Views: 33895
Re: My ongoing newbie questions
I don't think Lua has a round function but this will do the same
Code: Select all
function math.round(x)
return math.floor(x+0.5)
end
- Thu Jun 11, 2009 8:11 pm
- Forum: Support and Development
- Topic: Requesting assistance coercing a string to a function call
- Replies: 10
- Views: 10699
Re: Requesting assistance coercing a string to a function call
Depends on exactly what but surely it's quicker just to do a table lookup, right?
- Thu Jun 11, 2009 8:04 pm
- Forum: Support and Development
- Topic: No blend mode.
- Replies: 19
- Views: 14038
Re: No blend mode.
Alternatively you could just draw the quarters of the circles so no actual overlaying occurs. If it's an image you can draw the 'subsprite' (draws) of a corner of the circle.
EDIT: OH MY GOSH! I've just realised I spelled obey wrong in my avatar. Why has nobody told me
EDIT: OH MY GOSH! I've just realised I spelled obey wrong in my avatar. Why has nobody told me
- Thu Jun 11, 2009 8:00 pm
- Forum: Support and Development
- Topic: Requesting assistance coercing a string to a function call
- Replies: 10
- Views: 10699
Re: Requesting assistance coercing a string to a function call
Rather than loading the string as a piece of Lua you can just call the function from the global table
I would prefer to do that because it seems safer to me.
Code: Select all
local str = "test_func"
_G[str]()