Visit Our Project Home Page

Posts Tagged ‘development diary’

I will not rest until the Julios tag becomes our most prominent

Friday, April 25th, 2008

I’ve implemented the pseudo-drag and quasi-drop mentioned in my last update, and as an added bonus, compensated for parental rotation when moving objects (Julio’s Bounty 1.) Until I can figure out how Quaternions work, it’s implemented manually by taking the parent’s rotation around the y-axis and rotating the delta-translation of the child by the opposite of that amount. (Maybe Quaternion.inverse() will have the same effect?)

The ClickManagers probably need a little refactoring. I’ll see about that this weekend.

House of Mouse

Thursday, April 24th, 2008

After much frustration, I’ve finally fixed the bug with the cursor color not being updated. (Actually reading the update method helped a great deal.) Reintroducing myself to ClickManager has made me wonder if we’re approaching the translation of Wickets in the right way. We refer to our current system as “drag and drop,” but the fact that the Wicket does not remain under the cursor as long as the mouse button is held down means that we have more of a “cattle prod” interface: if it’s not doing what you want, just poke it in the direction you want it to go. Implementing a true drag and drop is well beyond my knowledge of linear algebra, but I think we could alter our current system to achieve an effect similar to a true drag and drop.

(more…)

Development Diary: Collision Detection

Sunday, April 13th, 2008

We’ve been pushing off most of the “play mode” game logic for a very long time, so I’m not entirely sure I believe myself when I say we’ve put in a class called PhysicsSystem.

Our current plan for physics calls for collision detection to be handled server-side. To do this, we need n things:

1) A way for the PhysicsSystem to keep track of all the player avatars in the game, as well as all the non-player things into which players can crash. Currently, PhysicsSystem has a field that stores a NetworkBetterServer, enabling us to look at a sceneNode. Should knowledge of a sceneNode ever be refactored out of NetworkBetterServer, we will need to change this. We also need some way to put player avatars into some collection when players log on. Can we use a connection listener for this, or will the avatar have been created yet when the connection listener fires?

2) A separate thread for the PhysicsSystem.

3) Actual game logic to make the PhysicsSystem, well, do stuff. Some JME commenters have laid out examples for a simple collision detection system using bounding boxes. To run server-side, such a system would have to check each player against every other Node in the scene. (I’m assuming, based on this example, that checking collision with a given Spatial will check for collision with its children as well.) A heuristic for checking only “close” Spatials will be helpful, especially if we intend to use TriangleCollisionTests instead of bounding boxes (and delve into the magical world of vector algebra.)