Tuesday, January 7, 2014

Journey Towards Semester Two

Our journey in second semester of Game Development begins with finding out that three of our five group members have elected to leave the course and not continue forward with the Game Development program. As most would assume this is a very bad situation for those of us left in the program, as there are currently only two of us left. Head over to braydenmyers.blogspot.ca to check out his posts. I figured as we are the only ones left in our group you out there should have a full view of the progress on our game as seen through the eyes of the only two surviving members of the first semester!

Moving forward from the depressing reality of our current group situation, our game "Journey To Posidonia". I wouldn't say we are behind, I much prefer the term "set back", due to the fact that only two of our five group members ever did any work on our game. Having problems with Catmull-Rom interpolation, for some reason I am getting high values in the millions, when the current size of our map is literally 0 - 10000, I feel like there are brackets missing in certain spots in our calculation, however I have yet to figure out exactly what the problem is. I have used external resources, I have even copy/pasted code from stackoverflow.com into our code for the sake of testing purposes (note, I never copy the code and keep it in there, simply for testing purposes). Any-who that still doesn't work to get the problem solved, so I have resorted to completely re-work my calculations in my path.cpp to attempt to find the problem, which I believe again to be a surplus or lack thereof of Brackets in the formula.

If anyone is interested here is a link to the stackoverflow post I was using. --> StackOverflow

Oh and if you are really interested here is the link to Wikipedia where you can see the actual formula and read up on how it works, but I am going to explain it in just a few seconds here so if you feel like listening to me more then that is great! 

So basically splines are curves, mostly they are used for path finding, and AI path following. However they have multiple uses, for example, the Bezier spline is most commonly found in Photoshop in the "pen tool" (great tutorial if anyone is interested.) Catmull-Rom however relies on Four points: The two Points you are interpolating between (Usually called interpolation points), and the points preceding and following your interpolation points.

At great graphical representation of Catmull-Rom is included below: Source Link

So given those four points, you interpolate along a specific segment (between P1 and P2) over an interpolation value  most commonly denoted as: t (0 , 1)

In our game we are planning to use this technique to move our AI characters from point to point towards the player, this will allow them to move smoothly and not in a rigid line formation (kind of how everyone tells you Alligators run if you can imagine that and keep a straight face that is). We feel like this is the best way to do this, now there is the possibility of using acceleration, however that would leave our AI characters sliding at times, which is not the desirable result we are looking for. 

So that is a basic explanation of Catmull-Rom, again if you would like more information, I do urge you to check our the wiki article that I posted above, it is very technical but includes most if not all the information that you should need to know before attempting Catmull-Rom, or even if you want to simply check out how it works!

I will keep everyone updated on our progress, and if anyone is interested in seeing the code I am using to attempt to make Catmull-Rom interpolation work, I would be more than happy to post it for those of you who would like to see it! However for now I will simply leave it at that, post a comment if you would like to take a gander.


With that I leave you with a last small piece of advice, to all those aspiring game developers out there!
- If you want something work for it, because there is no one or nothing that can stop you from getting what you want, if you truly want it.

Thanks for reading!
Regards,
Stephen.



No comments:

Post a Comment