Journeywar - Page 36

Journeywar

PicassoCT's stunning mixture of game design and psychedelia, for your enjoyment!

Moderators: Moderators, Content Developer

User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Journeywar

Post 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. :P

EDIT: 1337 reference link! http://www.lua.org/pil/18.html
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

well the zombies work now..

wat? zombies? were on the todolist was that? ... near the artillery and the AI for zombies...

Image

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.
Attachments
handybuster.jpg
(502.96 KiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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"?

Image
Attachments
drama.jpg
(223.54 KiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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?

Image

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...
Attachments
cantArgueWithResults.jpg
(342.89 KiB) Downloaded 4 times
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Journeywar

Post by FLOZi »

What's the issue exactly?

And why not use lua math.cos math.sin?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Journeywar

Post 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
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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..
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Journeywar

Post 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. :P

EDIT: 1337 reference link! http://www.lua.org/pil/18.html
...Am I missing something here?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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...
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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...
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Journeywar

Post by MidKnight »

If you're working on somthing that's already been done, there'll always be tutorials. :-)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Journeywar

Post 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
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

Image
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Guys i screwed up- only questions remaining is- where is the bottle?

Image
Attachments
guysiscrewedup.JPG
(177.98 KiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post 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.
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Journeywar

Post by MidKnight »

Either move to something else or get a rope-expert's advice!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

make more pole less stairway
Image
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

but i allready have the tiglil doing poledancing... who would watch a combine soldier doing, that?

shake that ass, you cyborg..
Post Reply

Return to “Journeywar”