Darwinbots Forum

Code center => Darwinbots3 => Topic started by: rwill128 on September 07, 2012, 02:18:52 PM

Title: Helping
Post by: rwill128 on September 07, 2012, 02:18:52 PM
I have a background in C++, working 3d graphics libraries, and a college education in math up to various levels of calculus. It's all super rusty (5+ years old), but I'm willing to relearn and then learn some more.

I'd love to get involved helping with DB3. The program's really caught my attention this summer, and having just finished an English degree, I'm thinking about getting back into computer science. This would be a great project to keep me coming back and learning more.

I'm familiarizing myself with the wiki, getting the C# compiler working, downloading the libraries, etc. Once I've laid out the basics, how can I start helping. (Or learning more about the system/code, so I can eventually help.)

Thanks,

Rick
Title: Re: Helping
Post by: Numsgil on November 12, 2012, 02:57:16 AM
Sorry, I missed this message somehow.  Are you still around?
Title: Re: Helping
Post by: rwill128 on April 12, 2013, 01:59:33 AM
Hey Numsgil,

Sorry I've been off the map for a long while. But I'm back in the programming game now, and yeah, I'd like to help.

I'm learning still, but it will be good to have something to cut my teeth on -- a specific goal or project.

So please, let me know what I can do or start learning to do if you're still around.

Thanks,

Ricky
Title: Re: Helping
Post by: Numsgil on April 12, 2013, 02:42:55 PM
Good to see you again.

An interesting task you could do to get your feet wet is build something for the graphics engine to save out screenshots as SVG. I have some code already in Annulus for visualizing unit tests that produces SVG. It would just be a matter of taking that code and expanding it to handle more shape types and that sort of thing. It might also be possible to include animation data in JavaScript or something like that, but I don know how to do that. But it would let us save out basically movies from a sim and post them online in the forums.

If that doesn't sound interesting I have some other ideas, too.  Let me know how much vector calculus, linear algebra, programming data structures, etc you think you can handle.  I have tasks that involve GPGPU, fluid physics, rigid body physics, graphics shader programming, code refactoring/beautification, and optimizing code for speed and memory.
Title: Re: Helping
Post by: rwill128 on April 12, 2013, 11:58:36 PM
I'll take a look at Annulus tonight and see what's going on in the code. I'm definitely behind the curve, so we'll see how things go.

Should I request a password for changing code at this point (or at least adding comments), or should I just browse through it?

The fluid physics and rigid body physics sound really interesting, as do the graphics shader programming, code beautification, and code optimization. I think I'd be most capable of working on the physics-based problems to start off with.

As for my experience, I don't use math much in my day-to-day life anymore, but linear algebra is kind of like riding a bike.

As for vector calculus and advanced data structures... I did a bit of vector math and matrix math for the 3d graphics programming that I fuddled around with in high school. That was many moons ago, but with enough hours I think I can google my way into those subjects again.

Title: Re: Helping
Post by: Numsgil on April 13, 2013, 02:13:36 AM
In the short term just submit SVN patches.  I'll look them over and check them in if they look good.  After I get sick of doing that much work, I'll set you up with proper credentials to check in changes yourself :) 

...

If you're feeling adventurous here's some meatier problems.  They involve a lot of math and reading, but it sounds like you don't mind giving it a go:

...

I'm working on fluid physics right now.  I wouldn't mind some help, but there's a lot of weird ideas and vocab you need to get familiar with for any of it to make sense.  Here's some papers/links:

Basically I'm working on an incompressible "inviscid" "discrete vortex element"/"panel method" fluid sim.  Only I'm mostly interested in fluid/boundary interactions, so I'm strongly considering ignoring vortices entirely and only using a "potential flow".  Which represents a weird sort of fluid that has properties of both inviscid and really really viscous fluids at the same time.  But it's pretty fast to calculate.

...

For rigid body physics, right now, in Annulus, there's some code to do moving polygon vs moving polygon collision detection, and it's only partially finished.  In order to handle rotations and translations, I've been decomposing the polygons in to vertices and edges, and using numerical root finding techniques to find roots.  I think there's some edge cases (quite literally :) ) I haven't solved yet.  It's not conceptually too difficult, though you need a certain foundation in numerical root finding and a basic understanding of equations of motion.  And there's a lot of code to handle (it's very verbose for some reason.  Something I was going to refactor at some point. )

...

Also in Annulus the straight skeleton code I mentioned earlier is technically correct for all the toy problems I've thrown at it (and that involved way more work than I'd care to admit), but I've noticed that for larger polygons it can get confused and break for numerical reasons.  Even writing the unit tests for more complex cases would be helpful, as it takes a lot of work to transcribe the vertices for the polygons and find a straight skeleton solver somewhere online to give the "correct" answer.  Fixing the code up would be fantastic :)

...

There's a lot of linear algebra code in Azimuth.DenseLinearAlgebra.  Right now it's all direct methods (QR decompositions, Cholesky decompositions, etc.).  But some iterative methods would be useful, too.  Especially because I've noticed that decomposing even medium sized matrices (with about ~40 ros/cols) starts to introduce some numerical error.  Being able to "polish" answers with an iteration or two of some iterative solver would be really nice.  I don't know a whole lot about iterative solvers, though.  But it shouldn't be too hard.  If that sounds interesting you could work on that.  I can probably dig up some references to get you started.

...

This very week I've been working on optimizing the x86 assembly that the very low level linear algebra code is getting compiled to by the C# JITter.  However I'd like to be able to use AVX/SSE as well.  But there's no way in C# to indicate that those instructions should be used by the JITter.  So I need someone to explore various ways to force their use.  One possibility is slimgen (http://code.google.com/p/slimgen/).  Another possibility is having a C++/CLI version of the DenseVector code, but that adds a whole lot of complexity to the build process (since now it needs a C++ compiler, and separate DLLs for x86 and x64 builds).  And I'd like to the program to autodetect which instruction set is supported and automatically load the appropriate version, which means someone needs to much around with the internals of the JITter.  And I'd still like to test all the different versions against the unit tests, so there's that.

...

Those are all really meaty and hard to just jump in and start working on, but they're also IMO the most interesting problems.  Feel free to poke around the code base in the mean time and get a feel for things at least.
Title: Re: Helping
Post by: Botsareus on April 13, 2013, 02:14:14 PM
cool stuff. I have to say it was a brave move to use 4 point polygons instead of circles. I don't know even where to begin to figure out fluid dynamics OR collision detection on these.  :) (Not that we had any proper fluid physics in DB2 anyway, even still)



Quote
n the short term just submit SVN patches.  I'll look them over and check them in if they look good.  After I get sick of doing that much work, I'll set you up with proper credentials to check in changes yourself

So you are saying that the SVN patches I submit do not make changes to the vb6 version? Or, is there like a virtual copy of the stuff I am working on?
Title: Re: Helping
Post by: Numsgil on April 13, 2013, 04:41:16 PM
You've been committing changes, which are different from patches.  Patching produces files that have the diffs in them, and then someone else can use those to get your changes.
Title: Re: Helping
Post by: Botsareus on April 13, 2013, 05:21:29 PM
oh cool
Title: Re: Helping
Post by: rwill128 on April 13, 2013, 11:19:38 PM
I'll keep poking around in the code to learn more, but I think that starting off with Azimuth.DenseLinearAlgebra might be a good idea. If you have any of the resources that you mentioned, please send them my way.

It's starting to look like I'll need to be familiar with Azimuth to a large degree as well to make sense of Annulus anyway, so that'll help with any physics or collision detection that I attempt to contribute to in the future. Thoughts?
Title: Re: Helping
Post by: Numsgil on April 14, 2013, 12:59:47 AM
Quote
It's starting to look like I'll need to be familiar with Azimuth to a large degree as well to make sense of Annulus anyway, so that'll help with any physics or collision detection that I attempt to contribute to in the future.

Yeah, that's very true.  Azimuth provides the foundation of a lot of other code.

Quote
I'll keep poking around in the code to learn more, but I think that starting off with Azimuth.DenseLinearAlgebra might be a good idea. If you have any of the resources that you mentioned, please send them my way.

Numerical Recipes in C (ebook) (http://apps.nrbook.com/c/index.html), chapter 2, is a whole thing on Linear Algrebra.  Section 2.5 is on iteartive improvement to a solution.  It's a fairly simplistic treatment, but it's a good starting place, and it should be possible to adapt the ideas in it at least for simple LU and QR decompositions.

Note that you might need to use Azimuth.RobustAccumulator to get the high precision on the calculation of the "right hand side" it talks about, because of all the cancellation issues.

For more advanced treatments, there's a whole chapter in Numerical Linear Algebra (http://www.amazon.com/Numerical-Linear-Algebra-Lloyd-Trefethen/dp/0898713617) on iterative refinement, but I haven't read it.  I'm also not sure if there's a free version available online, but it's a really common book so you might be able to find it in university libraries or find a cheap used copy.

There's also Gauss Seidel (http://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method) and Jacobi (http://en.wikipedia.org/wiki/Jacobi_method), which have the advantage that the matrix doesn't need to be decomposed first.  Jacobi parallelizes very well, from what I understand, so it's probably worth implementing a version of it to play with for that reason alone.

Be sure you get comfortable with DenseVector, since the basic operations it provides are going to be a lot faster than trying to manually iterate through loops, which is how most Linear Algebra algorithms are presented.

...

At the heart of Azimuth.DenseLinearAlgebra is LinearLeastSquares.SolveSystemWithConstraints, (it's the core solver I'm going to use for rigid body physics and fluid dynamics).  At the core of that is a Linear Complementarity Problem (LCP) solver based on "Algorithm 4.2.11 "Datnzig; van de Panne and Whinston"" in The Linear Complementarity Problem (http://books.google.com/books/about/The_linear_complementarity_problem.html?id=bGM80_pSzNIC).  LCPs are this whole other beast from normal Linear Algebra math, but there's a chapter in that book about iterative methods and it's possible that there's a way to build an iterative solver for LCPs that would make things run much faster.  A lot of that book is available as sample pages online, but some key pages are missing, and it's a far less common book.  Also LCPs are a pain to understand (there's a lot of really opaque vocab and math involved).  So it might not be practical for you to dig too deep, but I'm not all that likely to explore anything in this direction for a while myself.
Title: Re: Helping
Post by: Numsgil on April 14, 2013, 01:05:04 AM
Also, there's a whole thing called "conjugate gradient methods" that I haven't looked in to at all, but it sounds like they'd be fantastic to use, especially since I expect a lot of the problems we'll encounter in practice to be sparse (I started a sparse linear algebra package in Azimuth, but haven't gotten very far with it yet).
Title: Re: Helping
Post by: rwill128 on April 14, 2013, 12:29:44 PM
Wow. This is a great way to jump into math that I never thought I'd be involved with again.

Anyway, I'll just start off reading about the Gauss-Seidel and Jacobi methods and then read Numerical Recipes in C.
Title: Re: Helping
Post by: SlyStalker on April 16, 2013, 03:50:13 AM
The article (Fluid Simulation for Video Games) seems complicated, but I guess if you just wanted to model the resistance caused by the fulid, it would be easier.
Title: Re: Helping
Post by: Numsgil on April 16, 2013, 04:07:33 AM
The article (Fluid Simulation for Video Games) seems complicated, but I guess if you just wanted to model the resistance caused by the fulid, it would be easier.

It is complicated :)

But yeah, I'm willing to cut corners because I'm mostly interested in how the fluid interacts with the bots, and not how the fluid interacts with itself, and with that a lot of the math doesn't matter.  I'll post a demo of what I have once I've fixed a few outstanding issues.
Title: Re: Helping
Post by: Peter on April 16, 2013, 03:43:43 PM
It is complicated :)
It all seems complicated to me.. :mellow:
Title: Re: Helping
Post by: Botsareus on April 16, 2013, 04:40:18 PM
It is not that bad if you grind calculus all your life.
Title: Re: Helping
Post by: rwill128 on April 17, 2013, 10:26:40 AM
Haha, I've been in the planes of the Liberal Arts majors for the last few years, grinding rhetoric and critical theory.

Working on getting my stats up in calculus this whole week, but even the trash mobs sometimes force a tactical retreat.

EDIT: Looks like I was just jumping in too deep. The dense linear algebra code is making a lot of sense. Should be able to make some actual contributions within a week or two. Thanks for your patience and willingness to shove all this information my way.
Title: Re: Helping
Post by: Botsareus on April 17, 2013, 02:24:43 PM
(I was not trying to be sarcastic)

I have been grinding basic binomials since I was 7 years old, learned the quadratic equation was I was 8.

Funny how the mind works, never really figured out calculus.
Title: Re: Helping
Post by: Peter on April 17, 2013, 03:27:36 PM
I have been grinding basic binomials since I was 7 years old, learned the quadratic equation was I was 8.
I think I was just learning multiplication tables at that age...
Title: Re: Helping
Post by: Numsgil on April 17, 2013, 11:31:54 PM
Haha, I've been in the planes of the Liberal Arts majors for the last few years, grinding rhetoric and critical theory.

Working on getting my stats up in calculus this whole week, but even the trash mobs sometimes force a tactical retreat.

EDIT: Looks like I was just jumping in too deep. The dense linear algebra code is making a lot of sense. Should be able to make some actual contributions within a week or two. Thanks for your patience and willingness to shove all this information my way.

It's pretty daunting math.  What you see is several years of work learning the underlying math and writing code to do that math well.

If that math ends up winning, I do have other tasks you can work on.  But they might be less fun :)  (for some definition of fun)
Title: Re: Helping
Post by: rwill128 on April 18, 2013, 08:41:37 PM
Well, you're welcome to hit me with these other tasks.

The main thing slowing down my progress is that I can only work effectively learning one thing at once, and there's simply a lot more than one thing for me to learn -- C#, .NET libraries, math, your coding practices (which seem like good examples to follow), and the overall organization of your modules for Azimuth (and for the larger project that is DB3).

I've recently gotten a better mental map of which modules feature the lowest-level code and how they interact, so now I'm just learning how the basic Vector classes, etc. behave and what features they have before I get into the denser stuff.

The thing is, I start looking at the math, which usually makes sense, until I hit a concept I don't remember clearly, which means I get on Wikipedia or various other sites and read up on it. Then I go back to the code briefly and run into a line of C# code that I'm not familiar with. Next thing I know I've been on msdn.microsoft.com reading about the SerializableAttribute class for 45 minutes.

---

With all this math to learn, I'm starting to think the most effective way to review it is to practice coding implementations of it in my own basic programs.

But I'd like to also keep in mind how Azimuth handles these problems because it does it in such a clean, flexible fashion, processor-efficient fashion. As far as I can tell from my amateur perspective, physics engine libraries and object-oriented programming principles were made for each other, so it's nice to see a structured combination of the two.

---

Anyway, I'll keep on chipping away at the big pieces, but if there's some practical way of helping that I can take part in, I'll do that, even if it's not as fun.
Title: Re: Helping
Post by: Numsgil on April 18, 2013, 11:32:14 PM
Implementing them is a good way to learn it, yeah.  Also, you can set breakpoints in some of the functions and run the unit tests, and step through the code to figure out what it's doing.  I've always found the debugger to be the best tool for understanding unfamiliar codebases.  The code is built very much bottom up, which makes trying to understand it from a top down perspective, which is usually how people like to understand things, difficult.  Doesn't help that it's not even really done.

Have you seen this picture (http://svn.darwinbots.com/Darwinbots3/Trunk/Documentation/ModuleDiagram.png)?  It's woefully out of date, but but that's roughly how I imagined things fitting together when I first started coding things.

...

Anyway, day-to-day right now I'm working on Azimuth.DenseLinearAlgebra.DenseVector.  C# and I have been battling over making the code both readable and as fast as possible.  I've been losing that battle, but I'm bringing out the big guns: a C preprocessor.  Gonna throw some macros at the problem.  Take that C#!  I'm working on modifying an existing open source preprocessor so it'll work for the task, and I've basically got it working.

Right now I have to run the preprocessor as a pre-build step.  It generates a C# code file, and I'll use that to build the project with.  However, it's not immediately obvious which code is the real code and which is autogenerated, other than a comment at the top.  Visual Studio has a way to help with this, though, which is to use the concept of "code behind" getting generated by a custom tool.  It's not sexy coding work, but I need someone to code up a DLL that will allow Visual Studio to treat the preprocessor as a Custom Tool.  See Custom Tools Explained (http://www.codeproject.com/Articles/31257/Custom-Tools-Explained).  It comes with source, so it should be pretty easy to modify it.

The task is to build the DLL and have it query the input file's first line for the tool to run, and then run that tool.  eg: the first line might be //..\..\3rdParty\mcpp\bin\release\mcpp.exe  The custom tool takes that, appends the current file's path and a reasonable output file (maybe currentFile.Generated.cs), and then runs that final command.   Also, you need to build scripts to register and unregister this custom tool with Visual Studio, which involves registry keys and fun things like that.

I'd normally start working on it sometime on the weekend or early next week, but if you want to tackle it for me it would save me some time and be immediately useful.
Title: Re: Helping
Post by: Botsareus on April 19, 2013, 12:54:20 PM
Quote
SerializableAttribute class

I remember that one.  :)
Title: Re: Helping
Post by: rwill128 on April 19, 2013, 02:09:10 PM
Heck yeah! Something immediately useful that I can do. And I can accomplish it in the short term, which makes it easier to get motivated.

I'll read the Custom Tools tutorial and get cracking.

And yeah, I've seen the ModuleDiagram. It was helpful for some basic insight, which is good.

The main thing I need to work out (and perhaps diagram for myself, just to keep it straight) is how Azimuth works within itself, in addition to how it's going to connect to the larger project. That idea of using the tests and the debugger to watch the code work is perfect, though. I will be doing that later this weekend.
Title: Re: Helping
Post by: Numsgil on April 20, 2013, 01:28:32 AM
Another useful tool: websvn (http://websvn.darwinbots.com/listing.php?repname=Darwinbots3).  If you find a file you're interested in, you can view the log for it and see all the commits I made to it.  I usually had interesting comments for any given commit, so it can be useful to see what I was thinking when I originally checked something in, for instance.  Some of the stuff in there is just there because I wanted to experiment, and then I never really got very far with it, or it proved to be unteneable for whatever reason.
Title: Re: Helping
Post by: Peter on April 20, 2013, 07:23:43 AM
Correct me if wrong, but it seems physics are being build from scratch. Why not use a phycics engine?

What's the software license of darwinbots 3?
Title: Re: Helping
Post by: Numsgil on April 20, 2013, 03:31:05 PM
Correct me if wrong, but it seems physics are being build from scratch. Why not use a phycics engine?

All the off-the-shelf physics engines are too wobbly for what I want to do with DB3.  Like, have you played Tower of Goo?  The gooey-ness of the tower is a result of how the physics engine works.  For DB3, I specifically want to be able to have large sturdy towers of bots for things like trees, and if they're constantly falling over because the physics engine can't withstand the forces that's no good.

Quote
What's the software license of darwinbots 3?

MIT License (http://opensource.org/licenses/MIT).  Note that that's much different from the DB2 license, which is a more restrictive holdover from when Carlo first wrote it.
Title: Re: Helping
Post by: Numsgil on April 20, 2013, 04:00:49 PM
Okay rwill, I've checked in changes to Azimuth.  DenseVectorPre.cs has a bunch of macros in it that get expanded to produce DenseVector.cs.  Right now it's running as a prebuild step (for some reason you have to run the build process twice for it to take properly), but if you can get it to work as a custom tool that would be huge.  The prebuild step has two commands: one does the preprocessor, and the other does an autoformatting on the code to make it actually readable.  You'd probably want both to be put in to a batch script and have that get run by the custom tool.

Let me know if you have any issues/questions.
Title: Re: Helping
Post by: Peter on April 20, 2013, 04:38:07 PM
An interesting task you could do to get your feet wet is build something for the graphics engine to save out screenshots as SVG. I have some code already in Annulus for visualizing unit tests that produces SVG. It would just be a matter of taking that code and expanding it to handle more shape types and that sort of thing. It might also be possible to include animation data in JavaScript or something like that, but I don know how to do that. But it would let us save out basically movies from a sim and post them online in the forums.
Most likely a silly question. How can I run the code for the visualization?

Unrelated other stupid question, how can the code for DB2 be set up. I can't find a project file for Darwinbots2. :(
Title: Re: Helping
Post by: Numsgil on April 20, 2013, 04:58:21 PM
What do you mean exactly by visualization?

There isn't a DB3.exe you can run right now.  I'm still building all the pieces individually and haven't put them all together yet.

If you mean how you'd view a SVG file, you'd open it in Chrome or Firefox (Chrome seems to have the best support).

...

For DB2, I think there's a iesara.vbp file, or something like that.  It's in VB6, so you'd need to find a copy of the Visual Basic 6 IDE.
Title: Re: Helping
Post by: Peter on April 20, 2013, 05:08:36 PM
I mean, what do I need to run to generate those SVG files.
Title: Re: Helping
Post by: rwill128 on April 20, 2013, 05:42:47 PM
So I'll check out the changes you checked in recently, but also I have a few questions about the AzimuthUnitTests.

I've been running a few to watch the code work, but I noticed that the first few times I ran the debugger on Azimuth.UnitTests, it tested a few chunks of code in Azimuth.

Now it doesn't seem to be doing so. As soon as the Main() method of Azimuth.UnitTests.Program passes control to UnitTestSharp by calling UnitTestSharp.TestRunner.RunAllTests(), it seems to never get back into the Azimuth code.

So now I've got the UnitTestSharp code and the Azimuth code in the same VS solution, and I can watch the code go from Azimuth.UnitTests.Program.Main into the UnitTestSharp code.

I've also browsed the TestsForUnitTestSharp code, and it appears most of UnitTestSharp is untested, according to a few TODO comments in the code. Does that explain why UnitTestSharp.TestRunner.RunAllTests() does not, in fact, appear to be running all the tests?
Title: Re: Helping
Post by: Numsgil on April 20, 2013, 05:55:23 PM
@Peter: Oh, there's some SVG files getting generated for failing tests as part of Annulus.  Look at CheckSimilarity in StriaghtSkeletonBuilderTests.cs.  Right now all the tests are passing and I don't think any files are getting generated.  But if you comment out the if (oldFailedChecks != this.internals.FailedChecks) check, it will always generate them.

@rwill: UnitTestSharp works by searching through the given assembly and finding all the tests using runtime reflection.  There's never a place where it will explicitly call any methods in Azimuth.  Instead, they're called indirectly.  And in fact, the actual test methods are wrapped in worker threads, so you can't even really walk it up the callstack.

Your best bet is to set breakpoints inside individual tests in Azimuth.UnitTests if you want to watch them run.  Then make sure Azimuth.UnitTests is the "startup process" by right clicking on the project in Visual Studio and finding that option in the right click menu.  Then Debug->Start Debugging, and your breakpoints should hit.

As for TestsForUnitTestSharp, most everything is tested except for some super high level code, just because it's awkward to do. :/
Title: Re: Helping
Post by: Peter on April 20, 2013, 07:18:14 PM
I actually have some tests failing. But they didn't generate SVG files. I do get SVG files if I uncomment that line.

These are the tests failing. Any idea why they fail for me? :(
Quote
Warning   1   "The triangulator needs to be able to handle non parallel edges." in "Annulus.UnitTests.CSG::TriangulationTests.FindSharedEdgesTests::Parallel"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\CSG\TriangulationTests.cs   1207   Annulus.UnitTests
Warning   2   "CutEdgesWithNearbyVertices tests." in "Annulus.UnitTests.CSG::TriangulationTests.CutEdgesWithNearbyVerticesTests::Todo"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\CSG\TriangulationTests.cs   1215   Annulus.UnitTests
Error   3   "Expected "SUCCESS" but was "BOUNDS_EXCEEDED"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingCornervsRotatingSegmentTests.VertexVertex::LinearVelocity_Grinding_SolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingCornervsRotatingSegmentTests.cs   1639   Annulus.UnitTests
Error   4   "null" in "Annulus.UnitTests.SweptCollisionDetection::RotatingCornervsRotatingSegmentTests.VertexVertex::LinearVelocity_Grinding_SolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingCornervsRotatingSegmentTests.cs   1640   Annulus.UnitTests
Error   5   "Expected "SUCCESS" but was "BOUNDS_EXCEEDED"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingSimplePolygonvsRotatingSimplePolygonTests::EdgeEdgeSolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingSimplePolygonvsRotatingSimplePolygonTests.cs   55   Annulus.UnitTests
Error   6   "Expected "4" but was "NaN"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingSimplePolygonvsRotatingSimplePolygonTests::EdgeEdgeSolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingSimplePolygonvsRotatingSimplePolygonTests.cs   56   Annulus.UnitTests
Error   7   The command ""C:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Junk\Annulus.UnitTests\Debug\Annulus.UnitTests.exe"" exited with code 2.   Annulus.UnitTests
Title: Re: Helping
Post by: Numsgil on April 20, 2013, 08:05:43 PM
Those failing tests are for the continuous collision detection.  They fail because I haven't finished :)  I sometimes use failing tests as todo's when I want to work on something else for a while.  That way when I come back I have something I can work in immediately while I re-figure out the code and what I was trying to do.
Title: Re: Helping
Post by: rwill128 on April 24, 2013, 03:49:06 PM
Almost done with the copywriting -- gotta pay the bills, etc.

Anyway, I'll be gratefully jumping back into work I want to do (coding related work) at the end of the week, at latest.

Thanks for the information and sorry if it ended up being something you had to get done yourself.
Title: Re: Helping
Post by: Numsgil on April 24, 2013, 04:41:23 PM
No worries.

I haven't started working on it myself.  It is super annoying without it, though, as the prebuild step takes about 5 or 6 seconds where Visual Studio seizes up. :/  Probably something I'm going to tackle if you don't in a week or two.
Title: Re: Helping
Post by: Peter on April 24, 2013, 05:21:11 PM
From experience getting into code can take quite some time. Especially if you can't play with it full time.
From the peek I did in the code it seems better organized then most projects though.

I might actually contribute at some point.  But I don't have seas of free time atm and the free time I have seems to magically disappear. :unsure:
Title: Re: Helping
Post by: Numsgil on April 24, 2013, 07:48:18 PM
From experience getting into code can take quite some time. Especially if you can't play with it full time.

Yeah, this is very true.  At work my job is pretty much to find bugs in unfamiliar code bases and it is exhausting.

Quote
From the peek I did in the code it seems better organized then most projects though.

Thanks, I tried :)

Quote
I might actually contribute at some point.  But I don't have seas of free time atm and the free time I have seems to magically disappear. :unsure:

That would be cool.  There's still enough to do that it should be easy to find some small corner problem in some area you find interesting and work on it more or less oblivious to the rest of what's going on.  I've gone so deep in so many different areas that I imagine it would be hard for any one person to feel comfortable in all parts of the program at once.

...

Also, on introspection, my core coding philosophy is very slow and methodical, to the point of being nearly pedagogical.  I don't mind spending 4 or 5 months researching, implementing, and testing something even when there's an 80% solution that would probably suffice that someone could spit out in a few days.  That's pretty antithetical to how most video game programming is done (I guess I like the change of pace from work).  Many programmers I know in real life would chafe working under these sorts of conditions, so I recognize this might not be a project everyone would feel comfortable working on, even given the ability, interest and time to do so.
Title: Re: Helping
Post by: Botsareus on April 25, 2013, 09:24:52 AM
Quote
I don't mind spending 4 or 5 months researching, implementing, and testing something even when there's an 80% solution that would probably suffice that someone could spit out in a few days. 

That is why I am afraid to touch the v3 source code.  :)
Also, I don't understand pointers really well. And I need to learn calc.
Title: Re: Helping
Post by: Peter on April 25, 2013, 01:45:32 PM
Also, on introspection, my core coding philosophy is very slow and methodical, to the point of being nearly pedagogical.  I don't mind spending 4 or 5 months researching, implementing, and testing something even when there's an 80% solution that would probably suffice that someone could spit out in a few days.  That's pretty antithetical to how most video game programming is done (I guess I like the change of pace from work).  Many programmers I know in real life would chafe working under these sorts of conditions, so I recognize this might not be a project everyone would feel comfortable working on, even given the ability, interest and time to do so.
If it suffices it suffices. What kind of maniac would waste 5 months just to get a optimal solution.  ;)
Title: Re: Helping
Post by: rwill128 on April 30, 2013, 11:04:46 AM
Hey Numsgil -- I've been messing around with the r930 version of Azimuth, and I know nothing about using a C Preprocessor in a C# VS Solution like this, nor have I used macros very much (though I read up on the MSDN and other tutorial sites about them last week), nor have I ever configured VSE to use any "pre-build steps" before...

... so I'm a long ways away from being able to deliver the custom tools you asked for last week. I can't even get it to build right now.

If I learn more about how to accomplish the pre-build steps that you mentioned by hand, and actually get DenseVectorPre.cs working the way it's supposed to -- even if it's the long and time-wasting way -- then I can probably help with the custom tool and scripts much more easily. At the very least I'll have learned something new.

Can you message me with detailed instructions on how to build it? I've got the UnitTestSharp.dll linked, which was causing most of the errors -- and the last error is a lengthy one. I'll copy it below -- though I doubt it's even necessary.

Code: [Select]
Error 4 The command "call C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\..\..\3rdParty\mcpp\bin\release\mcpp C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\Azimuth\DenseLinearAlgebra\DenseVectorPre.cs C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\Azimuth\DenseLinearAlgebra\DenseVector.cs
call C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\..\..\bin\release\Reformatter C:\Darwinbots3\DarwinBots3.r930\Trunk\Modules.r930\Azimuth\Azimuth\DenseLinearAlgebra\DenseVector.cs" exited with code 1. Azimuth