Page 36 of 63
Re: Journeywar
Posted: 24 Oct 2011, 03:24
by MidKnight
Code: Select all
function degreeSin (x)
return math.sin(math.rad(x))
end
Or just use math.rad.
...But radians are still better.
EDIT: 1337 reference link!
http://www.lua.org/pil/18.html
Re: Journeywar
Posted: 30 Oct 2011, 14:23
by PicassoCT
well the zombies work now..
wat? zombies? were on the todolist was that? ... near the artillery and the AI for zombies...
also i have a driving in circles mobile mex by now... you now the story. Long Rant by me, calm advice by knorke, additional rant by me, knorke making fun, Rant, cursing the world, cursing bad language, cursing devs suddenly discover of basic flaw..
me so small, but because of success still walkig tall.
Re: Journeywar
Posted: 01 Nov 2011, 13:23
by PicassoCT
is this really my thread? were did all that serious buisness come from?
must be the code-think leaking! Why didnt anybody report this with a loud "bbbuuuuuoooorrriiinnng"?

Re: Journeywar
Posted: 07 Nov 2011, 23:12
by PicassoCT
nothing worked.. but i know now why. My cosinus-sinus function had a bug. It too me 4 fucking weeks to find it, i ruined one calculator, but i found it.
Sometimes do it yourself aint better but beta. Have to admit thats kind of hard to accept, but its fact, and facts are facistic, you cant vote on them.
Well, will try to finalize the sentrynell tomorrow. Then, limping onwards, on broken timetables. Oh, did i mention it. The spinesknake is dead, died for my Sinus-function. Well wont miss it.
Re: Journeywar
Posted: 08 Nov 2011, 22:03
by PicassoCT
Anybody out there better at math than me able to explain this?
Its a rotation matrice, and it works. Its clockwise. And its nearly nowhere mentioned. Somebody,please explain to me what ive done?
Seems most stuff i work on is rather useless.. or freaking hard to implement...
So lol, i attempted to write a rope-physix-engine for the ConAir Vehicle and was midway, when i realized, i cant have the rope pieces as buildplates. So i phailed again. If i dont transfer it into a faggtory, like the mexVehicel...
Re: Journeywar
Posted: 09 Nov 2011, 19:46
by FLOZi
What's the issue exactly?
And why not use lua math.cos math.sin?
Re: Journeywar
Posted: 09 Nov 2011, 20:07
by PicassoCT
because i didnt get that you can easily convert degree to radiant.. the issue, to make it short is me beeing nubish, in every freaking aspect.
My most idiotic mistake was bugfixxed today, when one student and a prof took a look today, and found the biggest and most shamefull noobmistake of them all.
x=x*something
y=something*x
in math, the perfect language this is fine. In lua, this results in a catastrophe. So there i was, searching for the perfect math formula, while all i should have searched for is the bug in my own brain.
Still im relieved like never before.
Today solved the whole problem, and the whole freaking 4 weeks hard worked upon method, shrinked together into something working- not bigger then 5 lines. Which in one way feels fantastic, on the other hand, i could have used those 4 weeks without idiotic errors. But now its over. Happyland is finally there.
Re: Journeywar
Posted: 09 Nov 2011, 20:52
by zwzsg
I don't understand exactly what you are trying to do, but I know you are overcomplicating it. math.cos, math.sin, and math.atan2 is all you need.
From polar to rectangular:
x = r*math.cos(theta)
y = r*math.sin(theta)
From rectangular to polar:
r = math.sqrt(x^2+y^2)
theta = math.atan2(y,x)
math.atan2 isn't a function you see in classroom mathematic, but it will make things much easier than atan because you won't have to worry about dividing by zero or which quadrant it's in.
And yes, theta will be in radian. I know you like degrees, I used to prefer them like you. You could convert degree to radian and back, all the times, all over your code. But it would just make the source code be more verbose, without adding anything but a couple bugs where you'll forget the conversion or do it twice. Thing is, when your angles are into variables and you feed them to functions and get them from other functions, it doesn't really matter what units they're in, as long as the unit is consistant in everything that deals with them. So since Lua built-in functions expect radians, just let all your angle variable be in radian, and convert from/to degree only when you need to enter them or print them.
angle_in_radian=angle_in_degree*math.pi/180
angle_in_degree=angle_in_radian*180/math.pi
Re: Journeywar
Posted: 09 Nov 2011, 21:02
by PicassoCT
thx, zwzsg, could you please travell back in time and give me that advice 4 weeks ago :D ?
I think it was part stupid mono-think (asuming just because it was the right mathematical expression its automatically correct luacode) and part stupid pride (i freaking wrote that sinus and taylor function from scratch for degrees, i wanted it to work, although it was useless)..
Well i wasted a month, for one unit to work ... lets recalculate the schedule..
Re: Journeywar
Posted: 10 Nov 2011, 04:31
by MidKnight
could you please travell back in time and give me that advice 4 weeks ago :D ?
MidKnight wrote:Code: Select all
function degreeSin (x)
return math.sin(math.rad(x))
end
Or just use math.rad.
...But radians are still better.
EDIT: 1337 reference link!
http://www.lua.org/pil/18.html
...Am I missing something here?
Re: Journeywar
Posted: 10 Nov 2011, 20:40
by PicassoCT
and pack some pills against stuborness and pride while you travell there. And pick up yesterdays loto numbers and pizza, while you are allready on the the way...
Re: Journeywar
Posted: 12 Nov 2011, 23:07
by PicassoCT
Was a bad day... i realized that no matter how much i want to be like valve.
Im not valve. Im a absolut beginner, and writting a acurate physix-simulation of a rope with a soldier hanging from it, is way beyond my current skilllevel. I thought it through and cam to the conclusion, that the rope will just be a stiff line.
No wind.
No gravity.
No pendulum momentum.
No fucking momentum changes by the airplane, travelling down the rope in waves of diffrent speed, amplifying each other, chancelling each other out. No.. no..
Instead game relevant stuff. Hurray, now im getting even sidetracked by programing challenges, in Addition to gamedesign-creep and Art-creep.
The high horse i came in upon...
Re: Journeywar
Posted: 13 Nov 2011, 07:56
by MidKnight
If you're working on somthing that's already been done, there'll always be
tutorials.

Re: Journeywar
Posted: 13 Nov 2011, 08:35
by AF
2 people in a race, and they're going to build their cars from scratch.
One person takes the usual route, and decides to paint it as a homage to Pink Floyd.
The second decides he wants a certain spin of steampunk style and that for some reason involves tires made of paper clips. He spends all week trying to get paper clip wheels to work.
A month later he succeeds, and goes to start the rest of the car, only to find that the race was 3 weeks earlier, he lost because he didn't even turn up, and his paper clip wheel he spent a month on, is outperformed effortlessly by something made from common household goods in 5 minutes.
You Picasso, are paperclip guy
Re: Journeywar
Posted: 13 Nov 2011, 16:20
by knorke
Re: Journeywar
Posted: 13 Nov 2011, 20:53
by PicassoCT
Guys i screwed up- only questions remaining is- where is the bottle?

Re: Journeywar
Posted: 16 Nov 2011, 00:10
by PicassoCT
Buhuhu, i married a rope, in hope that this connection would last forever, but instead, he just hangs out at the swingerclub, and is all into bondage, and physix-enginebugs. When he is retrieved by the conair late at night,he just rolls up, and lays there, as if i dont exist anymoar. What should i do?
INB4 No rope left -hang yourself.
Re: Journeywar
Posted: 16 Nov 2011, 15:40
by MidKnight
Either move to something else or get a rope-expert's advice!
Re: Journeywar
Posted: 17 Nov 2011, 17:34
by knorke
make more pole less stairway

Re: Journeywar
Posted: 17 Nov 2011, 18:46
by PicassoCT
but i allready have the tiglil doing poledancing... who would watch a combine soldier doing, that?
shake that ass, you cyborg..