Well this weekend was a bit of a coding fest... but I don't have anything to show for it. How depressing.
The goal was to get object picking working so I could select objects in the editor. What actually happend was I wrote (and rewrote) a hierarchical collision library and removed a lot of DirectX dependencies. On the brighter side the creation routines all seem to work so I must have achieved something.
The implementation so far is: take the graphical mesh and copy all its triangles into a shape object. Then place spheres around each triangle (or triangles if adjacent triangles are contained also). Then take clusters of about 4 spheres and place them inside another sphere and so on, until the final cluster is placed in only one sphere.
The outcome of this is a quickly traversable tree of spheres with the triangles as leaf nodes. Yay! (all the intersection routines are written aswell).
Quite a lot still remains to be done though. Notably my mesh object and shape object share a lot of information and have similar levels of complexity which probably implies they should be collapsed into a single object (not a rewrite I'm looking forward too).
All the hierachy information is in an intermediate format and still needs to be converted into something that can be used at runtime. This is almost done bar cleanup.
And lastly I have a few naming issues I need to work out (eg: the runtime shapes names all end in 'trans' which is a bit crappy).
So much to be done :(
In other news: I finally gave up on my monitor as it is no longer usable (it took to switching between input A and B about every 10 seconds). I'm taking it to be fixed - again - on Monday morning. Stupid Philips crap.
And truly lastly this time: I've decided to write the gameplay in Ruby (http://www.ruby-lang.org/en/) because it needs so little management compared to C++ or java and plugs into C++ fairly easily.
Later!
The goal was to get object picking working so I could select objects in the editor. What actually happend was I wrote (and rewrote) a hierarchical collision library and removed a lot of DirectX dependencies. On the brighter side the creation routines all seem to work so I must have achieved something.
The implementation so far is: take the graphical mesh and copy all its triangles into a shape object. Then place spheres around each triangle (or triangles if adjacent triangles are contained also). Then take clusters of about 4 spheres and place them inside another sphere and so on, until the final cluster is placed in only one sphere.
The outcome of this is a quickly traversable tree of spheres with the triangles as leaf nodes. Yay! (all the intersection routines are written aswell).
Quite a lot still remains to be done though. Notably my mesh object and shape object share a lot of information and have similar levels of complexity which probably implies they should be collapsed into a single object (not a rewrite I'm looking forward too).
All the hierachy information is in an intermediate format and still needs to be converted into something that can be used at runtime. This is almost done bar cleanup.
And lastly I have a few naming issues I need to work out (eg: the runtime shapes names all end in 'trans' which is a bit crappy).
So much to be done :(
In other news: I finally gave up on my monitor as it is no longer usable (it took to switching between input A and B about every 10 seconds). I'm taking it to be fixed - again - on Monday morning. Stupid Philips crap.
And truly lastly this time: I've decided to write the gameplay in Ruby (http://www.ruby-lang.org/en/) because it needs so little management compared to C++ or java and plugs into C++ fairly easily.
Later!
2 Comments:
Congrats, nice to hear you still going :)
!!Refactoring!!... gotta love it ... well not really, but you know what I mean ;)
As for the hierarchical sphere tree, I prefer hierarchical bounding box stuff for collision triangles.
Interesting idea to do things in Ruby... have you used it before? Can you get a C/C++ run-time to link it to your C++ engine or are you going to call your engine functions from within Ruby?
By Justin Paver, at 10:07 am
Ya, I haven't tried spheres before (or even read around it) but I just have this gut feeling that it should be faster than bounding boxes. If everthing goes pair shaped I can swap out the spheres for bounding boxes though.
Ruby is pretty cool, I haven't used it much but it is quicker to just do stuff in.
I've linked the Ruby runtime into my C++ engine but Ruby is very cool in that one can basically call things either way. Yay!
By Andrew, at 12:17 pm
Post a Comment
<< Home