Home | Rules and Guide | Sign In/Create Account | Write a Post | Donate | #ludumdare on irc.afternet.org (Info)

Ludum Dare 24 — Coming August 2012

Ludum Dare 23 — April 20th-23rd, 2012 — 10 Year Anniversary
[ Results: Top 50 Compo, Jam | Top 25 Categories | View My Entry ]
[ View All 1402 Games (Compo Only, Jam Only) | Warmup ]


Math is harder than the Tank!

Posted by
February 28th, 2010 3:32 pm

Well,…actually I tried to build a nice game with the codebase I created on miniLD. Well,…haha! I started with a tank-training scenario and in that I “just” wanted to build a method that let then tank-”tube” lookAt a certain point. My engine somehow cannot handle this if the tube is child of a node that already has a rotation,…Well,..I failed in this. So I really was killed by math. I tried and thought and thought and tried…a bit too confuse I have to admit…so my weekend-project stuck right at the beginning. But if you want to start the tank-training you can give it a try here:

http://thomas.trocha.com/games/tank/tank.html

At the moment the game violates the color-constraint…I will change this at the end. Here a screenshot:

tank

Have a nice week,…

One Response to “Math is harder than the Tank!”

  1. 31eee384 says:

    I’m probably not qualified to say this, but this idea might let you call “lookAt” without mathematical fuss. What if you made a tank position node (that never is rotated), then have both the tank body and tank turret be individual nodes within that one? Then you could call lookAt on the turret node, because the parent node isn’t rotated! I don’t know which engine/library you’re using but from the text of this post I thought I might be able to put forward this idea if you hadn’t already thought of it.

    I definitely can testify to the difficulty of rotation math. I tried interpolating between two 3d angles once, and it took be forever to figure out how to make it work–and even then I was doing it in a horribly inefficient manner.

Leave a Reply

You must be logged in to post a comment.


All posts, images, and comments are owned by their creators.

[fcache: storing page]