Thursday, August 30, 2012

teamSize++ and Other Things

Lots of things to say today: the biggest is that I'm no longer working alone. My roommate has joined me. He's a pretty awesome programmer and really good at math.

Quicksand Fix:

We decided to fix my engine instead of using someone else's. I fixed the quicksand (for real this time) by adding the non impact force to the impact force (if impact is true). Here is the new snippet:

protected Vector calcContactForce(float theta) {
    if(impact) {                              
        if_contact = new Vector(theta, (float) (mass * velocity.magProj(new Vector((float) (theta + Math.PI), 1)) / dt)).add(new Vector(theta, sumForce.magProj(new Vector((float) (theta + Math.PI), 1))));
            // impact plus notImpact
        else {
            f_contact = new Vector(theta, sumForce.magProj(new Vector((float) (theta + Math.PI), 1)));
        return f_contact;

I was so happy when I finally got this.

Zooming and Cropping:

The view now moves with the player and scales with velocity according to a Gompertz Curve.

Redoing Collision:

My roommate is redoing the collision system to make it more general (so that it can support more shapes and maybe even rotated shapes down the line). It's not done yet though.

Size Update:

justin@agartha:src$ wc -l *.java
 1174 total
justin@agartha:src$ wc -c ../bin/*.class
  775 ../bin/AirBlock.class
 1200 ../bin/Block.class
  173 ../bin/CanDraw.class
  251 ../bin/CanMove.class
 1122 ../bin/GroundBlock.class
 2474 ../bin/KromFrame.class
 1632 ../bin/KromGenericLine.class
 1541 ../bin/KromLine.class
 6910 ../bin/KromPanel.class
 1474 ../bin/KromPoint.class
 4054 ../bin/KromRectangle.class
  423 ../bin/KromShape.class
 1302 ../bin/KromXLine.class
 1302 ../bin/KromYLine.class
 4327 ../bin/Map.class
 5169 ../bin/Physics.class
 1551 ../bin/Player.class
 1944 ../bin/SlantBlock.class
 2315 ../bin/Vector.class
39939 total

Huge size increases. We passed 1000 lines. Woohoo! Almost 40KB too.

Git is Magical:

We are using git for version control. The subheading sums it up.

I think that's it. I'll be showing a video of all the recent changes whenever the new collision system is working.

No comments:

Post a Comment