September 17, 2007
thanks, i will read some former postmortems there befor i get startet. perhaps i will split it up in a real extensive article posted on my website and a shorter one where i break everyside down to just 5 points...


Mike Parker schrieb:
> Extrawurst wrote:
>> Bill Baxter schrieb:
>>> Looks great!
>> thanks a lot. i will forward that to the involved artitst ;)
>>> You should ;-) Go on more about how D worked for you, I mean.  And also maybe throw in anything you ran into that was difficult.  Basically it would be great if you could write up a postmortem of the project that focus on how the choice of D helped or hindered your project.  Then maybe submit it to Gamasutra, or to the Game Developers Conference.
>> well thats kind of a good idea. is there any formal spec how to write a postmortem ? i never did yet. or do i just write down why i did some central dicissions (e.g using D) and what problems appeared and so on ?
>
> Take a loot at the postmortems published by Gamasutra (http://gamasutra.com/php-bin/article_display.php?category=5). They all follow the same format:
>
> * a brief introduction describing the project
> * What Went Right section, with 5 items
> * What Went Wrong section, with 5 items
> * Summary
>
> If you are going to submit to them, that's the format you'll have to follow. If you only just put it up on your web site, it's still a good format to follow, but then you aren't restricted to only 5, or required to come up with as many as 5 (depending on how you look at it) right/wrong items.
September 17, 2007
thanks for your comment. i found the dead Andromeda9 project and will have a look at it.
unfortunately at the moment the source has to stay closed. perhaps this is gonna change depending on the future of the project. but i wont make promises.

--Extrawurst

Dejan Lekic schrieb:
> The game looks very promissing! It reminds me of an excellet game I played long ago, dead project now, called Andromeda9. Will your project go open-source? Or, will the engine go open-source?
>   
September 17, 2007
Extrawurst wrote:
> i am looking forward for some feedback.
> 
> Stephan aka Extrawurst

Very cool graphics. What did you used to create them?
September 17, 2007
It's a pitty You have decided not top open-source the game. I hope You will, at least, open-source the engine.
September 17, 2007
the artists used just the usual suspects: 3dsmax and photoshop

Julio César Carrascal Urquijo schrieb:
> Extrawurst wrote:
>> i am looking forward for some feedback.
>>
>> Stephan aka Extrawurst
>
> Very cool graphics. What did you used to create them?
September 18, 2007
Extrawurst wrote:
> Hey i just wanted to announce a game project i have been working on recently. It started as a student project and what u can see on the screenshots of our website  is the state we reached in just 3weeks of work.
> 
> http://www.galaxy-crusade.de

This is pretty cool. And I like the testimonial, too! Could you add a page to your site with this testimonial about how you used D to create your game? Then we can post it on reddit!
September 18, 2007
Extrawurst wrote:
> that sounds not too bad actually. i think it is worth a try. i just have to see how i can schedule it in the next weeks.

You've already done most of the work in these postings. Just cut, paste, and merge.
September 18, 2007
Extrawurst wrote:
> thanks, i will read some former postmortems there befor i get startet. perhaps i will split it up in a real extensive article posted on my website and a shorter one where i break everyside down to just 5 points...

These kind of postmortems are extremely valuable. And they're great for me because I get questions all the time on "is D suitable for creating great games?" and then all I have to do is point to your URL.
September 18, 2007
well we have talked in the #D channel already yesterday but i want to summarize the discussion a bit.

my main inspiration for the networking architecture was the unrealEngine's netcode. ( http://unreal.epicgames.com/Network.htm ). but as i saw no necessarity in this complex script abilities (for this little project, not in general) and cause my time was kind of short (3 weeks) i decided to use a templated approach instead of the scripted one.

well basically the system is a event driven one where every participant in the network reacts on messages sent between each other. the client is kept really simple as it basically just sends inputs to the almighty server. the server updates everyone around and broadcasts messages for everyone who needs to know certain things.
of coarse this makes certain prediction necessary on client sides to get seemless movement of all the server controlled entities.

the next thing is i wrote the server completely standalone at first and used it as a dedicated all the time which i can just suggest everyone to do cause integrating it later in the client app is much less problematic than extracting an integrated server to have a dedicated afterwards.

the other big part was to write a network socket class that now does all the work for me under the hood. it is able to process two types of messages. one that is send via a reliable connection and one to send via a unreliable one. the inmplemention on Galaxy Crusade used just both UDP(unreliable) and TCP(reliable) to get this done. but it would be no problem to implement a handcoded reliable protocol on top of the fast UDP by oneself. but i can say for this project it is more than sufficient to use simply both (+ it is far less work).

the messages themself are implementing a basic interface and identify themself as reliable or unreliable when added in the queue of the socket class. when they are sent it is up to them to stream their content into a buffer which is sent over the net afterwards.
to have the messages as simple as possible to write and maintain they are heavily filled with mixins and template stuff which basically enables the clean view on the important stuff in them, the logic.

one thing that i tried but wasnt yet able to finish cause of BUGs in D2.x is a system where i could just put every variable(that has to be synced over the net when the messages is delivered) in a nested struct of the message class and then have the templates carve out some methods to do the streaming but the __traits were buggy at that moment (it is still a nice TODO on my list).

thats it for the moment. Tom i forget about some questions pelase let me know ;).

--Extrawurst

Tom S schrieb:
> I'd be especially interested in hearing about the networking architecture. Have you got any plans to write a few words about it? I'm working on a networking lib (a rewrite and redesign of Deadlock's networking) at the moment
September 18, 2007
Extrawurst wrote:
> well we have talked in the #D channel already yesterday but i want to summarize the discussion a bit.

I appreciate that, and guess that anyone who's going to implement some networking code in D will like it as well :)


> well basically the system is a event driven one where every participant in the network reacts on messages sent between each other. the client is kept really simple as it basically just sends inputs to the almighty server. the server updates everyone around and broadcasts messages for everyone who needs to know certain things.
> of coarse this makes certain prediction necessary on client sides to get seemless movement of all the server controlled entities.

So far, we have the same approaches :) In my design, I have 3 types of events: Orders (ones that get sent to clients), Wishes (from clients to the server) and Local(not sent through the network). In the code I simply write SomeEvent(params..).immediate()  or .delayed(seconds), and they get sent over the network and processed locally by appropriate handlers. Of course precise synchronization is required and the events get different treatment, e.g. the Local ones need to support rollback.


> the next thing is i wrote the server completely standalone at first and used it as a dedicated all the time which i can just suggest everyone to do cause integrating it later in the client app is much less problematic than extracting an integrated server to have a dedicated afterwards.

Agreed :)


> the other big part was to write a network socket class that now does all the work for me under the hood. it is able to process two types of messages. one that is send via a reliable connection and one to send via a unreliable one. the inmplemention on Galaxy Crusade used just both UDP(unreliable) and TCP(reliable) to get this done. but it would be no problem to implement a handcoded reliable protocol on top of the fast UDP by oneself. but i can say for this project it is more than sufficient to use simply both (+ it is far less work).

I'm being lazy here and use Raknet for the backend. I'm also planning to try DNet for the reliable UDP communication. (I hope it will kick Raknet's butt)


> the messages themself are implementing a basic interface and identify themself as reliable or unreliable when added in the queue of the socket class. when they are sent it is up to them to stream their content into a buffer which is sent over the net afterwards.
> to have the messages as simple as possible to write and maintain they are heavily filled with mixins and template stuff which basically enables the clean view on the important stuff in them, the logic.

Heavily filled with mixins? How many are needed, actually? In my case, one mixin is enough, but it in turn mixes more mixins, that mix other mixins that ... you get the picture ;)


> one thing that i tried but wasnt yet able to finish cause of BUGs in D2.x is a system where i could just put every variable(that has to be synced over the net when the messages is delivered) in a nested struct of the message class and then have the templates carve out some methods to do the streaming but the __traits were buggy at that moment (it is still a nice TODO on my list).

Hmm... not sure if __traits is actually needed here... I just tested the following snippet with DMD 1.021:
----
import tango.io.Stdout;

struct Foo {
	int a;
	float b;
	char[] c;
}

template expose() {
	void print() {
		foreach (f; this.tupleof[0..1]) {
			foreach (f2; f.tupleof) {
				Stdout.formatln("Field: {}", typeof(f2).stringof);
			}
		}
	}
}

class Bar {
	Foo data;
	mixin expose;

	// this stuff is not exposed:
	double x;
	wchar[] y;
	struct Nothing {
		real z;
	}
	Nothing z;
}

void main() {
	auto b = new Bar;
	b.print();
}
----

... prints the types of the Foo struct. And I think it might be possible to identify the nested struct not only by its index, but by some special field inside.


> thats it for the moment. Tom i forget about some questions pelase let me know ;).

I think that covers them pretty well :) Thanks for the effort!


-- 
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode