Monday, May 21, 2012

I was accepted to GSOC 2012

I will be working again for PySoy in GSOC 2012.
My project title is "Improve testing, documentation and examples".
Additional info is available.

The project starts today and I will be starting with updating the old tests in pysoy side.

Monday, August 15, 2011

Final week

Today starts the final week of GSOC.
Yesterday was supposed to be a "pencils down" day, so I won't be implementing any new features to 2DSide any more. I will spend the remaining week on porting all my changes in default branch to experimental and hopefully to write python bindings for everything I have done in pysoy side. If time permits, I will try to write a small example program in python for the 2Dside class.


Tuesday, August 2, 2011

fields update

quick update about fields: I have now managed to port fields to libsoy almost completely, but not quite. This was quite much larger work than I originally thought as much of the stuff in soy.scenes.Scene required for fields (tags, mass, etc.) weren't ported to libsoy either, so porting those has taken quite much time. I have managed to port the fields stuff now mostly, but I still have some issues actually using them in soy.scenes.Scene as the original code in pysoy seemed to be partially broken as well (it was commented out completely). I'm trying to work up a demo program to test fields now and I hope to get it working soonish as soon as I figure out this little problem.

Thursday, July 14, 2011

Quick update

Managed to fix some bugs in models, atom abuse and ode vapi. Still have not been able implement gravity for 2d bodies. It looks like the solution is not so easy as I thought. Thankfully, Toba&Arc have now suggested me to use, Toba's work, soy.fields to gauge this. Unfortunately, soy.fields have not been ported to libsoy yet, so it looks like I am going to be porting his work to libsoy next.

Tuesday, July 5, 2011

Sphere, box, collisions

In the last posting I planned to work on new models (box and sphere) and immovable bodies and gravity settings for TDSide.

I have now implemented new models box and sphere.
These still need changed to use VBO and added to use textures later on, but anyhow they are usable now.



About immovable bodies, I have figured three ways to create them:
setting new category bits for the body in question (eg.box.shape.geom.SetCategoryBits(<some_unique_integer>), to reverse: box.shape.geom.SetCategoryBits(0)), using a fixed joint to fix the body to the world and just setting the body as null for the geom of the shape of the body (eg. box.shape.geom.SetBody(null), to reverse: box.shape.geom.SetBody(box.body)). The first approach is actually meant for setting "collision categories" for different categories of bodies, so I'm not using that. Fixed joint approach seems to cause some weird slowdowns in my test program so I'm not using that either, but the null body setting approach that is also suggested in the ODE FAQ. Sadly, slowdowns still occur with that too in cases where 2d body with a motor on it to make it move constant velocity collides with an immovable body (eg. player is walking towards a wall). In this case, the body will continue to infinitely collide with the immovable body, thus jamming everything. This needs some kind of special handling that I have not figured out yet.

About gravity, the Scene class has a method for setting gravity for ALL bodies, but I want to give the 2d object in TDSide their own gravity setting so that they do not interfere with whatever foreground/background (graphical) bodies there might exist. Not sure how to do this easily.

Tuesday, June 28, 2011

After midsummer & demo

Last weekend was midsummer so I didn't get much done over the weekend, but before that worked on the ODE vapi to add param names for stops and motors for joints (namely Plane2D for now). I have now added methods for TDSide to make it easy to move 2D object at constant velocity. I will probably make changes to these, tough.

There is a small demo program called tdside to test the custom scene.
To run it, follow the normal installation of libsoy:
./waf configure build && sudo ./waf install

then run program "tdside" from the command-line (should be on your PATH).
At the moment, you can only collide some boxes to each other on a 2D plane.

Next, I plan to work on following features:
- Add way to set gravity on 2d bodies on TDSide
- Add way to add immovable bodies on TDSide
- Split TDSide to TDSide and TDOverhead classes (inheriting from TDBase or something)
- Models: Implement soy.models.Sphere and soy.models.Box (like Cube but with customs measurements). (it would be nice to be able to use arbitrary models from, say, blender, but that is really not a priority now)

Sunday, June 19, 2011

Week 24

Decided to stop working the camera idea for now as Arc thinks I should focus on physics now.

Weekend and beginning of the last  week was frustrating. I have been focusing on creating an enhanced scene that would just restrict its bodies movement on 2D plane for now. Doing this with ODE's 2DPlane joint was seemingly easy, but I got strange slowdowns at first because I didn't realize 2D  bodies must be aligned to Z axis to prevent "angular drifting". Doing this was fairly easy too, but the ODE bindings we use were bit incomplete when it came to quaternions,  so I was stuck for few days until I understood how to fix it.

Anyhow, I have now scene TDSide  which makes it easy  to restrict body movement on a 2D plane. For this week, I will focus on physics again, making it easy to move and rotate the 2D bodies too. Also, how  to deal with foreground and background graphics needs some thinking too. I have  a feeling that I'm going to split this scene class to specializing overhead and sideview scenes later.