[Magicor-devel] about some new classes and code changes
Status: Beta
Brought to you by:
petgeb
From: Claudio <cla...@ya...> - 2007-03-05 23:38:54
|
Question: must I create a new branch ? Im working in new classes for lava lumps, flying stones, etc. World colision is done, movement is done, stone to sprite colision is advanced, but needs changes to old PhysicsSprite class, and the derived classes. The changes are minor, but not localized. To be specific, I need that PhysicsSprite support members .direction ( list, direction[0]=sign(velocity in x) , direction[1]=sign(velocity in y) .fasteness ( aprox the module of velocity ) The current code doenst have a member .direction at PhysicsSprite class but some derived classes yes, and it isnt an homogeneous use: Player : .direction is a scalar ; seems that 1=heading right, -1 heading left Enemies : .direction is a string meaning heading tubes : .direction is a string meaning what side is open to travel .fasteness doenst exist in any of the old classes, the meaning is harcoded ( like self.x +=3 ) The replacement of the old code could be easy: .direction in player maps directly to the new .direction[0] For the other clases, a string table maping from the new direction to the old direction will be strightfoward At last, the situation is: .each change needed is small .the old code will look similar to the current code .but there are a bunch of locations in wich change the code. The conservative way would be to branch, leaving trunk proven and free to accept small changes. So, Peter, do you mind if I do a branch ? Any comments ? --------------------------------- Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). Probalo ya! |