View previous topic :: View next topic |
Author |
Message |
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Sat Dec 24, 2005 12:41 am Post subject: ARC, collision detection, lgpl, DDoc, and new FontMap loader |
|
|
ARC
First I've been musing that I need a solid 2D OpenGL game library if I'm ever going to efficiently code warbots. Second, I thought I'd give it a name other than 'core,' as core is so generic there are sure to be name conflicts in the future. I've decided to name it the Arc, short for 2D Game Arcade library. As I've been rebuilding 'core' into arc, I've just been documenting what I've used so far.
Also, I've realized it is annoying developing something without some proof of concept games to make sure it works. Therefore, sooner or later before warbots is released, I'll release a bunch of small proof of concept games to test the portability of my code from game to game.
Static Collision Detection is done
In the past few days I've had off I've managed to finish coding all the different styles of collision detection and put them into an easily useable framework. First off I have three styles, per-pixel, box, and radius based collisions. There are six combinations of collision detection.
Pixel --> Pixel
Pixel --> Box
Pixel --> Radius
Box --> Box
Box --> Radius
Radius -- > Radius
From these you can now collide any frame with any other frame, irrespective of their collision style.
LGPL
While most of my code is under the zlib/png license, there are 2 pieces of code grabbed from SDL_gfx that I use that are under the LGPL lisence. This includes SDL rotozoom, which I use to pre-rotate per-pixel surfaces, from which I can create a collision map, and the drawCircle function in CollisionMap which allows me to create a collision map of a circle based on a radius.
If anyone knows of any SDL rotozoom or circle drawing code that is under a more BSD style license let me know. LGPL is no problem as long as you arn't creating a commercial app. I know about loading at runtime, but that won't work for my drawCircle function anyway.
DDoc
http://svn.dsource.org/projects/warbots/web/arc/index.html
I love DDoc, it has been a nice way to create documentation for someone who doesn't have all day to play around with html. It is quick and dirty, but for the most part complete. It will grow quite a bit more, as I'm only documenting code as I'm re-using it.
new FontMap loader
I forgot to add, under arc.gfx.util, I added a new function called mapCoords. It will read a image file which has set up cells (vertical + horoz lines surrounding each animation frame to space them off), and then return a big array of the coordinates of the cells. See what I commented out in arc.gfx.gui.fontmap to get a better understanding of what I'm trying to say |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|