Heavy magic via heavy math.

A place for discussions on ArmA I & II

Moderators: ShunnedSAMURAI, Moderators

User avatar
Evil_Echo
Posts: 706
Joined: Tue Nov 27, 2007 10:01 pm
Location: CA, USA

Heavy magic via heavy math.

Postby Evil_Echo » Sun Jan 24, 2010 2:57 am

Vid of a demo mission I made the other day. To show how to manipulate
object orientation.



The code used is very short, the math behind it requires some advanced schooling
in mathematics. But what I did is at the core of any good game engine, learn this
stuff if you ever want to do some serious video coding.
I am fear.

User avatar
Hectic
=CGHQ= Veteran Member
Posts: 1207
Joined: Mon Nov 26, 2007 3:25 am
Location: Durango, Colorado

Re: Heavy magic via heavy math.

Postby Hectic » Sun Jan 24, 2010 8:07 am

I is confused....

Is that hard to do ingame? I have no clue and i'm not being a smartass.
Image

User avatar
Evil_Echo
Posts: 706
Joined: Tue Nov 27, 2007 10:01 pm
Location: CA, USA

Re: Heavy magic via heavy math.

Postby Evil_Echo » Sun Jan 24, 2010 3:53 pm

No offense taken.

In the game engine each object has two orientation vectors to control direction and 'up' facing. You need to manipulate both. A lot of this is managed by the game engine ( such as when flying a jet ). But when you are creating your own new classes of item then you may have to do this yourself. In one recent case, work on making a proper guidance system for a missile so that it tracks the target properly. Another situation would be making a projected dot for a holographic or laser sight.

Setting the direction and up values is not hard - but figuring out the values to use and keeping them coordinated can be very difficult unless you use some heavy math. If you take shortcuts you can get wierd behavior at certain angles due those shortcuts having "singularities" in their math. An example would be a divide - what happens when you cross zero degrees, boom.
I am fear.

User avatar
Hectic
=CGHQ= Veteran Member
Posts: 1207
Joined: Mon Nov 26, 2007 3:25 am
Location: Durango, Colorado

Re: Heavy magic via heavy math.

Postby Hectic » Mon Jan 25, 2010 12:34 am

it seems like there should be an easier way to calculate the math.

Did you write a script that can continually calculate orientation vectors? It seems like there should be an easier way to do things. A lot of game designers hate math, and i betcha that there's a way to do the same (or nearly the same) thing. I dont know, just my thoughts lol. I just know that game designers really do try to avoid math at all costs.
Image

User avatar
Evil_Echo
Posts: 706
Joined: Tue Nov 27, 2007 10:01 pm
Location: CA, USA

Re: Heavy magic via heavy math.

Postby Evil_Echo » Mon Jan 25, 2010 3:10 am

Hectic wrote:Did you write a script that can continually calculate orientation vectors?


Yes.

Hectic wrote:It seems like there should be an easier way to do things. A lot of game designers hate math, and i betcha that there's a way to do the same (or nearly the same) thing. I dont know, just my thoughts lol. I just know that game designers really do try to avoid math at all costs.


A lot of things are done by the game engine with built-in simulation models. But when you are designing all-new extensions you have to roll your own for this.

You are correct in that a lot of people hate math and avoid the details. Hence why I got asked to do this for them.
I am fear.

User avatar
Hectic
=CGHQ= Veteran Member
Posts: 1207
Joined: Mon Nov 26, 2007 3:25 am
Location: Durango, Colorado

Re: Heavy magic via heavy math.

Postby Hectic » Tue Jan 26, 2010 12:57 am

Evil_Echo wrote:A lot of things are done by the game engine with built-in simulation models. But when you are designing all-new extensions you have to roll your own for this.

You are correct in that a lot of people hate math and avoid the details. Hence why I got asked to do this for them.


Are you a mathematician? That's neat (:
Image

User avatar
Evil_Echo
Posts: 706
Joined: Tue Nov 27, 2007 10:01 pm
Location: CA, USA

Re: Heavy magic via heavy math.

Postby Evil_Echo » Tue Jan 26, 2010 1:11 am

Major in Computer Science/Minor++ in Physics. A degree in mathematics would have be superfluous.

Did my stint in the US Army as a spook, then a couple decades at a Dept of Energy weapons lab. Now retired.
I am fear.

User avatar
Hectic
=CGHQ= Veteran Member
Posts: 1207
Joined: Mon Nov 26, 2007 3:25 am
Location: Durango, Colorado

Re: Heavy magic via heavy math.

Postby Hectic » Tue Jan 26, 2010 7:50 am

Sounds extensive. Congrats on the game production. Keep us updated and let us know how it's going.
Image


Return to “Armed Assault I & II”

Who is online

Users browsing this forum: No registered users and 1 guest