Sunday, March 30, 2008

Rethink

I finaly found some tim yesterday to solve my littl array problem.

The problem was that I've forgotten to thing about the stuff that I've already done.
When I was working on my game prototyp I used a array for the astroids, and each astroid contained a nother array for the shards that would fly away once the astroid is hit (I never finished that feature).

And there I found my solution: Stupid me has forgotten that for a array you should use 'struct' instead of 'class' for your ... class (I don't know the details about programming).
And once I got that, C# tolled me that I can't initilize a value in a struct, that means that I can't give it a value.
And then I thougt that I have to give it some where else this value, ... and bingo!

All I had to do was to initialize those values later in the Form1 class, there where I also initialize the Build1 class.


And I tryed it, it work. I can load a moden, place it and save the whole scene, the next step (which should be easy *fingercrossing*) is to load a scene,

And once that is done I'll have a look in flexible array and how to realize them. Many because I currently useing a arrays with a standard range of 100, ... wich can lead to pretty big file scizes of around 42kb, only the normal saving of the empty arrays ...

And after that ... Features ...

But: Baby steps, baby, ... baby steps! :)


Greg the Mad

Wednesday, March 26, 2008

Fazit:

What did I manage to do in that 1 and a half week:

  • Changes in the propertygrid affect the model
  • Able to save files ... more or less ...

Not as much as I hoped to do, but if you consider that all that other stuff only is just differnt use of stuff I've already done ... it should not be hard or take much time to make those stuff later.

Now I got different problems, like a Level3D class thats, always, seams to be 'null' ... so that I can't use the Obstacel class array that it contains to save the model paths.

Level3D?

Jop, Level3D.

I actually spend some time to get a idea on how I'll build the editor. The basic of it all will be the Build class, it will contain a array of Leves and maybe some other stuff. And a Level3D is a ... 3D level, ... unlike a 2D level ...

I plan to make the editor flexible, so that if someone wants to make a 2D game, he just has to click on 'add 2D Level', and if he want to make a 3D Level he has to click that button.

The clou is that you also will (should) be able to combine those two types of levels. From simply using 3D stuff for the game and 2D stuff for the interface/menu to real game play parts in both styles.

When I look back, I realy have to say that I'm impressed by myself, ok, I asked the XNA community about that save thing, but all that other stuff was made bymyself, only using tutorials and my own geniusity. Once I got rid of that 'null' I don't know anything that should stop my from making the first demo ... but ... there probably will be something I hadn't meet yet ...

PS: Cool! If you enter "Greg the Mad" (with ") in Google, nearly all links on the first page are about me! That means that I'm the only one in the world who uses the nicname 'Greg the Mad'! I'm unique!

Greg the unique Madman!

Saturday, March 22, 2008

Save Terror!

Lets say that I never had saved anything befor, to beginn with.

So I was complet on the edge of my knowledg when I first thought of saving the editor and its values. I first tryed to get some infos about that out of the 'How do I' files from C# Express. It only contained a hint on how it works, ... for the 360 ...
My next try was the internet. But unlike all the other problems I've got earlyer, ther was no working standard solution for this (WTF?).
... So I did that what I actually do every day, but not to get support for something. ... I've writen something in a online community.

Fortunalty there where some nice programmer gurus, who know exactly how to do this and that.

A few hours later (I start to get lazy ... don't work that much in holidays ... that sucks ...), I got the first 'Hello.mad' file on my PC saying 'Hello World'.

... aint it nice? ... To have his own file format? :D ...


Today I started to connect the Editor values with the save file method. ... It worked ... till I pressed the button saying 'Save ... ' ... the programm crashed ... :D

Now a few hours, a round Crackdown, to come down and a lunch later, I finaly figured out that the XmlSerializer, I'm using to save the file, dose not support the Model Class from Xna ... Bastard.

Genious as I am, I already came up with a ways to solve that problem, ... it may take a while till I changed to whole save code to work without the Model class (I'll save the path of the model files), but its a light at the end of the tunnel, and normaly those lights are not from a train :D


Greg the Mad

Wednesday, March 19, 2008

The First Pic of

Hi,

I just reworked some of the 'Select' lines of my editor and also made the property grid affect the actuall model, which ... is quite a lot.


I now can place different model in space and ... watch them, ... from many points of view.

(Thats more than I could do with the NWN2 Toolset ... :p )


The white wire orbs are the bounding sphere, and ... yes, ... they don't fit ...
The space ship sphere don't even get displayed ...
So, thats all for now, cu
Greg the Mad

Tuesday, March 18, 2008

How NOT to do it.

I'm impressed. I'm confused

How did they ... I tryed it! I tryed it so hard, but still I can't think how they do it.

How dose BioWare/Obsidian work with such a editor (NWN2 Toolset)?!?
OK, its powerfull and got a lot of features, but ... the camera!

You only can orbit stuff with you camera!
If you want to work on a open field you first have to place a object in the middle just to have a good few.

... you can't move the camera freely! That stops any kind of creativity! Even I was able to make a better camera movement in my Editor!

I thought of may making a little NWN2 modul, ... but that ... its impossible to make a good modul, without planing ever detail 2D before. ... that sucks!

C'mon!

If anyone read this, and too works on a Editor, or something similar:
The NWN Toolset is no good guideline, talking about camera control.
Keep that in mind.


Greg the Mad

WTF?

Do you know those moments wher you can't believe your eyes?

Today was on of those moments.
I stood up, maundered to the window and as I opended the curtain, a beam of white blind my sight.

SNOW!! Snow in March!!

That was a great start into the day. It had to be.

My cold is nearly gone, and I did some stuff for my Editor project, Mad-Ed.


I currently working on the little feature, that makes it possible to click 3D objects with the cursor, which is quite interesting.

I already made some stuff featureing the cursor and its connection to the 3D world, so the basics only where copy and past stuff, but that what made the new thing so interesting was that, that the mouse class form XNA, only provides the absolut position of the cursor, starting on the top left corner of the screen. So if your game window is not located at that point you have to use a offset, to get correct results.
Sounds easy.
But how to get the actuall position of an windows form, while its not in full screen?

... Don't look to me, I don't know it either!


I also dicovered that the bounding spheres, of my loaded modes, are beyond good and evil.
The bounding sphere of the table mesh, from the XNA Picking sample, spans the entire field of view! ... just somthing else I have to work on.


But on the other hand dose the actuall clicking feature code work, I just can't controll what I click ...


Greg the Mad

Sunday, March 16, 2008

Strike 1, Strike 2, waiting for 3 ...

Strike 1:

A little cold smack me in my face right at the start of the holidays. Probable a chronicle desease, I got it at the start of every holidays ...

The problem I got with the cold is not the amount of handkerchiefs all around me, but the permanent ... 'down' feeling it provides ...

Strike 2:

Suddenly a copy of NWN2 appeared on my desk. I'm actually not that great fan of round based combat, nor the fan of level up's that take 10% of the entire game play, but I have to admit that it is quite charming. ... Just watching what my character dose, ... its like a fantasy movie, just with figures hovering over the just killed bodys.
A nother cause why I got myself the game was the NWN toolset it contains.
I don't plan to create any module for the game, but I want to have a look on how BioWare (who hade programmed the toolset) thinks about game development tools, and may applays some ideas on my Mad-Ed.
And no that mean not that I'll just blindly copy their editor.


While I'm talking about my editor:
I don't got any great new feature yet (read Strike 1, and 2), but I did create a little grid, like you may know it from other editors. That actually made me think about the scale I'll use there, but I'll have a look into that problem later. Now its about the cursor and telling the editor to care about what I do with it. :) ... so ... once I'm fine again ... and NWN2 is beaten ...


Greg the Mad

Friday, March 14, 2008

1 and a half week work

Its raining outside my cosy cold room. Its a steady rain. No wind moves any drop away from its choosen path. I just fewed my Mail-Box, only advertisement.

Infront of me, 1 and a half week of nothing.

No plans, no work, no duty.

That means that I got comlpet 1 and a half week that I can spend in my Editor Project with the new name: Mad-Ed.

Status of today:
  • 3D View Window with Controls ... done
  • Loading Objects ... done
  • Display Properties ... done

Planed:

  • Changes in the Property Grid will change stuff in 3D View
  • Move/Scale/Rotate controls
  • Change DisplayMode
  • Save Levels

... Its actually not that much that I've planed, but that what a pro would make in just a few days, probably will take me a few weeks ...

Lets see :)

Greg the Mad

Tuesday, March 11, 2008

A light at the end of the Workshop

Some how, I realy don't know how, I managed to get some time, somewhen between learning for school, trieng to get my gamescore back and playing on the new HD-TV from my perents.
And this time was use to work on my Workshop, project.

Just a few minutes ago I got rid of a problem, because of which I was not able to load more then one model, and I also made the first try with the proparties.

It may will take some trys till I got a working propartie system, but it is a great feeling if you try something complet new and after the second try it. dose. work!!!

Once I got this, ... yeah ... then I probably have to thing about how to control, or even write background skripts with Workshop ... that woun't be a pice of cake ...

Anyway ... still can't wait form next weeks holidays :)


Greg the Mad

Sunday, March 9, 2008

Still Workshop

I have already managed to use my CameraMovement class for the edito, even if I hade to change some controls (I was forced to replace the Arrow-Keys with the arrows on the number pad, because the windows form, too uses them).

Also I managed to load some meshes, but later failed ot use mor then one mesh, I tried to use a list for this, but I probably have to use a differnt solution (or rethink the list thing).

But when I keep in mind that all that I'm a complet zero in programming, its going pretty well.

I'll maybe will have the first 'move objects' features in a few days, and later (in around a month :P ) I'll be able to save those moved objects in a Workshop file (if I still call it workshop at this moments) and use them in a game.

If only I had not school ... I could work the whole day on my stuff, ... could ... but unfotuantly I'm lazy and only work when I got a straigt plan ... which I'm lacking at the moment, because I'm not sure yet how to load more then one mesh, ... maybe without list ...

... but I got 3 test this week, but on the other hand I'll have around two weeks holidays after that week ... can't wait!


Greg the Mad

Friday, March 7, 2008

Workshop

And again.

I droped something.

I droped the work on the space station models and stuff.

But I finaly started something that I planed much longer then all the other stuff.

My own editor!

Finaly I managed to get some knowledge out of the XNA samples and use them for my planes.
I don't know how much effort I'll put into the editor, but I'm sure that ther'll be a 'planet' button, where I just have to click and suddenly there is a planet cycling the sun. A button labled 'Astroids' and *pop* I got astroids! etc.

I've chosen the name Workshop for it, because I'm actually a mechanicle engineering studen, and I somehow feel connected to the word Workshop, even if I don't like to work in one ...
... Once I know a better name I'll change it ^.^

I don't got many feature yet (non to be honest), but I hope that I'll got the first feature at the end of next week, as long as I don't waist too much time learning for school ... :p


Greg the Mad

Thursday, March 6, 2008

Drop, Station and Scale

I droped the physic stuff.

No, not because I would not be able to do it, but because its not worth the effort.
Just yesterday I created my second way of tracking physics (using energy instead of mumentum), but I was confronted with some bugs, like the one where the sphere suddenly started orbiting the cube (something that I tried to skriped for astroids, but didn't manage ...). And so I stoped it.

I plan to focus more on the actuall game then the tools all around.


And the next thing that is on my path is the implementation of space stations in my game.

I already made one centuries ago, but I don't like the style of it anymore. The new are build out of many little modules (like the actuall space stations are).
I spend the last day building those moduls, or parts, in blender. I also assembled the first few, but I still now sure about how they'll look, you know, where to place this airgas tank, where the container modul, etc.

And I also finaly made some researches in the scale of .fbx and .x file in XNA.
I discovered that .x files got a 1 to 1 porting from blender to XNA, but .fbx on the other hand got a 1 to 100 porting form blender to XNA.
It always was confusing when I made a new model, but coun't just implent it into my game, because it suddenly got the scale of the whole skysphere ...

At the same time, I made just a little test, wher I tried how close the XNA camer could come a mesh before it cuts thought the surface. 0.5 XNA Units was the first value that I tried and it worked for me, so I'll stay there.
I may could even go a little bit closer, but I don't have to.

So that was it today. I'll have another look into the stations tomorrow. So long and thanks for reading todays post.

;)


Greg the Mad

Monday, March 3, 2008

Waisted Time

And again, another week has past without leafing any trek.

I've spend the last whole week learning for school and some other stuff.

... ther even is nothing I can talk about ...

hopefuly ther'll be much more the next time I write ...


Greg the Mad

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