yurinicolau Wrote:;) Done! Now all the new hands easily fit Peach standard's forearm...
Notice that these new hands can replace the "Hand grab" that is currently used at the game (I changed the position and size of the hands in the library to be similar as the "Hand grab", so if you replace "hand grab" for one of these two it probably won't brake the sex scenes frames...
Really nice! And we are going to have peach nails in the hands also. I'm already putting that in the TODO list.
humbird0 Wrote:Okay, I rearranged the example to use a much easier-to-understand finite-state-machine, based on the timeline instead of complicated-looking objects.
This does exactly the same things, but it's much easier to understand.
Thanks! I'm impressed with myself, I understood both
I just have some comments to do:
Taking a look at MIM code I think its better to program like the first approach (pose timeline), because Peach right now has more than 10 different poses/states. For sure it can be programmed like in second approach but I fear player timeline being cluttered in a way I have to scroll right to see more states. However, the first code is really easier to check, fix bugs and add new poses. In the case of Peach, the second approach will require me to just transfer the inline pose (for each peach animation) to the player timeline itself, as peach is a movie clip with the given pose animation.
The first approach (first example code, with all code in the same frame) is interesting because, when Peach has 10 different states, all of them will be there, in the same frame, but the first action code will dictate where it will be running once (onEnterFrame with the 'last' tecnique, using var). However I have a question:
Are those inline functions reinstantiating themselves on every frame loop?
You know, 'start:function()'. If not in the first example code (due to the fact the player has only one frame), the second example code may be recreating those functions on every state.
BTW, your code uses inline functions! Those "examples=function() { asdjasidjasodjasiod} ," thing
However, it does not have inline functions 'INSIDE' inline functions (which is possible). I didnt know about null:null making the inline functions work with ',' instead of ';'. Its a convenience to make them more readable, like reading a phrase?
Its impressive the way you handle objects in order NOT TO STRETCH them. For example, pipe top/cap. I think its something to do with GRID. But if the pipe top uses two or three grids (2 to 3x larger), they will not be stretched as well? The pipe body gets stretched in the vertical and I didnt find the magic clearly during Flash EDITING (not playing).
Lastly, the problem with jigging (up and down) because of gravity. Is this the problem of not using 'applyMovement' separatelly? Because, in default programming, people do like that:
- Code: Select All Code
//Gravity
_y += char.grav;
if (char.grav<26) char.grav += char.gravity; //26 because I don't want Peach to fall long distances in a way she can traverse blocks and go to oblivion. All Right, all right, it can be optimized.
//Anti gravity (when she touches ground)
while (_root.ground.hitTest(_x, _y, true))
{
//char.grav = 0;
_y -= char.gravity/10; //division lessen bouncing up/down problem
char.grav = 0;
}
I simply dont understand why she bounces up and down, even being stopped in a given ground, if those two variables nulify each other (with or without the '/10' in gravity). Maybe because, as they're separate (I have small code between the two, regarding climbing), the game loop doest have time to do them at once, then do in the next game frame?
Thanks, HumBird