Sunday, February 24, 2008

Drawing'n'Offset

Hi,

I finali did something that I planed for a few weeks now. No, the physics are still in unfinished, but I finaly made a Weapon Offset for my bullets.

What I mean with Weapon Offset?
Easy, when I first started to use bullets to shoot around in my games, they always started at the center of the ship that shot them, or in use of a simple Vector3 value that I tiped in by my hand.

Now I finaly tryed something I knew that it works, but not how.

In Blender you can draw stuff like meshs, bones, particles and other stuff, on of this stuff is a simple thing called 'Empty'.
A Empty is like a mesh, just without a mesh ... So it only contains the center position of an mesh with 0 verticles (at least that how I understand it).

And I always knew that there is a way how the pros of game development tell the game wher to shoot the bullet aways (form a weapon, for example), something that they can place in the 3D model and later only have to call in the code to get that Vector3.
They use those Emptys (or something similar).

I first thought that I have to search for the Empty in the mesh part of the Model class in XNA, but I later found out that they get handled as Bones.

With a little try and failer I managed to let they bullets fly away from the sides of the ship.


But belive me, the bullets a unimportent compared with thos Emptys that I placed with the weapon Emptys.
Like the Docking Empty, the Cargo Empty, or the Engine Emptys ... :D



And now about something different:

Like you may know, there is that new Fable2 fanart part on www.lionhead.com and that I already painted some pictures for it.
I just yeasterday I started my new ... BIG ... picture.
I don't know if it will be that special, nor if it will look ... great ... but it will take a few days till I finished it ... so there woun't be any update in the next days ... like always. ;)


Greg the Mad

Tuesday, February 19, 2008

Tidy Up your Drawing

As I was sitting there ... in my room, holding a paper with a few ways how to track two objects, after a collision, ... thinking how to do that, I finaly got my self to tidy up my code a little bit.

I alwasy had problems with the draw. You know. Every model that you want on screen wants to be in that part, sometimes it even want its own draw code that tell the game how to draw them!
And when you use a new model or replace an old, it take hours just to find that one line that you have to change, or find the right place for the new one.

There you can document, split in regions what ever you want, it always stays a bunch on code. So I just made that what I always make.
I exported some parts of it into another file.

Just a few seconds later I got my DrawCode class which held its first code, a few minutes more I got all 5 codes, in the right order, documented and perfect!

I still got that big bunch of code, like the loop for the asteroids and planets, but thats all documented now! All I need now, if I want to draw a model is just load that model, create a Matrix holding the position/rotation/etc, and just call DrawCode.Model(Model, Matrix) and done!

I know that pros, got a much better way of doing that, that they only need a model, a matrix and a twinkle, and they got the model with the right spectral values, a costum textur, self-shadowing, fairys all around it, shadows from other stuff on it, AA, normal mapping and a little bit of bloom to make it Look. Lust. Great!

... I made a salto soon after I got my first model displayed ...


Greg the Mad

Sunday, February 17, 2008

Sleep though the Static

... Damit ... 4 days have past since my last post? Time just floats by when you got holidays ...

I did not much about the new asteroid, all I did was to implent the basic mesh of the unbrocken asteroid, I even implented the brocken ones, but it still don't draw them.

... er ... oh, yes ... I also started to work on my own physics system, starting with simple colliding of two object and maybe later even rotating them, based on how they collide ...

... Man ... I can't wait for school ... (starts tomorrow)

Its not that I like school, nor that I don't know what to do on holidays, but ... I just work much more on my project at school time. ... Don't ask me why ... ... I'm tired of having holidays ...

I want something to do!!!!! So I can spend my free time on something else then sleeping!


Greg the Mad

Wednesday, February 13, 2008

Help needed!

Hey, guys (girls), I need you help.

I've already talked about the Lionhead fan art contest in my last post, and now I 3 of my pictures in there ....

And my problem is now that the competition is too good for me, so if anybody is reading this, please head over to the Liohead community, create a account, and vote 5 stars for my pictures (that are those that are labled: "by Greg453")

... don't even look to the others ... they are crap ... especily that fairy forest thing ... don't even think about looking at this one ... mine would look too bad after you've looked at this ...


Greg the Mad

Saturday, February 9, 2008

Hobba Lisa

If you followed the Lionhead Headlines on their homepage, you may have noticed that they started a Fable2 fan art part for their page. Everbody who got a valide LH community accound could take a pen, scribble something down and send it to them. If you got luck and they like it it gets posted on their page.

... And guess what ... My Hobba Lisa was under the chosen pictures that mde it on in that gallery!

I'm actually not that great artist, but when everytime someone calles a contest out, ... I just can't resist. :)

I allready send my secound pic to them, and got a idea for a third, but I don't think that any could beat my great Hobba Lisa. ;)


About my game Project:

Don't think that because I spend the last two days drawing on my fan art that I did nothing with my game.
Just yesterday I changed the code that told the asteroids where they have to appear, and the days before I created a new asteroid model, that is made out of many little asteroids.

Why I make a asteroid out of more little asteroids?

Easy, because that means that you could shoot that asteroid apart. ... in little pieces.
And aslo dose it mean that I could use a randomizer to create asteroids that from the first second look brocken and even got a hole though them.
I didn't implented that feature yet, because I first wanted to change some stuff like the asteroid placement code and the number of asteroids ( I now got 100 of them around me, and the frame rate don't went down yet!). I'll have a look into that implementation of the new asteroid tomorrow.

See you next time.


Greg the Mad

Sunday, February 3, 2008

Panta Rhei

"everything is in a state of flux"

Last time I told you about that problem with the Deview camera, and ... I was wrong ...

It is not that hard to review 200 lines, its also not that hard to rewrite them ...

Once you've read the first line and then the second, ther third, etc.
You somehow get into that flow ...

All that thought you've got when you wrote them came back, the memory becomes clear, ... and you don't feel bad if you clean some lines ^.^

But that what reall surpriced me was that, somwhere in between, I looked down do to Draw code in the main class and while I was scroling thos 1001 lines a word jumpt into my view.

May have told about the new Cursor last time, once I got it working, I thought of stuff that I could make with it. And, of course, I tryed to use the picking sample and send a ray away from the Cursor (or how I call it in the actual code: Crosshair) and figure out if it hits a astroid and diplay the distance on screen.

I failed. I waisted a whole afternoon to find that problem, and while I was working on the camera movements, just a few hours ago, the bug jumped right into my face and bit me.

All that was wrong was that I used a complet useless value in the middle of the code, and that more or less blocked all the other lines. The bug was gone in just 3 seconds and 3 minutes later I've got the true meaning of the ray.

I used the direction of the ray and the distance to the astroid to get a Vector3 which hold the position where the player aims, and it was not that hard to let the bullets head exactly in that direction.

If I now get a better rotation system for my space ship, ... ... I actually would be done ... The ship controls would be done ... DONE!! ...

And now without childish enthusiasm ... it becomes a game ... no joke ...

I actually could just take the earth, the astroids, the ship and make a 'save the earth from thos astroids' game ... damit!


And now about something complet differnt:

It happened very often the last time that people contated me and asked from help, information or what ever, and I ask my self: 'Why not'.
So if anybody out there gots any questions about my project, game design in general, or something else, just ask.
I may not be the best source of intel, but still, don't be shy, you woun't die. ^.^


PS: I actually planed to write something about Panta Rhei, and how it is true and where in everydays life you can see that it is true, but its still a nice headline, don't it?


Greg the Mad

Friday, February 1, 2008

Re-Rewrite

Yesterday I suddenly got a mistical feeling ... I don't know what it was ... maybe it was a enlightment, ... or a brilliant idea, ... or just the boredom that was hovering between my ears, ... anyway

I started to have a look on the ship controls. While the last big changes I've done where focused on the speen control, this time I wored on the rotation control.

It didn't took me that long to get a working system like you may know it form games like freelancer, so I woun't spend more line in it, yet, but you got no idea how hard it is to make a circle.

Yes a easy white circle in a 20x20 bitmap that you could use as a cursor prototype.
I spend a full hour in Gimp to think about the best ways of how to make a perfect circle.

I thought of just drawing it with my amazing Wacom skill, I tryed the spile system in Gimp, till I finaly just took a great round brush, made a big dot which spaned the whole pic and later just make a nother, smaller, dot in the center of that dot, in the color of the background ...

Ok, its still far form a perfect circle, but you don't notice it while it is hovering around on the screen.

And I added a little enum value telling the game how to handle the new input, just like in freelancer (again) you can press 'space' at any give time and just disable that great 5 line code spring physics (no, I did not use the same thing as they do in the chase camera sample for xna, I used my mecanical engineering skills for a better one :) ), ship rotation and input handle system, so that you can move the cursor around on the screen without any effect (very usefull).

And do you remember when I sayed that I don't want ot talk about the details of this great code, that was because it don't workes yet everywhere.
Once I got the ship thing done, I tryed to applay the same code to the Deview camera, but unfotunatly I found out that the whole camera control code there is very old (around a month) and long forgotton, so it dose not cooperate with this new and shine stuff ...

... So I have to read myself in thos controls and figure out how to change them, or even ... even ... have to rewrite al 200 lines ... *shiver*


Greg the Mad

Tuesday, January 29, 2008

Big, Bigger, Moon!

I actually planed today to clean my lines up. Clean all that stuff I don't need anymore, pimp the documentation and all that suff, ... but then I couldn't resist.

I changed some stuff about the moon.

Yep, Luna, that gray thing at sky when it is dark.

What I can change there? It just cycles the earth?

Yes, you're right. It still cycles earth, but I changed all that code that lets it cycle.
When I started I knew that this prototyp never will have more than one moon (earth is the only planet, of the first 4, that got a real moon), so he always was its own model, got its own values, etc.
But think about jupiter, or saturn! They got up to 64 moons! It would be madness to creat its own model for each of them.

So I came up with a idea.
I earlyer placed all the planets in a so called 'List', and now I did the same with the moon.
Each Planet now got a list of all the planets that cycle him.
And that means a list that got a list. ...

It was hard to initialize that, especialy because I've never have done that before, ... it took me nasty 10 minutes!

And the first time I pressed that F5 button it did work that great that I decided to give Mercury and Venus some moons.
Venus 3 and Mercury 5. Each Moon with its own randomized position ...

I was realy suprised when I've seen that ...

... They could be the biggest eyes ever seen ... or ... the biggest a** ever seen

http://i201.photobucket.com/albums/aa59/Greg453V/Ass.jpg

(I post the link, because I was not impressed by the quality of my last pic)



Greg the Mad

Sunday, January 27, 2008

Matrix!

Hey, its me again :)

Even if I didn't post the last few days, it dose not mean I did nothing.

I've made some minor changes on my game, minor bat with great impact!

Do you know the cry engnine and its editor? No? Ok than I will explain a little bit before I tell you what I've made.

In the CryEngine Editor you can build the whole world, place AI guys, mission stuff and all that crap, but that what makes it special is that you can press a butten at any given time and just play the game like you've just build it.

Somehow I've copied that idea. Somehow ...

While you can press the button in the editor to play the game in the Cry Egnine Editor, you can press F1 in my game at any given time to swich in a Dev-view (Hey, nice name, ... from now on I will call it that way !Deview! )

In that view every game thing gets frezzed, and you can hover around like in matrix! And I also scripted it so that all they BoundingSpheres and boxes will appear when I hit that button, as the Devtext will.

That view don't got any great point yet (like the whole game ^.^), but I got great plans with it.

Imagen you play a game and see a something happen, ... that should not happen, for example a AI ship flying against a wall.

And now imgane you just hit that F1 button, hover over to that ship, click it and you can have a look at all its values.
What is it trying to do?
Why is it trying to do that?
Name it.

And the idea is that you also can pic that ship, replace it and than only let the ship fly around.
Will it fly again in that wall?
At the same place of the wall?

Maybe its his target. Maybe its a station or a enemy, that somehow fliped behind that wall ...

etc.


The next step I plan actually would be to display all the infos about that ship, and maybe get a working line code, so that I could display where it it going, etc.

... I've seen a interesting topic about that at the XNA boards.


And here the other stuff that I've made:

I fixed all planets:
Now I got 4 little orbs hovering around with their nice textures and the not great but better spectral reflection. One of the problems I still got with them is their orbit code. It works with the game time value, so it I press f1 again and leaf the Deview, the planets will be at a complet different position, but on the other hand: that shows that my gravity for the astroids works.

I can shoot!
I build a little bullet model and had a look at some older code that I've writen, and it only took me a half hour to let the bullets fly around. And that better than before! And I also programmed them to destroi astroids, when they meet one, but those bastards are fast. ... the only problem I got with those bullets it that they fly tail forward ...

I changed the sice of the SkySphere:
At the start I used a skysphere, placed in the center of the world, big enought to contain every model I've made. Now I changed that sphere so that it is sticked on the camera position and only half so big.
You may guess not: "Hey, don't that mean that it don't contain ever model anymore?"
Yes, that actually was the whole point of it.
The solarsystem is so big that you can't see from one end to the other, but its inpossible (for me) to rebuild sol in that scale. But in that scaled down vision you can see from one end to the other. So I shrinked the sphere down, add black fog (so that the planets can fade out in the black space), and gotcha!
I also plan that the planets and stuff scale down when they leaf view, just to increas that effect.


Greg the Mad

Monday, January 21, 2008

Pic[ture]

Here is the first pic of my game:

Its noting special, just my test ship, the collored orbs that are supposed to be panets, but you can see at thier scale and the scale of the spheres around them that not everthing works yet. And of course: earth. The only planet which don't make me bother :-)

The othres little spheres all around are the 40 astroids crashing down on the planets. (they get movement into the slow moving planets)

The 'T' or three arm stars hovering around my ship are part of s easy (cheated ^.^) WireBox, ... just for fun. (I don't use the normal line way how pro's make it, I just made a special mesh which looks like a this box and displayed it in the WireFrame way ^.^ )

And last but not least you can see my 'developer text' on the top left hand side of the pic. Its very useful if you can display text and values very easy and quick, they help you to find coding problems like the angle problem I've got with my ship turning matrix.

Hey, and mars is back! He was hidden behind a PlanetList Problem. I got 4 planets, but I've only renderd 3 of them, tricky little list figures. (You can't see him on that pic :-) )

All I acctualy would need more for a real ... 'easy' demo of my aimed game, would be a mission (fly from point A to B) and a enemy to attack you. ... Maybe more stuff like mining astroids and cargo to transport. But that all is only minor, compared with the mission.

... No game without Mission/Quest/Stuff to do/ etc. ...

Greg the Mad

Saturday, January 19, 2008

Faster than the police alows

My last post here is already a few days back, and I have to admit that there is not much I could talk about.
Not because I finaly was discoverd by a game studio and got a NDA not forbitting me to tell you anything, but ... ok, there never will be any studio that will 'discover' me, but ... anyway. :D
I just have not done that much the last few days.

I may have changed some more speed controles of my ship, have added something like a camerar movements when the ship accelorates (or something like that ...) ... ja ... that and I also made the WireFarme render code, I've talked last time.

... I must wait ...

I have to wait till the muse kiss my ass and a great idea stricks my in its violence back to the PC to realise it.

Till then.


Greg the Mad

Monday, January 14, 2008

Bastard Pacman

Hey, to get the pints working was much easyer than I thought!

I ealyer tryed to get the point relevant values into a seperat .cs file to have more overview over all that new code. That. Was. Wrong.

No matter how usefull it is to have stuff in its own file (you just could copy the file and use it at any other game, with out rewriting all the stuff), stuff like those draw routines should be in the main game class, just to keep it simple. But on the other side of the medal are the two points, that I'm drawing, too much for my PC and the frame rate goes down ...

But on the medal holding hand of that hard work I was facing yesterday I finaly found a easy why of rendering models in the 'WireFrame' style.
A little line, part of the point drawing code, was telling it to draw it in 'Solid' style, so I was wonder what would happen if I would swich that in to 'WireFrame' and bingo, I got a whole wired world.

It should be easy now to draw stuff like a grid or even some useful stuff, I'll have a look into it.

Wish me luck.


Greg the Mad

Sunday, January 13, 2008

Some people got stones on their way ...

... I start to get better and better in climbing mountains.

No, Mars still is lost in space, but I managed to create a better controle system for my little ship.

But the actually point of the post is not that what I managed to do, but that what I din't managed to do. (Sorry, but that are my astrians genes comming through :-) )

What do you think is the easyerst thing to display in a game? No, not a point.
I've just spend this last dear afternoon of that weekend in creating a point on the screne, ... I failed ...
Ok, ... I allways make stuff more complex than it could be. Instead of a complet new prototyp, I tryed to implent the code sample into my old prototyp with the ships and planets.
I planed to draw the axis of my ship (The axis of the ship are not necessary the same as X/Y/Z are), but the space stays empty.
At least so I guess so, but the game don't want to run itself since I've implent the new code pieces.
(I hate those errors, that never introduce themself and come, uninvited, to my partys)

Anyway, there also was a update on creators.xna.com , and ther now is a sample about WinForms and content loading, ... which actually reminded my of my old idea of making a XNA Editor all by my self (If there is no official ...).
I could use all the code I've created in my space prototyp there and finaly start to creat some content for a demo (or even a compete full featured little game ...), which I plan to use as Port Folio.
But I still got around 2 and a half year till I'll need one, so: "no stess, keep it slow, and make it better", and if I look back at the progress that I've made just in the last monthe, then I can look into a bright futur.

... I see a beatiful sunrice on the side of a steep mountain ... a mountain to climb ...

Here fits my new most beloved phrase:

"Yippee-I-Yay, Motherfucker"


Greg the Mad

Thursday, January 10, 2008

Astroids and brocken Mars

Its amazing which great animation some gravity can produce.

If managed to make some astroids and also I reminded my self of the great infention of the List. A list is actually like one Astroid, just with more than just one position, rotation, velocity and what ever you want. All you need to know a spezific value is the list name and the number of the astroid.
Which is a great asset if you have to handle all the 40 astroids I've used in my last build.
But 40 astroids alown are not that spectecular like they may sound. It all gain a lot more if you add newton.

I started with my good old Motion.Straight code, which creates a vector pointing exactly ther where you want it to point to, great if you want the let something chase something else (as long as ther is not wall, or any other barrier). I just took that code and put the gravity there where the speed is supposed to be and, bingo, ther perfect acceloration for a astroid!

But to which place do you send such a astroid?
I don't know where you would send a astroid, but my target was clear, earth!

I spend a whole afternoon whaching 20 astroids crashing down on the blue jewel. And it gets much better is you treat acceloration like acceloration and not just like speen, and if you add all the others planets.

I've already have got Mercury, Venus, Earth, Luna (the Moon) and Mars hanging around with my test ship. But now that I've added the astroids, they suddley got a point. Seeing how Luna accerlorates a astroi, it orbits earth a moment, Luna gets it out of that orbit and sends it on his long way to venus (around 0.5 sec aways from earth).

But I don't know why, but Mars don't want to play with the other children, ... maybe its because he's not there.
Somehow I managed to get rid of the red planet (Mercury acctualy is more red, at least on the pics I've seen), it somewhere was lost on the road to the PlanetList I've made to make the grafity thing easyer. (You have to circle up to 40 astroids through 3 planet- and one moon-grafitations till you get the final acceloration from all of them)

The next step would be to spend more work on the Orbit-Tool I plan, which would let them orbit a planet, physicaly correct, but with out disturbing stuff like grafitation.

I'm lovin' it. :)


Greg the Mad

Saturday, January 5, 2008

WooHoo!

I got a flying ship! I got a flying ship! Nanananah Nahnah!

... ok, ... it flys like a jaw of dirt, and got unbelieveble antigravity shields, ... but it flys ...

I also made some improvments in my camera movement subroutine. It finaly can give a real angel back, that you could use to turn something, a ship for example.
And I also made a desiction: FPS and TPS are not that similar.
You may can use the same knowleg here and there, but still ...
At FPS, you only have to move the camera, at TPS, on the other hand, you have to move the ship, and THAN the camera. ... thats complet differnt ...

Now I gona fokus on the speed of the ship. That dose not mean that I think about the max speed, but about how to control the speed. Inertia? Jet force? Gravity? Ship weight?

Fortunatly there is a XNA 2 sample about that, but that dose not mean that I will be easy.

I also plan the play a little around with gravity, now that means, that I will place some astroids here and ther (random) and make that become affected my close planets, and that also includes a orbit tool. ... thats music in my ears! *headbangle*


Greg the Mad

Thursday, December 27, 2007

And it dose work!

Yep, its done ... I got a (more or less) working camera subroutine which I can applay wherever and whenever I want. Once I got some little bugs here and there gone, changed the scale of the solarsystem, I can start to make the first skrips for the ship control!

I'm so excited!

And once I got that done, I can start to think about some basic physics and what content I'll add, I mean stuff like planets, moons, astroids, trojan and stuff like that ...

er ... and by the way: Marry Christmas and a happy new year (late, but better than never ^.^)


Greg the Mad

Saturday, December 22, 2007

Back to the Roots

First day of the christmas holidays and ... ah ... peace ... I feel great ... finaly time for me and my little private projects:

My FPS hover camera still don't work but I just dicovered a possible couse:

I dicovered that the logic in my Motion.Straigh code is wrong. That logic is supposed to give a vector back that leads a thing to a other thing, sounds simple, but I made a little error, somwhere in that 100 line thing ... and it will take a few hours till I got it bug free ...

But on the other hand I've dicovered too that my skill must have improved in the last month, because I found many stuff that I changed here and ther, and a found a lack of documantari at the whole thing ... that sounds like a lot of fun ... can't wait till tomorrow to fix that :-)

Hey, and by the way, if youlive near vienna (austria), ... beware ... Ifinaly passed the roadtest and got my licence. ^.^


Greg the Mad

Monday, December 17, 2007

Planet Madness

It works!

I've wrote a few lines just a few days ago, which are supposed to move a object around and other object, ... and ... it works! WHOOHOO!

So I now got a earth (cycled by a moon) and a venus cycleing the big thing in the center ... I'm so good ...

And now to the bad news:
After I've made the first few test with this new thingy, I stated to make few camera movement sub routines ... which was a bad idea ...

I hope that I can use the rest of the ... week to get it work like a want it to work, but ... if not ... I'm on the edge of failing ... anf failing is not that what I want with this project ... *fingercrossing*


Greg the Mad

Saturday, December 8, 2007

Nothing New

It was a few weeks since my last post here, thats mainy because there happened anything to tell about.

OK, ... Mass Effect, game of the year 2007/2009/2010, and I spend every free second playing it, with great impact on my marks and my Nature of Random Project.

I plan to make a review about ME, but there is just so much to write about ... how do profis get all that infos into a few pages?


So thats all for now ... Lets go back to my X-Box 360 and save to univers ... again and again and again ...


Greg the Mad

Sunday, November 25, 2007

Nature of Random

I've only spend some mintutes on my new project, because I got problems with the height map prototyp, which would be an great part of the project.

First I try to make the lines (I've now, out of desperation, have copied out of the XNA sample) work and make some little edits on them.
For example I want to make the height map automaticle repead itself and write the first lines of, how I call it, 'nature of random', but I don't want to say anything more about this.

I acctualy was so desperate that I even thought of changing the engine, but XNA ... just look so good ...

And I'm afread that I woun't find any time in the next week to fixt that 'no entrypoint' problem, because I'll get Mass Effect this week and I'll play it ... all day long ... and then write a review and post it somewhere here or there.


Greg the Mad