Showing posts with label Physics. Show all posts
Showing posts with label Physics. Show all posts

Saturday, May 23, 2009

Its been a long time

It really was, was it not?

Was has changed since the last time I have posted a entrie? Well, much!

First of all: I started running! Not jogging, I mean real running. Its quite exhausting, and I have to admidt that I don't to it every day (unfortunatly), but it has such a great effect on your life if you run 3km. You feel free and active. It may not change you from a introvert into a extervert, but ... your just untouchable. I'm a planet.

Second ... I started twittering.
Its just that easy ... 140 charecters. No matter what you're doing. www.twitter.com/gregthemad
My first impulse to do it was actually to recieve updates from other people/stuff like Major Nelson, or BioWare. But well, I sticked with it and updated a few time.

Third: The first part of my School Leaving Exam is over, prepearing for the last part. Thats the part that you could call 'Oral' part, even if 'oral' sound funny.
I try to focuse on that part the next 3 and a half weeks, but ... I do some other stuff meanwhile ...

And last but not least:
Since I have seen Star Trek I get more and more interested into physics and I started to read Steven Hawkins book: Universe in a Nut shell, just yesterday. ... I read through it and wonder ... is it wired to say that I don't believe in time? I mean that space and time are not two things that affect each other, but that they are just 4 dimensions (3D+1D) to desicribe one and the same thing? Well it may take a while till I can publish this theorie. ;)


PS: I now also use Google Chrome as my main internet browser, and I miss the autocorrection you get in the default text enter fields form Chrome here. :( My English sucks.


Till then, so long


Greg the Mad

Saturday, June 14, 2008

Shoes, Summer, Sample

Today I was going to mall with a friend of mine (not martin, I woun't see him that othen anymore, now that he's not in my class anymore ...) to get some new shoes.
I like timberlands, you know, they look good, a nice to wear, and somehow also got something of funktion in them, so I was walking straight to the place in the shoe shop labled "Timberland", I looked though the different variations of brown, found some nice mixtures out of brown and orange, and one shoe that realy looked good in my eyes, ok, not that special like I would say: "HEY! I take that pair!" but still good. But unfortunatly they only hade them in one size, ... not mine ...
And that bugs me now ... what if I would hade liked them? What if they realy would fit to my stile? And why are they not produced anymore? (between the last two questions I looked at timberland.com :( )

Also some thing that bugs me now, why are ther so many brown shoes, but none that I like ... Dose I have to wear my current for ever now?


And now about something complet different:
Tonight is school summer prom (which summer? *look at weather*), and I'll be there. I don't know yet if it will be that great (weather again), and if I realy will enjoy it (I have to take a friend with me, all freedome of driving is gone ...), well ... I'll see.


Last but not least:
The last two days I was working on a sample for a article that I posted to Ziggyware.com (its not finished yet). Its about my physics code 'How to apply a force'. I always knew that this code is a great pile of work, and that it was worth every moment that I spend on its development, but ... now that I can grab that sphere (in that sample) I realy realised how powerfull it actually is.
It is just a force that I apply on a object, but that allown already looks so great (and realistic), ... and that from a 19 year old programmer that teached all himself ...
If the whole thing continues like it is now, I could be one of the best programmer in a few years.
I already got the understanding and creativity, all I'm lacking of is the basic knowlede, ... and that will be give to me in my bacelor study. ... :D


Greg the Mad

Sunday, June 1, 2008

Scrubs

Yesterday I was all day long busy, and that means something for a lazy guy like me.
I was invited to a birthday party of that guy in school that sits next to me, Martin.
It was a nice little party with BBQ, a pool filled with beer cans and some other funny drinks, like that clear one ... 60 to 70 % I was tolled ... only the half bottle survived, which was a great plus of that party.
Becuase all of them where friends of Martin, noone wanted to barf somewher into the grass, and so noone drunk too much. Ok I knew non of them, so I don't know how they drink, but as I know Martin, they woun't drink in such a way anyway.
Which leads to a little bumper ... I knew non of them, this and my little shieness made it hard for me to know any of them. Fortunatly they've got frisbees!


Ok and now about something different:
Today I put a part of that online that is supposed to become a physic engine one day.
Its up now on http://www.xnawiki.com/ and I hope that one of those greater programmer will have a eye on it and may changes some errors I did miss.


Nearly forgotton:
I finaly managed to finish scrubs off.
Yes I spend the last 2 month in whaching all episodes of the first 6 seasons!
Unfortunatly I discovered today that they're already working on 8 and that 7 will be out somewhere in the far futur (speacking about stuff like scrubs there is a huge time differents between austria and U.S.).
Now I can spend my time on something meaning full, ... for now ...


Thats all for now, so long


Greg the Mad

Thursday, April 24, 2008

Control

I just have writen a the second way of controling my space ship.

The first was the engine controls, accelorate, deccelorate forward.

And now the sceond way are the jets.


If you ever have seen a Star Wars movie or any other SciFi thing, you may have noticed that there are always little jets of gas when they land a space ship. I took that idea of little jets all around the ship and created so the 'Emergency Control Jets'!


The idea behind that is, that even if your ship is hit by a EMP bolt, you still got at least weak jets to turn and accelorate/deccelorate your ship, very usefull if you're hit while you try to land on a planet (see => Serenity). This is possible because the jets, or valves, a connected to the cockpit via several lines, and got tornister filled with enougth gas presure to lift the ship up for a few seconds with out any other energie.

As the presure tornistor get constantly refilled, if energie is avaliable, you also can use them for a perfect landing on a space station/planed. But keep in mind that, on planets, the forces, that the jets have to provide, are much heigher than in space, so even if you got a black hole reaktor in your ship, you might woun't got endless energy to hoverer longer than a few seconds.

Currently I control those jets with the Numberblock, but I already got some ideas how I can swich to those controls on a 360 controller. :)


The next thing would be the Mouse control unit, but once I got this thing done I'll focus on how to transfere a force from absolut (used for the acceloration) and relative (used to turn the ship) ... that'll get complicated ...


Gre the Mad

Tuesday, April 22, 2008

Turn, Scale, Move ... Rebuild!

I had a few little confusing moments in the last days.

For example is the Vector3.Forward value equal (0,0,-1). Minus?!? Its called 'Forward' but actually points into the negative direction?!?

Ok, that would not the a problem, you can live with it.

But what next?
The Blender Y-axis is not equal the XNA Y-axin, but ther to are some ways you can live with.

I have to scale a Blender model with 0.001 to get it more or less right into XNA, but the exproter got 0.01 as the smallest scale value.


It appears that my force physics, somehow, work now. It may turns the ship into the wrong direktion, but after I spend two days (!) in changing the ship model (because of that the title), it still don't work yet.

Fortunatly I build the TPS camera with such a great code that I only had to change two values and it looked into the same direction like the ship.

But its still not finished. I still don't put any great deal of time into the absolut force into relative force thing. For example did I just a few minutes ago discover that the forces I used where something beyond absolut and relative ...
Not to mention that I also changed the relative axis with the whole ship changing thing, so it may take a few minutes till I cleanded the code up ...

So long.


Greg the Mad

Wednesday, April 16, 2008

Progress?

As my ship started turning (spinning would probably be the right word) and moving based on the one force I apply at the rear, next to the planed exhaustfumes, I somehow feel good.

Good about where this is going. Just thing about how much stuff I'll be able to make once I got such basic physics?
Particles (good animated particles ;) ), ... objects that react physical correct, and ... a bunch of other stuff ...

.. Its just so basic to got a force and its effects ... *whiping a tear away* ... I'm so proud of my physic engine ... even if it dose not work right, even if I only use on force and no collition, but ... but ...



Anyway, no about something complet differnt:
I start to get scared. The end o thies years term comes closer, and I still got that subject where I'm in the red numbers, and if I don't start learning for test, that one I got tomorrow, ... Math, I don't got any problems with it, ... I programmed a own programm on my hand held calculator just to calculate the half of tomorrows test, so ...
... I'll have to start to lear, ... for those subject where I got bad grades, and the want to bee's ...

(In on subject I earned A, A, C, and now the teacher wants to tell me that I might get a E in the end WTF?)


So thats all for now. Its already later here, and I still want to go to bed, so long and thanks for reading.


Greg the Mad

Monday, April 14, 2008

Physics? Ship Control? Baby?

Hmmm ...

I'm done with the basic structure of the physics I'll use to control my ship. ... ok ... I have to admit that it was a work of 5 minutes, I did in a short break at school, ... but its a structure.

And so that what wondered me was that it pretty looks like physics I also could use for other, not controled, objects ...
I may would have to make some changes here and there, but it apears solid to me ...

The only thing why I didn't applayed the new code yet is that I somehow fear to loos the old one ... I'll have to make a back up of it, even if its nothing special on it, to be honest ... I even would say that the whole code is crap, ... but its my baby :(

I even will have to add a lot of new values, like the float that tell the code of strong my shields are and so how strong the effects of the controls are, not to mention the pill of stuff I'll have to do to make the jet controls (that a little jet, like you know from real spacecrafts, which a supposed to work even if your hit by EMP, and will make fun when you got gravity to fight with :D )

So there may will pass some time till I got jing and jang in perfect flow for this task, but once I got it I can applay it to the editor and got something ... yeah ... I actually don't know why I did stop working on the editor and made that ... but it will be done soon ... ?


Greg the Mad

Thursday, April 10, 2008

... and it made damage

Well I actually spend 20 mintues on this new physics thing yesterday ...

I stoped it because it ended up with my ship shooting through my little solarsystem.
Ther problem was not that I don't got any control about the physics, but because I ended up without any control over the forces. It was like my first trys of 3D motion.

The problem is that I don't got those anti momentum shield yet, that I've spocken of. All that they would make is to applay a force that would affect the actuall velocity so that its always pointing into the direction the ship looks. No problem, applay a force that rotates the ship and deliveres enought acceloration that also turns the actuall velocity vector.
But how dose a Force realy turn a object like a ship?

F = m * a

M = F * l

M = J * 'alpha'

J = ?

'alpha' is that what I need, but how dose I got J?
My ships are normaly not a easy shape so I could use the basic shapes J's for that ...
One way would be to easy take every object as a sphere and use J=2/5 m*r^2 ...
But somehow I would never be quite happy with it, but for now it have to be enougth ...

Also how dose I know how much a force dose rotate a object and how much it accelorates it? I don't got an answer on this one yet ...

And I made a misstake.
Its a habbit I dislike, but which can be handy from time to time. ... Somehow I don't got fear ... OK, I got fear from ... I can't think of anything yet, but I got it ... sometimes, as long its nothing like to code physics. What I mean is that did not prepare for that yesterday. Ther was no line I've drawn on paper before I started, and that is not good. You easyly loos track if you work like that ... and I'll have to change this!

And I'll start now with it ... today ... soon!
And make some basice logic for the physics!


Greg the Mad

Wednesday, April 9, 2008

A Apple hit my head ...

Last week I spend around 5 minutes in coding anything usefull, and even less in doing anything meaningfull, I think oyu can imagne how I feel now about the last week ...

And just on monday I've seen something that should change my code, and now is the moment I'll start with it!

I watched Serenity and found out that the system I used till now woun't work in futur. Till now I tolled the space ship where to be in the next frame, but that would get hard to tell, once I start to make stuff like landing on planets (shaking), or if one of two engines is brocken and the ship starts turning around all three axis ...

And so I plan to use some physics for that, easy stuff like F=m*a => a=F/m only to accelorate the ship and later a use a little method to change the resulting Vector based on the rotation of the ship. (I easyly could turn the velocity vector, but that would not fit to my planed design ;) ).

That would be the first step to create the final ship behav, with anti- external force shields, anti momentum shields, atmosspheric control trusters, multiple engines typs and all that stuff can be toggled on and off.
That would add a nice simulation touch to my game. I your ship is heading towards a enemy ship and you start shooting, but instead of stoping shooing and flying pass the ship, you just disable your anti momentum shield and the thrusters, so that you can turn your ship will you stay on your flypath, enabling you to continuo the shooting.

Its just a little detail and the player may woun't use it that often, ... but he can!

So enougth talk, I'll now grap my old prototype and try to applay that new system, wish me luck!


Greg the Mad