A blog detailing the creation of my FPS engine.

Monday, May 31, 2010

Manipulators, Scripting and Picking.

So tonight I begin working on my gizmo code. I recently found a lost thumb drive that had an old version that I had been working on. Should be nice to use to plug in some of that code into the new version. I will be using and modifying the code from Mindshifter to include the ability to manipulate all objects when in edit mode. Also since the new version of SunBurn should be coming soon I would like to make my editor work only when SunBurn's editor is active. So when you go to edit mode SunBurn's editor pops up and you can manipulate objects. Currently Mindshifter's version uses a pick buffer to choose objects. This requires re-rendering the entire scene using key colors and then testing against the mouse position to see which object is chosen. I think I am going to change this to use ray testing to find the object instead.

Normally, the game will start into editor mode while in development. Then you can switch to play mode with the console when your ready. When in edit mode the physics are frozen and all objects are static, except non-physically animated stuff like models with scripted animation.

I just saw Blit Scripting Engine on Codeplex and it looks very close to what I am wanting to do with my game engine. It is a little to general for my taste, but I would like to have the ability to attach scripts to actors and have the script automatically run every frame. I also want to allow real-time scripting modifications. This could be accomplished by allowing the user to choose to modify the actors script through the console or context menu and that would open the script in a small built in Windows Forms editor. Then when you close the window the script would rebuild and let you view your changes instantly. Right now this is only a goal not a necessity, however scripting is a necessity.

I also need to implement an IPickable interface or something like that to allow for object picking. It won't need to be performance based, but shouldn't cause the editor to slow to a crawl. Once again the whole reason for using interfaces so much is so when version 2 of the editor is in the works I can simply take the code that was good from version 1 and just reuse it. Also that way anyone can take any part of my code and reuse it in there own program.

No comments:

Followers

Blog Archive

About Me

Cortland, Ohio, United States
I'm a self taught game programmer currently serving in the Ohio National Guard and working a full time job at the Unit Training and Equipment Site. I spend all day repairing M1 tanks and other military vehicles. My life long goal is to one day become a professional game programmer/designer.