www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - GalaxyCrusade, a Game+Engine completely from scratch in D

reply Extrawurst <spam extrawurst.org> writes:
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

ok well i posted the announce in this newsgroup basically because it is 
completely written in D from scratch. i also have to confess that i used 
D2.003 which btw. worked perfectely fine for me (yes i used the new 
const). yes it could have been dangerious, but i think in that cause i 
would have been able to convert it to D1.x back again. Anyway it worked 
without a bigger problem(just the one Bug that makes compiling with 
(O)ptimization impossible [bugzilla #1437] which is the same for the 
D1.x series).

So from now on i am perfectly sure that D has a great future in 
realtime-simulation programming, cause with FAR less effort(in 
comparisson to C++ which i have to code for years and in my job) i was 
able to put together:

- a super scalable networking engine
->supporting reliable messages aswell as unreliable fast sent messages

- a graphics engine that is completely OOP and still damn fast. (based 
on OGL)

- complete platform indipendent system. which compiled without any 
adjustments on Linux on first try.

- best structured engine ever cause i was able to write templates first 
time in my life cause in D i actually understood it.

- .... i could go on like forever i just fell in love with D even more... ;)

so please take a look on the homepage and the screenshots and be patient 
with the Demo i will upload in the next days.

i am looking forward for some feedback.

Stephan aka Extrawurst
Sep 17 2007
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
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

Looks great!
 - .... i could go on like forever i just fell in love with D even 
 more... ;)

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. --bb
Sep 17 2007
parent reply Extrawurst <spam extrawurst.org> writes:
Bill Baxter schrieb:
 Looks great!

 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.

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 ? --Extrawurst
Sep 17 2007
next sibling parent reply Alexander Panek <alexander.panek brainsware.org> writes:
Extrawurst wrote:
 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 ?

Something like that would be great! :) Especially interesting (IMHO) would be: - build tools - libraries - build process including the libraries - etc. (you get the idea)
Sep 17 2007
parent Extrawurst <spam extrawurst.org> writes:
Alexander Panek schrieb:
 Especially interesting (IMHO) would be:
     - build tools
     - libraries
     - build process including the libraries

IDE: - my own ( http://www.extrawurst.org/page06/index.php?section=galery&picID=59 ) very simple D IDE - it uses BUD for the build process - ddbg for debugging libs: - OpenGL, SDL, DevIL, Ogg-Vorbis (thx to Derelict) - phobos so you see it is a pretty simple build process and regarding to the used libs it is also simple cause i just used some derelict bindings and the rest is completely handwritten. --Extrawurst
Sep 17 2007
prev sibling next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Extrawurst wrote:
 Bill Baxter schrieb:
 Looks great!

 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.

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 ?

Yeh that's basically it. Just describe what your goals were with the game, what decisions you made, how those decisions panned out, what came up along the way, and how well you were able to meet your original goals in the end. And in this case, try to focus mostly on the role D played. :-) If written well, I have a feeling such an article would go over well with editors who've seen the same "hey we wrote a game!" articles 1000 times. By focusing on D you would bring a new twist, and hopefully an editor will come away convinced that D has potential to be a C++ killer in the games industry and be eager to get that story out to his readers. It doesn't really matter if it's true or not. Editors love writing provocative lead lines like "will your next game be written in D?" or "Will D replace C++?" Disclaimer: I don't have any first hand experience with writing something like this myself, but my buddies at school managed to get a writeup of their game course project into Gamasutra, and that was just a run-of-the-mill C++/DX8 engine. --bb
Sep 17 2007
parent reply Extrawurst <spam extrawurst.org> writes:
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.

Bill Baxter schrieb:
 Extrawurst wrote:
 Bill Baxter schrieb:
 Looks great!

 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.

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 ?

Yeh that's basically it. Just describe what your goals were with the game, what decisions you made, how those decisions panned out, what came up along the way, and how well you were able to meet your original goals in the end. And in this case, try to focus mostly on the role D played. :-) If written well, I have a feeling such an article would go over well with editors who've seen the same "hey we wrote a game!" articles 1000 times. By focusing on D you would bring a new twist, and hopefully an editor will come away convinced that D has potential to be a C++ killer in the games industry and be eager to get that story out to his readers. It doesn't really matter if it's true or not. Editors love writing provocative lead lines like "will your next game be written in D?" or "Will D replace C++?" Disclaimer: I don't have any first hand experience with writing something like this myself, but my buddies at school managed to get a writeup of their game course project into Gamasutra, and that was just a run-of-the-mill C++/DX8 engine. --bb

Sep 17 2007
parent Walter Bright <newshound1 digitalmars.com> writes:
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.
Sep 17 2007
prev sibling parent reply Mike Parker <aldacron71 yahoo.com> writes:
Extrawurst wrote:
 Bill Baxter schrieb:
 Looks great!

 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.

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.
Sep 17 2007
parent reply Extrawurst <spam extrawurst.org> writes:
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!

 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.

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.

Sep 17 2007
parent reply Walter Bright <newshound1 digitalmars.com> writes:
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.
Sep 17 2007
parent reply janderson <askme me.com> writes:
Walter Bright wrote:
 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.

You should do a postmortem on D one day, or have you already? -Joel
Sep 20 2007
parent reply Extrawurst <spam extrawurst.org> writes:
are you asking me or walter?
for my part i will write a postmortem on the game project GalaxyCrusade 
when i find the time and it will pretty much be "a postmortem of using D 
in a game project" cause thats what i had to do in that project in the 
first place.

--extrawurst


janderson schrieb:
 Walter Bright wrote:
 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.

You should do a postmortem on D one day, or have you already? -Joel

Sep 21 2007
parent janderson <askme me.com> writes:
Extrawurst wrote:
 are you asking me or walter?
 for my part i will write a postmortem on the game project GalaxyCrusade 
 when i find the time and it will pretty much be "a postmortem of using D 
 in a game project" cause thats what i had to do in that project in the 
 first place.
 
 --extrawurst

That will be great! However I was talking about Walter. -Joel
 
 
 janderson schrieb:
 Walter Bright wrote:
 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.

You should do a postmortem on D one day, or have you already? -Joel


Sep 21 2007
prev sibling next sibling parent reply Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
The screenshots look awesome! Congrats! :) I'm waiting for the video to 
download... How about posting it on YouTube, so the wait doesn't take 
forever? ;)

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, and will open source it when it's stable 
enough and I have good tests.


-- 
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode
Sep 17 2007
parent reply Extrawurst <spam extrawurst.org> writes:
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

Sep 18 2007
parent Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
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
Sep 18 2007
prev sibling next sibling parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
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?
Sep 17 2007
parent reply Extrawurst <spam extrawurst.org> writes:
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?
   

Sep 17 2007
parent Dejan Lekic <dejan.lekic gmail.com> writes:
It's a pitty You have decided not top open-source the game. I hope You will, at
least, open-source the engine.
Sep 17 2007
prev sibling next sibling parent reply =?ISO-8859-15?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Extrawurst wrote:
 i am looking forward for some feedback.
 
 Stephan aka Extrawurst

Very cool graphics. What did you used to create them?
Sep 17 2007
parent Extrawurst <spam extrawurst.org> writes:
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?

Sep 17 2007
prev sibling parent Walter Bright <newshound1 digitalmars.com> writes:
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!
Sep 17 2007