Darwinbots Forum

Code center => Darwinbots3 => Topic started by: ikke on December 03, 2008, 09:30:43 AM

Title: How can I best help
Post by: ikke on December 03, 2008, 09:30:43 AM
I’dd like to chip in. I have some C++ OO education and even experience dating back to my university years and have modded source code for programs to my own preference in vs 2005. My strong points are analysis, design & math, my weak point without doubt knowledge of libraries and the functionality they contain. I think this makes it more appropriate for me to work on db specific code, as opposed to for instance GUI or internet functionality
For me the first step would be reading the code, commenting where appropriate followed by some simple code extensions to get familiar and going. Is there any place you’d recommend or like to see me starting?
Title: How can I best help
Post by: Numsgil on December 03, 2008, 04:30:08 PM
Glad you want to help

All the code is written in C#, so the first step would be to become familiar with it compared to C++. I think you can find some FAQs to that effect online. (clicky (http://www.thinkingparallel.com/2007/03/06/c-vs-c-a-checklist-from-a-c-programmers-point-of-view/)),

The second step is to get the source to compile.  At this moment, I'm in the process of setting up the installation program for Darwinbots and the source code, so if you give me a few days it'll be a lot easier on you.  As to what you can work on, I could probably use some help with physics (there are a lot of unit tests I need to write, for instance), or you can work on the DNA code (some core features still need to be fixed, and some unit tests are failing, and I'd like the unit tests to be moved to using the built in unit testing capabilities of VS208).  I'm not really set up to start work on the core gameplay stuff (shots, shell, reproduction, etc.) until these more basic systems are up and running.
Title: How can I best help
Post by: ikke on December 04, 2008, 03:26:11 AM
I read up on the unit testing thing. It's still vague and abstract to me. I'll follow your lead, if it goes beyond following function output in a dump to screen.
Let me know when you have done the update. Double work if I start earlier.
Title: How can I best help
Post by: d-EVO on December 04, 2008, 03:32:31 PM
I would like to help out to

I am learning Java and will learn as much as I can about C#.
will let you know of any developments.
Title: How can I best help
Post by: Numsgil on December 04, 2008, 05:50:21 PM
Cool.  Java and C# are actually extremely similar.  I was able to help my sister with her Java programming homework having never programmed in Java before.

Check out the wiki (http://www.darwinbots.com/WikiManual/index.php?title=Darwinbots_3#Unit_testing), I have a link to a pretty good introduction to unit testing.
Title: How can I best help
Post by: d-EVO on December 04, 2008, 06:57:00 PM
Quote from: Numsgil
Cool.  Java and C# are actually extremely similar.  I was able to help my sister with her Java programming homework having never programmed in Java before.

Check out the wiki (http://www.darwinbots.com/WikiManual/index.php?title=Darwinbots_3#Unit_testing), I have a link to a pretty good introduction to unit testing.

I know.
When I first saw it I thought it was Java.
Title: How can I best help
Post by: Numsgil on December 07, 2008, 02:48:28 AM
I've given up on a source installer for the moment.  The .svn folders are giving me problems because they're hidden.  For right now, everyone that wants to help can just first run the DB3 binary installer (http://www.darwinbots.com/FTP/DB3/Setup_Darwinbots3%20A00033.exe) to set up the registry keys, then sync to the repository as it says here (http://www.darwinbots.com/WikiManual/index.php?title=Darwinbots_3#How_you_should_set_up_your_SVN_projects_and_local_directories).

Once anyone gets that far I'll set 'em up with tasks to complete.
Title: How can I best help
Post by: d-EVO on December 07, 2008, 05:22:33 PM
can I view the code with visual c 2005.
I tried to download 2008 but it gave me 05.
I want to check out the code, not to edit for the moment.
will get 08 but I have download limitations in my current location.
Title: How can I best help
Post by: Numsgil on December 07, 2008, 09:09:39 PM
I don't know, you'll have to try it and tell me.  Right now the only projects that are 2008 are in the DNA and physics directories.
Title: How can I best help
Post by: bacillus on December 07, 2008, 10:07:55 PM
Unless you already know Java fairly well, it's better to start with C#; first of all, it's the program used in DB; and in Java, most of the tools are spread widely and a pain to find the one you need.
Title: How can I best help
Post by: d-EVO on December 08, 2008, 11:18:09 AM
Quote from: Numsgil
I don't know, you'll have to try it and tell me.  Right now the only projects that are 2008 are in the DNA and physics directories.

I have tried but im not sure if I did it proply
I am using smartSVN and I think I am doing the right thing.
I set up the directory and every thing and I can use it to find the DB3 directory on the site and it shows the C# symbole.
I click it and it does nothing.

probably did it wrong. not used to this subversion thing. The documentation is obviosly not ment to help dumb asses like me   .
Title: How can I best help
Post by: Numsgil on December 09, 2008, 01:55:07 AM
No, you're doing the right thing by telling me if you can't figure it out.  I make no guarantees that I explain things well

You have to "check out" a local copy of the repository to your hard drive.  Did you get that far?  If so, then you have to open solution files (*.sln) into the IDE.  Well, you don't have to but that's the best way to work.  There's a VS2008 .sln file under trunk\modules\DNA\Sunweaver\
Title: How can I best help
Post by: ikke on December 09, 2008, 03:31:21 AM
The physics module project file is not recognised as a valid project by MS c# express 2008.
I was hoping to find the data warehouse to see and learn. Is any of it already implemented in the C++ port?
Q: do you equate modules to threads? I think the program can definitely benefit from multithreading, but I was wondering what your idea is. I have worked with threads in C++ and understand them, but I have never designed and or implemented one, so it would be a first for me
Title: How can I best help
Post by: Numsgil on December 09, 2008, 04:29:18 AM
Quote from: ikke
The physics module project file is not recognised as a valid project by MS c# express 2008.

Damn.  Half the reason I upgraded to 2008 was to use the built in unit testing feature, but it's not available in the express edition.  That really throws a monkey wrench in everything I wanted to do.

Quote
I was hoping to find the data warehouse to see and learn. Is any of it already implemented in the C++ port?

Just to be clear, the C++ version was what I worked on about 2.5 years ago.  It was a pretty straightforward port of the VB version, and brought along most of the bugs and limitations of the VB version.  The C# version really breaks from the old code base and is its own entity.  The fact that I was working on physics for DB3 in C++ shouldn't be confused with when I was working on Darwinbots in C++, they were different projects.  (My plan was to write a physics module in C++ and write a wrapper around it for the rest of the C# code, so I could recycle the physics code in other projects of mine, but I abandoned that idea).

So the C# version right now is pretty naked.  I have a DNA module that's maybe two thirds done, and a few mostly empty projects that I'm slowly filling out, and that's about it.

So in short, the data repository idea doesn't exist in any version of Darwinbots.  I decided to pursue it when I switched to C#, and the C# version is far from done.

Quote
Q: do you equate modules to threads? I think the program can definitely benefit from multithreading, but I was wondering what your idea is. I have worked with threads in C++ and understand them, but I have never designed and or implemented one, so it would be a first for me

I'll probably employ worker threads inside modules (or whatever level of the code it is that I do "for each bot, do X").  It's easy enough to set up.
Title: How can I best help
Post by: ikke on December 09, 2008, 10:06:50 AM
Just went over de data depository article. It has some similarities with what I worked on in my university years. I had a central simulation state with various actors taking turns to modify the state.
Just a dump on my thoughts of implementation in DB3:
It pays to think about the organization of data and the way on how to achieve the link between the modules: relatively speaking either the database is going to be complex and the interfaces simple or the other way around.
For now I see three or four object types in the database:
Shapes (including or maybe even solely consisting out of their edges)
Bots (Corpses as a special type)
shots

Are teleports a separate object type or an instance of a shape?

For each of these types some underlying data needs to be stored in the depository. An overview of what springs to mind and where they would be needed:

Bots:    
location / shape (collision detection, rendering, volume, DNA)
   Connections (ties) interaction between cells, DNA
   Mass (physics, DNA)
   Velocity (physics, DNA)
Acceleration (physics, DNA)
Refvars (DNA)

Shapes:
Location / shape (intersection / collision, rendering, DNA))
Physical / chemical attributes (DNA, physics)

Shots:   
location (collision, rendering, DNA)
   Velocity (physics, DNA)
   Type / content (physics, rendering, DNA)

Teleports:
To from link (network)
Title: How can I best help
Post by: d-EVO on December 09, 2008, 12:06:30 PM
 
I got it working !

I think I corrupted some things when I first used smart SVN because I didnt understand it.
So I deleted everything and started again. set everything up and it works.
So you can veiw the code on VSC# 2005.

I am sure you want as many people to help as possable for such a large development
By making it easier to access I am sure more people will be encouraged to participate

I am willing to writte a step by step guide to accessing the DB3 documents.
If you would like that just say so. (maby I'm not the best person to do it but I understand what newbies need to here    )

PS. is it normal to recieve an error message stating
Warning   1   The referenced component 'Tao.OpenGl' could not be found.    
Warning   2   The referenced component 'Tao.Platform.Windows' could not be found.
have these files not been created yet or am I just missing them ?
Title: How can I best help
Post by: Shasta on December 09, 2008, 07:05:36 PM
Quote from: d-EVO
PS. is it normal to recieve an error message stating
Warning   1   The referenced component 'Tao.OpenGl' could not be found.    
Warning   2   The referenced component 'Tao.Platform.Windows' could not be found.
have these files not been created yet or am I just missing them ?
Those are the libraries from the Tao Framework (http://www.taoframework.com/), a bunch of .Net/C# bindings for different libraries such as SDL, OpenAL, and OpenGL (as is being used here). You will either want to download the taoframework-2.1.0-setup.exe   , or the zip. (.exe reccomended)
Title: How can I best help
Post by: Numsgil on December 09, 2008, 11:31:43 PM
FYI I'm probably going to use XNA instead of Tao at some near point in the future.

And yeah, d-EVO, write up any problems you have here (http://www.darwinbots.com/WikiManual/index.php?title=Talk:Darwinbots_3&action=edit), and I'll integrate it in to the rest of the page.