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

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #15 on: February 23, 2011, 02:10:48 PM »
So thinking how to fix the case for skewed ellipses...  I think you're going to need to re-evaluate the radius of the inner ellipse so that the thickness of the border always looks constant.  This gamedev post looks relevant.  Fixing it is going to involve getting neck deep in some computational geometry, so let me know if you think you can handle it or not (I don't know the solution off the top of my head, certainly).

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #16 on: February 23, 2011, 02:25:38 PM »
If that doesn't sound appetizing, I have another thought:

Set up something that allows us to make movies of the render buffer (where 1 frame of output is 1 frame of the movie.  That way, slow running simulations could be watched in "real time").  The idea I have at present is to save a PNG after every frame and then combine them with FFmpeg (see clicky), but there's probably sexier ways to do this, too.  If using FFmpeg, you can just set it up so that it saves the PNGs to a certain directory and names the PNGs correctly so FFmpeg can use them.  Probably write a sample batch script that uses FFmpeg to combine the screens into a movie.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #17 on: March 29, 2011, 04:46:17 PM »
How about we won't use ellipses and use this instead:



Uploaded with ImageShack.us

For one thing the collision physics on these will be alot simpler

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #18 on: March 29, 2011, 07:47:22 PM »
My current favorite is actually an arbitrary quad.  Because it allows for things like a streamlined kite shape for single bots, a chevron (or arrowhead) for segmented worms, and something like a trapezoid for segemented circle bots (eg: something like this if each color were a different bot).

Note that the shapes for bots above is independent of the graphics, though.  In the graphics system, I'm treating ellipses as simply a type of draw primitive.
« Last Edit: March 29, 2011, 07:50:33 PM by Numsgil »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #19 on: March 31, 2011, 03:04:46 PM »
 :blink: ok, then why are we messing with ellipsis?



I like the movie idea ( as long as it is optional) for a different reason:

Let's say I am running a simulation over night and I want to see what happend while I was sleeping.

All I have to do is go to View > View Playback. and It opens Movie player and shows me what happend.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #20 on: March 31, 2011, 03:47:47 PM »
It's not (shouldn't) be all that much extra work to get circles/ellipses drawing over quads.  The idea is that I want to get a functional graphics library in one strong push.  It doesn't have to be the greatest vector graphics library in the history of forever, or even entirely feature complete, but when it comes to iterating on the actual look of bots and shapes and such I want more than just quads to work with.  Plus it's a fun problem :P

Somewhat related, I'm sort of half thinking that I want to support a subset of SVG.  Save out screenshots as SVG, be able to load in and display SVG files (or at least support a lot of the primitives, if not all of them).  So I might play with curves and such, too.  Which could be used for graphs.  And there might be a cool way to combine SVG files into an animated SVG for movies, although I'm not entirely sure how animated SVGs work outside of browser environments.  And actually, if the graphics are SVG compatible, there might be a way to set up a Chrome-based client.  So we could do things like visibly examine a simulation running on a server using just a web address.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #21 on: April 01, 2011, 05:10:22 PM »
SVG idea, good.

Graphics libraty:

Hey, I am not the developer here, but, If I knew what I was doing, I would not make it harder on myself. (as I mentioned before I want at least basic physics working before I am comfortable enough to mess with DB3, and we are just still doing basic graphics?!   )
Related: I am doing c# in school right now. So, I might worm up to c# enough to actually help with the code. No promises though, I am not going to sit there and figure out when Numsgil wants to paint quads and when he wants to paint ellipses.

(Numsgil: oops, I didn't mean to edit this.  I think I undid the editing I did).
« Last Edit: April 01, 2011, 06:51:14 PM by Numsgil »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #22 on: April 01, 2011, 06:51:32 PM »
Quote
Hey, I am not the developer here, but, If I knew what I was doing, I would not make it harder on myself. (as I mentioned before I want at least basic physics working before I am comfortable enough to mess with DB3, and we are just still doing basic graphics?!  :wacko: )

Yeah, I'm not super good at that :)  If this were a professional game/program with a budget and investors and all that this would be a terrible business model.  As it happens, it's more that I (often) get fixated on interesting programming/math problems, and if they tangentially relate to DB3 so much the better.  I'd be concerned about over-polishing/shoot-the-engineer type issues except there's obvious forward progress, if just rather slow (the linear algebra in Azimuth, the DNA module, and the unit testing framework are 'done').

I'm presently working mostly on physics.  When I get tired of that, I do play around with the graphics.  I'm kind of working on the ellipse problem right now.  For skew transformations, it looks very wrong (see picture.  The border doesn't look like it has uniform thickness ).

Quote
Related: I am doing c# in school right now. So, I might worm up to c# enough to actually help with the code. No promises though, I am not going to sit there and figure out when Numsgil wants to paint quads and when he wants to paint ellipses.

:P I think I am just going to write the shader off as Numsgil-only code, since the skill set to effectively work on it is just too broad (C#, XNA, HLSL, and strong ability with computational geometry).  Actually, I am having a very hard time coming up with tasks which are interesting (ie: not just thinking up test cases for unit tests) and that don't require very strong math skills (eg: numerical analysis, linear algebra, computational geometry, etc.), which makes farming out tasks difficult.  It also makes the tasks interesting to me and I sort of want to do them myself the more I explain what I want :P

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #23 on: April 30, 2011, 02:51:08 PM »
Hey, Numsgil question:

Can we use an arraylist that is of a custom class object type that has an arraylist in it???

If NO, my instructor suggested a RAM based database.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #24 on: May 01, 2011, 08:37:26 PM »
To store what?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #25 on: May 03, 2011, 02:46:12 PM »
Modification on variable length DNA for a variable length amount of robots...

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: How to help with darwinbots 3 development?
« Reply #26 on: May 03, 2011, 04:39:20 PM »
Oh, I see.

The DNA isn't so very large that anything super clever needs to happen.  Right now it's set up as a tree of arrays (that is, a list of base pairs is a codule, a list of codules is a chromosome, a list of chromosomes is a bot's DNA).  The way .NET works, each array stores a reference to the elements in it instead of the actual objects, so it's not at all tricky for different bots' DNA to share the same physical representation.

And even if each bot has 10K base pairs, and there are 10K bots in the world, and no DNA is being shared, you're only looking at about 100 MBs.  So not something I'm super concerned about.