Page 1 of 2

Some parametric functions.

Posted: Wed Jun 10, 2009 11:47 pm
by ljdp
Here are some parametric functions for ya.
I didn't really code em, I just converted them to lua from here
Xtra.love
Xtra functions - parametric.
(34.68 KiB) Downloaded 312 times
xtra.lua
The lua file.
(2.48 KiB) Downloaded 279 times

Re: Some parametric functions.

Posted: Fri Jun 12, 2009 1:16 pm
by paclito
superexamples, thank you

I'm studing all of them and with your permission aplying to my tanks game (you will be in credits of course)

One question about anim and xtras....... when i move a phisical object with these equations and the object is asociated with a shape....... etc etc, this is the best way to move it...... example:

One cars game, where where I move my car with car.applyforce(x,y) and some enemy cars that are moved with some type of anim ANIM_RECT .... is this the apropiate way to make it? to made the path of an object that runs on my circuit?

Re: Some parametric functions.

Posted: Fri Jun 12, 2009 2:30 pm
by Jake
Brilliant!

(Animation library - awesome :D)

Re: Some parametric functions.

Posted: Fri Jun 12, 2009 6:02 pm
by ljdp
Sure use whatever in your game, all my stuff has 'do wtf you want with it' policy :)
Of course I only edited anim.lua so credit should goto jake not me.

On regards to the rest of your post I don't quite understand what you are trying to say, have you got an example I can see?

Re: Some parametric functions.

Posted: Fri Jun 12, 2009 7:30 pm
by paclito
yes, i'm making it and I'll publish in the next 2 or 3 days

I'll publish it when my wife and my son leave me a little time to use the computer ;)

and Saludos to all from spain!!!

Re: Some parametric functions.

Posted: Sat Jun 13, 2009 9:38 pm
by NextPivMaster
The Spline functions will be good for making more complex figures in my animation program I'm developing. This is really useful, thanks and good work.

I just wish you put some documentation with it, and more comments in the code about how it works would be appreciated.

Oh, and a few request: I don't know gml, and since you converted this to Lua, I would like to see these converted too, please. I'm sure everyone would like these to have more complexe game, for example: Using the angle_difference(angle1, angle2) you could have something happen if a sprite gets knocked onto a sertain angle. You could also have effects be triggered with the point_in_... functions. These would be really useful, and every one would want them if they're making a more ambishious game project.

Love has limmted funtonality in manipulating files so I would like these converted, if they can, as well.

these are optional, and I'm probably asking WAY too much, but i would LOVE it if you converted these too:
color manipulation
Drawing Shapes
Fonts and Text
Surfaces
Sprites The sprite functions here look like they give you alot more control over sprites than what LOVE gives feature wise.

Also:Sprite Resources

If you don't want to, then I'll just get a GML referance some where and convert them with that. You do do them, then i'll give you the first version of my animation program when it's finished :megagrin: and you wil get a mega huge spot of thanks in the credits.

Re: Some parametric functions.

Posted: Wed Jun 17, 2009 2:13 am
by Garotas*Gostosas
ljdp wrote:Here are some parametric functions for ya.
I didn't really code em, I just converted them to lua from here
NICE! :ultrahappy:

Re: Some parametric functions.

Posted: Wed Jun 17, 2009 10:44 pm
by ljdp
Tbh GML isn't that confusing to read, it's a bit like java actually.
But yeah when I have time i'll start converting the functions.
If i'm ambitious I might even make a lovesnips.com website :nyu:

EDIT: I won't be able to replicate the surface functions because they are native to gamemaker.
Not sure about sprites but it could work..

Re: Some parametric functions.

Posted: Thu Jun 18, 2009 11:24 am
by paclito
In the next days i will try to make the anim class to do some 2d phisics work, I try to explain:

velocity = espace / time ....... it's the equations result..... but for box2d I think there is no the more appropiate parameter, perhaps acceleration?


:get() sends the 'space'
perhaps
:getvel() will send the velocity
and
:getaccel() will send the acceleration of the movement

It's the best way to move a 2d phisical object? one array of points to arrive to .... and make the objects to have a velocity or acceleration to arrive these points?

Thank to all
Muchas gracias!

Re: Some parametric functions.

Posted: Thu Jun 18, 2009 11:50 am
by ljdp
The envy framework comes with a vector lib, which sound similar. I'm sure what you are trying to say could be replicated with the vector lib.