Author Topic: How to help with darwinbots 3 development?  (Read 11765 times)

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
How to help with darwinbots 3 development?
« on: February 21, 2011, 06:00:27 PM »
I've been really excited for DB3, and all the new features, and would like to contribute to the project. I know C#, and have experience using XNA (We are using XNA, right?). So how exactly can I help with it? Especially since development seems a bit slow, and I think I could probably get some stuff done on it. I've coded a few C# XNA 2d physics engines, and done a bunch of other stuff, so I might even be able to dig out one of my physics libraries, or just help code a new one. So, yeah......

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #1 on: February 21, 2011, 10:55:03 PM »
Most of the current work is very heavy on math and physics, but Numsgil has posted some tasks on Mantis that are available for people to work on and shouldn't be too hard.

Mantis Link

You will need Subversion (SVN) to get the code checked out. This wiki page will help you get everything set up.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #2 on: February 21, 2011, 11:40:10 PM »
Yeah, we're using XNA (actually, it's pluggable with other technologies if we so desire, but XNA is the main one).  If you have XNA experience, does that mean you have HLSL experience (ie: shaders)?  The current graphics code is languishing because it just takes more time to work on it than I have.  If someone can own it and just make it do what I want, that would be fantastic.

Basically it's a vector graphics library that uses pixel shaders to draw vector graphics.  That way we get the hardware acceleration of shaders and the anti-aliased and zooming properties of vector graphics.  I've got the shader basically working (it can draw circles and squares), but in terms of being feature complete and actually usuable, it's not there yet.  The shader stuff left to do isn't terrible if you understand shaders.  And also the shaders are more complex than I'd like (currently using SM3 I think), so if we can pare down the instruction count that would be good, too.

The high level interface is also terrible.  And the application I use to test it (the idea being something simple ala MSPaint but for vector graphics) is also barely functional.

If any of that sounds interesting, that would help me out a lot.

Graphics and physics are holding up most everything else, and I don't have a super great idea of how I want physics to work yet, so it's hard to farm tasks out from that.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #3 on: February 21, 2011, 11:49:10 PM »
Oh, also you'll need to get the code and get it up and working.  This page on the wiki tells you how to get started.  If you successfully download the source, there's also a lot of text files in different directories that talk about what's going on.  Basically, the program is divided into modules, and at present they're fairly separate and independent, since I don't have a main EXE just yet.  Look for *.sln files.  These are the main points-of-entry into the different modules.  Blacklight.XNA.sln would be the one for graphics.

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #4 on: February 21, 2011, 11:56:59 PM »
I haven't used HLSL that much, so I don't know how much of that I could work on. Any other graphics-related stuff I could do (Like in the C# code, etc.) If you decide on how the physics will work, I have some experience with that, and have some ideas. I've also recently been reading a lot on Artificial Life, Genetic Algorithms, and stuff like that, so I might be able to help with the DNA / evolution side of the program. I'll look through the code and see if there's anything I can do tonight, and try to get some stuff done on it.  I have off of school for a week this week, so I'll probably be able to figure out some of the shader stuff, and other things.  :)

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #5 on: February 22, 2011, 12:00:22 AM »
Also, how will Internet Mode work in DB3? How did it even work exactly in DB2? I didn't do too much with it, mostly because it didn't work too well. I had some ideas for that in DB3 also. Will that even exist in DB3, and is it being done yet? Because when I finish some shaders stuff, I might look at that if possible. How would it work, though: Central Server, and clients connect to see / introduce bots; Clients connect to each other, or something else? Well, that's probably gonna be for after the program "works", since before then... Kinda useless. Anyway... Back to work!

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #6 on: February 22, 2011, 12:06:59 AM »
The current version of DB2 IM doesn't work (Stuck between updates). It actually works by http post and get. Before that it worked by FTP. I was thinking about making an actual socket server we can run over mono for DB3.

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #7 on: February 22, 2011, 12:12:19 AM »
Yeah, I was thinking the same thing.

And I just opened up the blacklight solution!  :D
Now if I manage to actually make something work ( Yeah, right :P ), how would I commit the change to the SVN? Is there a password?

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #8 on: February 22, 2011, 12:14:11 AM »
Ok, problem already.  >:(
I'm using VC# 2010, and I think it used 08/05... Should I convert, or just use an older version? I might have c# 08.... Wow, why can nothing work right? :(

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #9 on: February 22, 2011, 12:19:48 AM »
And, of course, I have: Web Developer 08, C++ 08, and VB.NET 08.... Converting would make it non-compatible with old versions, or no? Because then it wouldn't matter, but otherwise I shouldn't commit it.....
WAIT, idea... Could I just not commit the sln file??? Since that's all it changes(i think)... Although then I couldn't add new files...

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #10 on: February 22, 2011, 12:32:42 AM »
Have the code, looking through source files, and found in Elipse.cs in Blacklight.Xna, the class is just:
//Nothing special about rectangles

Does elipse drawing need to be implemented? Although, will that use shaders? I hate shaders, mostly because I don't feel like learning HLSL at the moment. And, anything specific that needs to be done? Not really sure exactly what to do...

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #11 on: February 22, 2011, 01:42:53 PM »
Ok, problem already.  >:(
I'm using VC# 2010, and I think it used 08/05... Should I convert, or just use an older version? I might have c# 08.... Wow, why can nothing work right? :(

It uses VS 2008.  I haven't upgraded yet.  If you can find C# 2008 (I'm not sure if they're still providing access to the free express edition, for instance), that would be preferred.

If they don't offer VS 2008 express anymore, I'll have to bit the bullet and upgrade.  The thing with upgrading is that it has to modify all the project files so once you upgrade there's no going back.  I'm fine with upgrading but then it's expensive for me to get the real version.  I could use the express version, (which I use for my laptop, I believe), but I use Professional edition at work, and they're different enough that I hate switching between them.

Also, it's still a bit of a pipe dream that I'd like to get this on the XBox at some point.  Presumably VS 2010 is compatible with XNA community developer blah blah but can someone check that?

Quote
Does elipse drawing need to be implemented? Although, will that use shaders? I hate shaders, mostly because I don't feel like learning HLSL at the moment. And, anything specific that needs to be done? Not really sure exactly what to do...

It's working with shaders right now.  How much of API driven graphics programming/theory are you familiar with?  Like, do you understand what a draw call is, or passes, and on like that?  Do you understand the matrix math that converts from "world space" to "projection space" to "screen space"?  The basic idea is that all the shapes are, as far as vertices go, just transformed quads, but then I draw on those quads in the pixel shader.

Working in the shader is definitely the most obvious thing needing doing.  Most of the non-shader XNA work is done, since it just needs to populate data for the shader to process.  If you look at Solid.fx, you might be surprised how much of it makes sense (it's heavily based in C).  The shader draws ellipses and rectangles right now, and draws them antialiased by basically drawing 5 mostly overlapping versions of the shape, but jittered by a half pixel or so.  It should (hopefully) make a bit of sense if you understand the basic linear algebra that graphics programming uses and C.  If you don't really understand converting from world space to screen space, for instance, this would be tricky to play with, but otherwise it should be pretty easy to pick up the shader language (there's references online for HLSL).

This is the specific task I have in mind.  This, for instance, would be an ellipse shape with a white inside color and a black outside color.  So it's just a matter of getting the pixel shader to change the color it samples instead of just changing the alpha.

...

I haven't thought about IM much.  The basic program will probably have a client/server architecture so that graphics and UI are in one .exe (the client) and the actual simulation is another .exe (the server).  With the idea being that you can run the server on a different computer from the client, maybe a computer you don't actually control.  So people could upload bots to a central server farm, and then view the different instances from their computer.

And probably a unified build that combines them into a single binary, too.

But that's all down the road a ways.

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #12 on: February 22, 2011, 02:37:30 PM »
You can download VS 2008 Express here. You will want the C# version. It is a bit hidden away, wouldn't be too surprised if it disappears at some point.

Quote
Presumably VS 2010 is compatible with XNA community developer blah blah but can someone check that?
Yup. XNA 4.0 actually requires VS2010 + .NET 4.0

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #13 on: February 22, 2011, 02:54:17 PM »
A bit of reading later...  We can probably upgrade fine, but switching from targeting .NET 3.0 to .Net 4.0 can cause problems.

I'll try and download VS 2010 express at some point and upgrade everything, but in the mean time you'll still want to use 2008 express.

...

Oh, for SVN access, just let me know when you have something you want to commit.  I'll probably want to do a code review of changes first (just to make sure you're not coding in Python or something :P), then we can set up SVN access.

Offline Tj3

  • Bot Neophyte
  • *
  • Posts: 39
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #14 on: February 22, 2011, 05:08:21 PM »
Don't worry, I won't do it in Python. I'll probably use javascript :P

Anyway, you know what, I'm just gonna spend five hours making these stupid shaders work, and see what I get.
*.fx files for HLSL, right? Now where do these go exactly??? Do we have one content directory, or one for each component...?

So now, getting out my XNA book with like 100 pages of shaders stuff, and see if I can get this outline border color different thing to work...