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

No comments: