So the BSP loader works and does all it needs to do. Now my raytracing needs to be fixed. I got into a loop for about 4 days of trying to tweak the same block of code and simply never taking enough time to develop a proper algorhitm on paper. This tweak addiction just leads to many horrid results. I finally rewrote my todo list to have a note at the top saying that I wasn't allowed to try fixing raycasting again until at least 2 days. The time off will help A. calm me down and B. give me a fresh perspective on the problem. I've resolved to not attempt coding until a proper algorthim can be developed (at least one that is aware of as many potential problems possible).

Unfortunatly, I've found that the Solid-Leaf BSP does not work well with oriented bounding volumes. From the earlier tests, I've found my OBBs can't go around corners properly until push far enough past. I may be able to resolve this when I approach the raytracing problem on Friday. At this point, I think I will need to find a way to build a spatial partioning structure that will sort my static geometry without breaking it down to segments. That way I can keep using the SAT tests with chunks of geometry. This will probably be a OBB tree of some kind that will keep encapsulating my static geometry. Anyhoos, more on this friday! For now....finals!

The real deal with BSP McNeal

Allright folks....I must admit that how I was doing the BSP was rather stupid. I went back and hit my favorite book of books on game collision : Real-Time Collision Detection. A little reviewing and studying and I went back and recoded my method. This time I adjusted how I was building my Solid-Leaf (which I call Solid Node cause I'm cool like that) and then went on to build a Leaf-Storing bsp. The Leaf-Storing did not solve my problem (in fact it just created more) but I did have some revelations.

My intention with the Solid Node bsp was to create a arbitrary shape that represented the world and then use the BSP to keep objects inside. This resulted in an immense amount of failure. After recoding my BSP technique (and learning of the awesomeness that is Thick Planes) I realized that it is better to create several shapes (with associating bsp trees) that when placed together form the world geometry. So don't keep things "in" a shape...just make several shapes to keep from getting to the void. This worked much better and allowed for me to reimplement my bevel planes with great success. While its not 100% accurate, it is fairly quick and allows me to create concave ground geometry for the objects to move around. Right now the collision data is relatively simple but I need to mod it to add contact pts, etc for linear and rotational dynamics. This shouldn't be to hard since all the methods to find such have already been created (although I do need to go back and clean them up a bit after making some silly ass modifications).

So..that was a mouthful. By the by, for those paying attention, the answer is YES. I have started to turn this blog from emo crip crap to more of a log of what I am working on and how boring it is to everyone else. :).

So I am going to put the bsp down for a bit. The realization that occured about an hour ago has made me much more relaxed and I am simply smiling about the possiblities. So whats next? Well my Software Architecture teacher has asked me to attempt an extra credit project for his class. I was touched (there I go being emo again :)) that he personally asked me to do it simply cause he wanted to see what I could do. I think this stems from the constant string of questions I bring up to him. While I get friendly brown-nosing (lol...think about that) comments from my friends about talking to teachers too much, what I'm really doing is taking advantage of the best asset in this school : the faculty. Many students rely solely on what the teacher says during class. While I think its valid to critique teachers based on their in-front-of-the-class performance, I ultimately judge the teachers here based on what I experience with them one on one. If they are willing to help and share their advice, I'm more then pleased with em. Most of the skills I've picked up here stem from just slamming questions to the teacher during labs and getting extra proffesional advice on what I'm trying to do.

So I'm gonna look up a pattern called Builder to help solve a potential problem I may have with creating objects with multiple types at runtime. If it works or doesn't, it will be another grand reasearch endeavor that will strengthen my skills.

Upwards and onwards!

I may just cry

I just got my first iteration of a 2d solid node bsp working! It does work too well to keep objects (except points) outside but works beautifully to keep them inside! So far I've been taking it through its practices and got my first real floating point math error! Very proud to enter this age of computer number storing problems and work out solutions for them!

So with the Solid-node bsp to represent the world done (well so far I have to build it at run-time and none of it is externally loaded(very bad)...I am going to have to work on that part later) its time work on the object sorting bsp. At least I get the basics of BSP trees now.

That also brings up another point, after going through a bit with my software architecture code I'ev resulted that this code is more or less a prototype. Since this is my first stab at a big small game, some of the code smacks of first attempt. Most of my code is meant more to be a series of notes on how to implement what I did again in new code.

As Ryan Pedela taught me, code is not sacred..and what I added "But the knowledge of what you did and how you did it is!"

Oh btw, Shrek 3 was very funny. Much better "3" then Spider-man 3.

R&D to the rescue

Around my sophmore year of college at Purdue, a series of events and choices started me on to programming. While it was very early on and was primarly different forms of scripting, I got into it very quickly. I would spend too many countless hours researching ceaslessly researching and diving into as many tutorials as I could find. As the years went by, I went from scripting to what you could call "real programming languages." At the end of school, I realized I wanted to be a programmer for games and made the decision to go to Full Sail. Since I got here, I've spent almost all my time outside of class doing more research and looking up various topics. I started a side project (which I am trying to get a demo done but being slowed down by classes) to focus my efforts and have come across all kinds of things in my endevors.

Up until now, most of my r&d has been somewhat useful in class but I found that I could not bring much of the advanced stuff to my class work (teachers asked to keep the code simple) but last night was a good time in a Software Architecture. In one lab, a ton of the research I have been doing paid off. It is truly a kickass feeling.


Man was I wrong to think I was done with collision :).

I've been doing a lot of research and taking notes on how BSP trees work for collision detection. Right now I've boiled it down to 2 types I'm interested in: Solid-Node (for concave shapes) and a tree that simply stores objects in the leaves. I'm not 100% solid on how the second kind sorts (lots of cases where a good partitioning plane has to be chosen) but I've got a good idea on how Solid-Node trees can be built. I'm gonna try this evening to start busting out the solid one and then with that exp, move on to the object-sorting one (for static objects). I was going to have a demo up where you could thrown some things around (I have one with boxes but I wanted Zombies :)). I'll try to have that up once I can get the world collision working (that is the solid-node tree). This may ultimately lead into quad trees but for now, I'll just work on basic static geometry partitioning with simple bsps.

On other notes, I've been playing a lot of Titan Quest : Immortal Throne recently. I picked up the expansion and have been enjoying it throughly. The new interface features make the game much easier to play and I've been trying a bit of Fire and Dream magic which works quite well (although I need to build up some "nuke" spells).

Classes are going okay. Software Architecture is a very neat course and is providing plenty of challenges, while DirectX is a slam-you-in-the-face course on syntax.

BTW, check out this reel at Animation Mentor. If Laura isn't working with the best, I don't know where the best are.

Z for Zombie

I can't reccomend Max Brook's World War Z enough. It is the best book on zombies ever.

And thats a wrap!

For roughly 6 months, I've been working on a 2D collision library. I arranged this project as my "continious side project" during school that I would keep working on as classes went by and my skills increased. It proved to be a great place to apply new techniques and perform my favorite task that is r&d. The library itself has gone through so many changes. First it was based on the most complex forms and included several small functions that came and went like children in an orphanage. I've finally widdled it down into a form that I am happy to say is fairly complete. Tweaks and changes will come (the golden rule of coding that I've gleamed from pros is that its never set in stone). So far it can support AABB, OBB, Circles, and Convex Hulls with point/plane/ray intersect tests as well as collision amongst those types. I've been developing some lite-weight physics code to go along with the system and I'm going to be putting together a demo that I actually want to put online shortly (aiming for Monday).

This of course is just the beggining. Now that the core is a little more solid, I can start working on some spatial partioning for things like world geometry. This will be a bit involved but is entirely build upon the library. Eventually a hiearachial partioning structure will be needed to help divide where objects are located to minimize tests.

I am very excited. Once the ground system is in, I'm going to put the partioning on the burner and work on a simple prototype showing off 2d navigation and implement a lot of the collision tests I've constructed. Hopefully this will be the demo I want by monday.

School Date #...ummm....

I just realized I have not really posted anything about school and now would actually be a good time to do so!

I just finished my six month of classes here at Full Sail. Classes were Windows Programming 2 and 3D content creation. WP2 was a fun class. We did a lot of c# which I have some background in and found it to be relatively simple. The biggest benfit was talking to our teacher Chuck who was wealth of information and was always willing to look up something if he didn't know the answer. 3D content creation is pretty much a short crash course in what Artists do for games. We learned a bit about rendering pipelines and several different terms. Not an increadible class but I can see where some of its uses come in.

Our project for 3DCC was to create a map in UnrealEd. This proved to be a little more fun then I thought. Instead of making a pretty map, I spent my time working with UnrealScript to create to create a simple train that had two switches that toggle it backwards and forwards on its tracks. The idea behinds its use was that in a CTF game, players would need the train to carry the flag bearer back to their base so this created fights being around getting ahold of the train. The train came out pretty decent and I was able to even get a speed table in there so it knew how fast it was supposed to go on a certain interval of the train. UnrealScript presented a decent challenge of reading through tons of documentation. While I am by no means a master, it was fun to actaully do some real game scripting. Hopefully I can get my 2d game into a good state to start adding some gameplay to it. But first off....getting that collision/physics demo I wanted!

Hellgate, Dumbledore, and Smart Ptrs

Hellgate: London is shaping up to become my new favorite game of all time. I sometimes turn through lots of games trying in vain to look for "my game." I think all gamers ( I really hate that term) have a style of game or rather a collection of gameplay elements that they cherish and probably without thinking about, look for in every game they play. When a game has all those elements...well you might just see the gamer cry. Hellgate has all my favorite elements in it: action, stats, lvlin, item collection, and intense amount of cusomizability. On top of that, it has immense amount of character in its setting and crosses both sci-fi and fantasy at the same time. This game will kick more ass then ass-kicking-ologists have been able to discover.

Now onto my next topic: Dumbledore. I recently watched the new Harry Potter and the Order of the Pheonix Trailer and my brain started stirring upon one of the major flaws with the movie: the dude who plays Dumbledore. I immediately ran to rant to Laura who (sweetheart as she is) attempts to listen to me. After the fourth movie, I was really put off by how the actor chose to portray Dumbledore. The scene in particular that ended it for me was after Harry's name is drawn from the cup. When he goes to the room in the back of the Hall, Dumbledore runs up to him and shakes him demanding to know whether he cheated some how. For a fan of the books, this is an action that Dumbledore would have never done. Even in the Fifth book he threatens someone who even attempts to manhandle a student. While this seems like being picky, it was a huge turnoff towards the actors portrayal. With the rest of the movie, he became less friendly and more of an age-old crotchety wizard who would be more fit in Willow then Harry Potter. In an interview, he remarked that he had not read the books and he probably wouldn't. Damn.

So Smart Pointers. Well I'm not really implementing super pro smart pointers but I did just introduce a pseudo memory management system in my collision/ physics code that allows them to share ptrs to geometry and should enforce there to be no hanging pointers. I am excited to get back to the engine and get my first demo of it up and on my website. Right now the demo is shaping up to be several boxes and odd convex shapes falling and bouncing off each other in a room (in 2d).

How Awesome is your Totally Awesome Game?

Check out this interview with Bill Roper by Garnet Lee