Geomtric calculations

12 views
Skip to first unread message

Andrey Levushkin

unread,
Dec 14, 2012, 12:28:36 PM12/14/12
to lambd...@googlegroups.com
Hi everyone,  I've started working on the arena engine that will update the bot state based on the commands the bots issue. It's all based on the work Tim has done. This will involve a lot of 2D geometry calculations. These are pretty simple like rotating vectors and finding bounding box intersections but i figured we could pull in an external library to do this stuff rather then roll our own. I was thinking of using the AC-vector  package. It's pretty minimal and does everything we need. The main change is going to be updating the Point and Velocity types to be Vector2 rather then (Double, Double).  Are there any objections to this or does anyone know of a better 2D geometry library?

Andrey

Tim Williams

unread,
Dec 14, 2012, 3:40:08 PM12/14/12
to lambd...@googlegroups.com
Hi Andrey,

That's great news. I've added the beginnings of a stepWorld and a stepBotState functions - see the test case for an example. stepBotState is a case analysis on the Command type which updates the BotState appropriately and so should be a good place for you to hook your physics routines into. These functions are just a start and will have to reworked to support bot collisions etc, whereby we will have to treat the bot states collectively. AC-vector looks small and all we need, a good find. For the physics, I would suggest using the velocity verlet algorithm for ease of implementation - please excuse the suggestion if you have studied physics!

Good luck!
Tim
Reply all
Reply to author
Forward
0 new messages