Hentai: Peach's Untold Tale 3.48 (Nov 2/18) - HIATUS

The place to post Flash-based creative projects.
Forum rules
This forum is for posting and collaborating upon third party Flash work. Please do not post request-threads, and avoid posting artwork that is not your own unless it is being used as a reference.

Re: MiM 'Mim Ae version' (XXX) 1.5e

Postby humbird0 » Thu Sep 13, 2012 1:43 am

ivanaedler Wrote:And hmmm... I can reference Key.IsDown directly, letting my code easier to read, creating global variables (no problem using global for them), as buttonMast, buttonJump, buttonLeft... NO I CAN'T. Referencing key.isDown to a given variable DONT make that variable like key.isDown.

I forgot to mention, you can only reference objects and movieClips, but you can't reference basic variables that are numbers, text, or booleans, their values just get copied.

Anyway, I threw together an example for you, but I don't know if it'll be helpful or just confuse you.
I kinda got carried away and included a finite state machine too.
But at least all of the code is heavily commented, explaining everything.
The collision checking code for the masturbation is located inside the player, within the "walk" state, within the "detectMast" function.

Click to Play
(Javascript Required)

pipe_collision_tutorial.swf [ 2.04 KiB | Viewed 3472 times ]


pipe_collision_tutorial.fla
Source file example of detecting hitBoxes... along with inertia-based movement, a finite state machine, and 9-slice scaling for the pipes.
(56.5 KiB) Downloaded 20 times
Image
The last version of Pokemon Hentai Version is: January 31, 2015
Every Pokemorph created for the game
Every cutscene picture in the game
Reference material gallery (characters, poses, outfits, expressions, personalities)
User avatar
humbird0
 
Joined: Wed Feb 01, 2012 10:54 pm

Re: MiM 'Mim Ae version' (XXX) 1.5e

Postby Ivan-Aedler » Thu Sep 13, 2012 2:39 am

humbird0 Wrote:Anyway, I threw together an example for you, but I don't know if it'll be helpful or just confuse you.
I kinda got carried away and included a finite state machine too. But at least all of the code is heavily commented, explaining everything.
The collision checking code for the masturbation is located inside the player, within the "walk" state, within the "detectMast" function.

Thanks, great man! The demo is clean and very nice to play it! An eye candy for the eyes! I will be finishing the World Map and then I will be analysing that! Pipe code using buttonMast will be done soon, but I don't promise about state machines. It will be done (I will let my brain melt at 200°F to do that, no matter the human-hour programming) but I need total dedication for that (no paralel todo lists, like new enemies). :roll:

Once the state machine is done (Turing!), I will try to remake the collision, using your MIM Humbird version, with rect and loc1 loc2 loc3 system. Unfortunatelly, its not copy-paste (hey, I dislike that anyway), so I will like to be struggling on that ;) All for the science (and XXX)!
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Major update at the new hands and a request...

Postby yurinicolau » Thu Sep 13, 2012 5:27 am

Hey Ivana, I thought the new hands were ready to use, but when I tried to put them with Peach's standard arms (for the pictures I'm making) they wasn't fiting properly, so I'm doing the necessary fixing so you'll be able to use them at the sex scenes... I'll be posting here the new updated file with the corrections in a few hours tops... ;)

I also have a request for the pictures... I'm in a lack of enemies to do Peach's dirty pictures... So if you could send me a Goompa and Mario (maybe Luigi too?) would be great!! :mrgreen: So I would have an actually partner for Peach besides that cock and balls I have... :( At some pictures I have no way of hiding the partner's body, here for example:
Spoiler (click to show/hide):

Footjob bath.jpg
Mario or Luigi would be great here! :D
Footjob bath.jpg (63.4 KiB) Viewed 3424 times

Oh! And I saw Peach's eyes you added at my first pictures (the one without backrounds), they are AWESOME! If you don't mind sending me them too I'd really appreciate it and be able to do even better pictures! :mrgreen:
User avatar
yurinicolau
 
Joined: Fri Apr 06, 2012 6:19 pm

Re: Major update at the new hands and a request...

Postby Ivan-Aedler » Thu Sep 13, 2012 5:42 am

yurinicolau Wrote:Hey Ivana, I thought the new hands were ready to use, but when I tried to put them with Peach's standard arms (for the pictures I'm making) they wasn't fiting properly, so I'm doing the necessary fixing so you'll be able to use them at the sex scenes... I'll be posting here the new updated file with the corrections in a few hours tops... ;)

Hey no problem, just take easy around there!

yurinicolau Wrote:I also have a request for the pictures... I'm in a lack of enemies to do Peach's dirty pictures... So if you could send me a Goompa and Mario (maybe Luigi too?)

I will send some enemies, Mario, Luigi (WEEGEE! :D) and all the eyes inside the same FLA!
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: MiM 'Mim Ae version' (XXX) 1.5e

Postby Biles » Thu Sep 13, 2012 5:55 am

I think you may want to change the graphics for the airship level. Personally I believe it would make sense to have a Mushroom castle with a mini icon of the airship hovering above it as it'll make much more sense IMO.
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby Ivan-Aedler » Thu Sep 13, 2012 6:10 am

Update 1.5g
1) NEW: World Map with effects! Now you can even repeat the same level if you want! To access it, you have to finish the first level, because Peach starts the game inside her castle.
2) NEW: Peach Frontside by LuftMallow (Breasts may be not ideal. I will fix during the next updates). You can see her in the World Map and in tanooki suit, statue mode.
3) NEW: 'Shower Checkpoint'! Art by me. But not working yet. Its just a normal checkpoint. Soon Peach will take a bath there to remove her...juices. Its in Level 1.
4) NEW: FPS Benchmark mode. Go to the OPTIONS MENU.
5) New Mario sounds (SMB1, 2 and 3 endings) and better Pause sound. Also, the background music will be quieter during Pause

Biles Wrote:I think you may want to change the graphics for the airship level. Personally I believe it would make sense to have a Mushroom castle with a mini icon of the airship hovering above it as it'll make much more sense IMO.

Could someone make that Mushroom castle? I'm out of ideas :/ The hovering airship is easy to do
Last edited by Ivan-Aedler on Thu Sep 13, 2012 2:12 pm, edited 1 time in total.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

New hands for Peach updated!!!

Postby yurinicolau » Thu Sep 13, 2012 7:51 am

;) 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... Also made an explanation of how the two parts of each hand work:
New hands explanation.jpg
You don't need to use the secondary parts, but if you do so, you'll need to add a different layer at each the animation they appear... ;D
New hands explanation.jpg (57.15 KiB) Viewed 3392 times

Here's the updated FLA file:
Spoiler (click to show/hide):

New hands for Peach.fla
-Now all colors matches Peach (skin, shadow and outlines)
-Made the outlines thicker, so now they are visible at a more distant zoom (almost as thick as Peach's standard arms)
(157.71 KiB) Downloaded 24 times

ivanaedler Wrote:I will send some enemies, Mario, Luigi (WEEGEE! :D) and all the eyes inside the same FLA!

Thank you man!! Now I have plenty of material for the pictures!!! :mrgreen:
Last edited by yurinicolau on Thu Sep 13, 2012 2:45 pm, edited 1 time in total.
User avatar
yurinicolau
 
Joined: Fri Apr 06, 2012 6:19 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby humbird0 » Thu Sep 13, 2012 9:53 am

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.

Click to Play
(Javascript Required)

pipe_collision_tutorial.swf [ 1.9 KiB | Viewed 3368 times ]


pipe_collision_tutorial.fla
Fla source demonstrating the pipe collision technique, along with inertial movement, and a simpler finite-state-machine
(112 KiB) Downloaded 12 times
Image
The last version of Pokemon Hentai Version is: January 31, 2015
Every Pokemorph created for the game
Every cutscene picture in the game
Reference material gallery (characters, poses, outfits, expressions, personalities)
User avatar
humbird0
 
Joined: Wed Feb 01, 2012 10:54 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby Ivan-Aedler » Thu Sep 13, 2012 2:45 pm

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 :shock: 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 :D 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 ;)
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby QuizmasterBos » Thu Sep 13, 2012 5:06 pm

Okay, seriously, what is going on here!
I played your game again today and noticed another glitch, which I was about to write down here in this comment.
However, then I remembered that it might be a flash cache thing, so I went and cleared that.

Then this happened:
Spoiler (click to show/hide):

Image

Missing something?

Yes, you're seeing that right. Mario is Missing... has gone missing.
And it's only your swf file. Everyone else's still appears.
Did you delete it? Or is this just me?
What's going on here?
User avatar
QuizmasterBos
 
Joined: Wed Aug 15, 2012 1:31 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby Ivan-Aedler » Thu Sep 13, 2012 5:18 pm

QuizmasterBos Wrote:Yes, you're seeing that right. Mario is Missing... has gone missing.
And it's only your swf file. Everyone else's still appears.
Did you delete it? Or is this just me?
What's going on here?

Hey, look at that line in the first post.

-If the SWF below is not showing up, I may be uploading it, just wait a bit! If the image is tiny, its a problem with the LOK site.
Anyway, you can also download and play one of the versions below!
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby QuizmasterBos » Thu Sep 13, 2012 5:57 pm

ivanaedler Wrote:
QuizmasterBos Wrote:Yes, you're seeing that right. Mario is Missing... has gone missing.
And it's only your swf file. Everyone else's still appears.
Did you delete it? Or is this just me?
What's going on here?

Hey, look at that line in the first post.

-If the SWF below is not showing up, I may be uploading it, just wait a bit! If the image is tiny, its a problem with the LOK site.
Anyway, you can also download and play one of the versions below!


Okay, but:
-I was already playing it
-I emptied my flash cache after finding a glitch
-Then I reloaded and it was gone

I never heard of swf files disappearing after emptying a flash cache before.
Btw: It's there now. I probably am stupid, so sorry for bothering you.

I'll write a detailed comment about the glitch and another thing later. I'm a little busy for a while and my computer just bluescreened on me. Great :( :x
User avatar
QuizmasterBos
 
Joined: Wed Aug 15, 2012 1:31 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby Ivan-Aedler » Thu Sep 13, 2012 6:16 pm

QuizmasterBos Wrote:I never heard of swf files disappearing after emptying a flash cache before.
Btw: It's there now. I probably am stupid, so sorry for bothering you. I'll write a detailed comment about the glitch and another thing later. I'm a little busy for a while and my computer just bluescreened on me. Great :( :x

Hey, okay, no problem ;)

EDIT: I had to upload the SWF again (third time) to correct a bug I've found with lack of Peach's back in some backside animations, like on vases.I also let Peach face better in frontside mode, with a new mouth.

I will only ship a 'stable SWF' (downloadable one) in the first page if the actual version is playable without annoying bugs.

I've done so many updates these 10 days (I'm not complaining), but I need to think about anything else (checking the long TODO list now). So I can add, say, Daisy Character and Daisy Striker outfit and create a new level (remember that some TODO's supposed to be harder is actually lighter for me, as I can use other areas of the brain - creation).
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby QuizmasterBos » Thu Sep 13, 2012 9:08 pm

Alright, scratch that detailed report, since I don't get it anymore. Shoot, I even had a funny way of bringing it too, maybe next time.
In case you want to know, whenever Peach goes in "statue" mode, she showed her backside, but still had her breast showing.
Wish I took a screenshot of that.

But what I do want to address is a graphical problem. It's the roof.
Here's a screenshot showing what I mean (the arrows are mine, don't worry):
Spoiler (click to show/hide):

Image

The roof's "bits" don't flow smoothly, so you end up with these obviously line-y textures. The right part also looks different, the lines are thinner there.
Would you, oh great Ivanaedler, consider putting this somewhere on your list of things to change, add, or improve? Or maybe someone else would be willing to?
No need to rush though, it's a minor thing, but I would greatly appreciate it.

Also, it might be my crummy laptop, but multiple times I had the game slow down firefox, I couldn't get any game functions to work and doing other things like opening a new tab takes excruciatingly long. Might it be a problem with the game, with firefox, or is it really my laptop?
User avatar
QuizmasterBos
 
Joined: Wed Aug 15, 2012 1:31 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby Ivan-Aedler » Thu Sep 13, 2012 9:12 pm

QuizmasterBos Wrote:Alright, scratch that detailed report, since I don't get it anymore. Shoot, I even had a funny way of bringing it too, maybe next time.
In case you want to know, whenever Peach goes in "statue" mode, she showed her backside, but still had her breast showing.
Wish I took a screenshot of that.

I noticed it quickly 2 hours ago and fixed it ;)

QuizmasterBos Wrote:But what I do want to address is a graphical problem. It's the roof.

I'VE THOUGHT IT WAS THE HUD! It is duplicated in your pic! :shock: :lol:

QuizmasterBos Wrote:Here's a screenshot showing what I mean (the arrows are mine, don't worry):
The roof's "bits" don't flow smoothly, so you end up with these obviously line-y textures. The right part also looks different, the lines are thinner there. Would you, oh great Ivanaedler, consider putting this somewhere on your list of things to change, add, or improve? Or maybe someone else would be willing to? No need to rush though, it's a minor thing, but I would greatly appreciate it.

I will fix it!

QuizmasterBos Wrote:Also, it might be my crummy laptop, but multiple times I had the game slow down firefox, I couldn't get any game functions to work and doing other things like opening a new tab takes excruciatingly long. Might it be a problem with the game, with firefox, or is it really my laptop?

Please test it in Google Chrome, Safari and Opera. I use Firefox 15 and I dont open more than 3 tabs at once. Sometimes its the process 'plugin-container' crashing firefox.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby QuizmasterBos » Thu Sep 13, 2012 10:32 pm

QuizmasterBos Wrote:But what I do want to address is a graphical problem. It's the roof.

Ivanaedler Wrote:I'VE THOUGHT IT WAS THE HUD! It is duplicated in your pic! :shock: :lol:


Okay, seriously how did I not see that! The reason is probably my screenshot paste in paint. I moved the screenshot with left-shift accidentally before cutting out the part I needed, so I understand the confusion.

QuizmasterBos Wrote:Here's a screenshot showing what I mean (the arrows are mine, don't worry):
The roof's "bits" don't flow smoothly, so you end up with these obviously line-y textures. The right part also looks different, the lines are thinner there. Would you, oh great Ivanaedler, consider putting this somewhere on your list of things to change, add, or improve? Or maybe someone else would be willing to? No need to rush though, it's a minor thing, but I would greatly appreciate it.

Ivanaedler Wrote:I will fix it!

Thank you very much.

QuizmasterBos Wrote:Also, it might be my crummy laptop, but multiple times I had the game slow down firefox, I couldn't get any game functions to work and doing other things like opening a new tab takes excruciatingly long. Might it be a problem with the game, with firefox, or is it really my laptop?

"Ivanaedler"]Please test it in Google Chrome, Safari and Opera. I use Firefox 15 and I dont open more than 3 tabs at once. Sometimes its the process 'plugin-container' crashing firefox.


I'll go get Chrome soon, so I hope that fixes it. Thanks for the advice.
User avatar
QuizmasterBos
 
Joined: Wed Aug 15, 2012 1:31 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby humbird0 » Fri Sep 14, 2012 1:04 am

ivanaedler Wrote: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.

Spoiler (click to show/hide):

Nope, only the code inside of onEnterFrame runs more than once.
What happens is that all of the functions and code get defined and any loose code outside of the functions gets run immediately.
Then, one frame later, the onEnterFrame() will run for the first time and continue to run repeatedly for each frame afterwards.

If you were to use gotoAndStop() or gotoAndPlay() and jump to a different keyframe with code on it, then that code will run once. If you jump to another frame and back again, the code on that keyframe will run again.
On the other hand, if the timeline's playhead is on a keyframe with code, and you jump to the same frame you're already on, then nothing will happen.

Also, jumping to a frame that is not a keyframe won't trigger any code as long as it starts with the same keyframe you were on.
Therefore:
Image > Image
Will not cause the code on the "walk" frame to be run again.

But doing this:
Image > Image
Will cause the code located on the "mast" keyframe to run.

And if you jump back:
Image > Image
The "walk" code will run again.

But simply staying on a frame does not cause its code to run more than once.




ivanaedler Wrote:"I didn't know about null:null making the inline functions work with ',' instead of ';'. Its a convenience to make them more readable, like reading a phrase?

Spoiler (click to show/hide):

That's not what null:null does.
That line is actually meaningless because null already equals itself.
The only reason I include that meaningless line is because you are normally required to put a comma between all functions and variables defined within an object EXCEPT for the very last one.
But it's very easy to forget to do this and just put a comma after all of them out of habit. So I just put null:null at the end to avoid having to remember and to avoid having Flash nag at me when I forget.
I tend to do a lot of copying and pasting when I construct objects like this, so it's just one less thing to worry about. Let explain it another way.
Normally, you'd define an object like this:
Code: Select All Code
myObject = {
   myVar1:"some value",
   myVar2:"another value"
}

But if you accidentally do this:
Code: Select All Code
myObject = {
   myVar1:"some value",
   myVar2:"another value",
}

Then flash will nag about the last comma being a syntax error because it's not separating anything.
Since I tend to do a lot of copying and pasting, I tend to accidentally forget to remove the last comma. So to avoid that, I do this:
Code: Select All Code
myObject = {
   myVar1:"some value",
   myVar2:"another value",
   null:null
}

By always ending the object with a meaningless definition like null:null , I can just copy and paste the other stuff without worrying about whether or not I remembered to put a comma after the last item because I always put null:null as the last item.




ivanaedler Wrote: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 didn't find the magic clearly during Flash EDITING (not playing).

Spoiler (click to show/hide):

I took advantage of a little-known feature in Flash called "9-slice scaling"
This feature allows you to selectively stretch parts of a movieClip when you change its width and height.
Click to Play
(Javascript Required)

9-slice scaling.swf [ 337 Bytes | Viewed 3141 times ]


9-slice scaling.fla
9-slice example source file
(24 KiB) Downloaded 12 times



To use this feature, right-click on a movieClip in the library and check its properties. You'll see the option at the very bottom:
Image

Then if you look inside of the movieClip, you'll see these new guidelines:
Image
These control where the image gets sliced and which parts get stretched. You can move these guidelines anywhere you want.
So for the pipe, I just moved the top guideline down to the bottom of the top-half of the pipe so that the top of the pipe won't get stretched. And I moved the bottom guideline down to the bottom of the pipe.
There's just one catch:
This feature only works on vector graphics. So I had to select the pipe's image and use the "trace bitmap" feature to turn it into raw vector shapes.




ivanaedler Wrote:Lastly, the problem with jigging (up and down) because of gravity. Is this the problem of not using 'applyMovement' separately?

Spoiler (click to show/hide):

Yes, that's exactly why you should separate the code that sets the velocities from applyMovement.
Instead of reacting to the player currently being inside of a wall,
detect when the player is about to enter a wall and react before they actually do so.
What you want to do is set the intended horizontal and vertical velocities.
Then you use those velocities to figure out where the player is about to go and check whether or not that location is inside of a wall.
If it is, you nullify one of the velocities to Zero to prevent the player from going there.
Finally, after all that, you apply the velocities (after they've been modified) and the player simply goes where they're allowed to go.

Ideally, when you detect an impending collision, after setting a velocity to Zero, you should also alter the player's horizontal or vertical position to be right up against the object they're hitting. (depending on which axis is colliding)
You don't have to do this, but if you skip it, the player will sometimes appear to stop a short distance away from the barrier. This can look odd when colliding downward with the ground, because the player will seem to float slightly above it.
Image
The last version of Pokemon Hentai Version is: January 31, 2015
Every Pokemorph created for the game
Every cutscene picture in the game
Reference material gallery (characters, poses, outfits, expressions, personalities)
User avatar
humbird0
 
Joined: Wed Feb 01, 2012 10:54 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby Ivan-Aedler » Fri Sep 14, 2012 1:50 am

humbird0 Wrote:Nope, only the code inside of onEnterFrame runs more than once. What happens is that all of the functions and code get defined and any loose code outside of the functions gets run immediately. Then, one frame later, the onEnterFrame() will run for the first time and continue to run repeatedly for each frame afterwards.

I really appreciated the explanations, thanks! I'm using my free time to see it all and improve this code. But yes, when in the same keyframe, code will not run again, that's why I did a 'relay frame' for levels, so I could replay the same level/frame. LEVEL1 FRAME ->[event:PEACH DIED] -> goTo RELAY FRAME which will goTo the CurrentLevel -> goTo LEVEL 1 FRAME.

Spoiler (click to show/hide):

But I'm still thinking here... so, functions are only instantiated once. If I play the entire timeline and go back to frame1, and then , again and again (10, 100 times), all the inline functions inside that frame will NOT get loaded again? I ask this because I've seen implementations like that:

functions being read again.jpg
functions being read again.jpg (18.91 KiB) Viewed 3121 times

frame1 (enemy will attack):
Code: Select All Code
onClipEvent =function()
{
  If hittest, ATTACK!
  //wait to attack again
}

frame10 (enemy died):
Code: Select All Code
enemy.pose.gotoAndStop("died_shape");
onClipEvent =function()
{
  if player hittest, RESUSCITATE!!
  gotoAndPlay ("frame1");
}


So, onClipEvent will be reinstantiated, because its inner code has changed. (or at least its supposed to do so).
I noticed this approach because, before, I was having problems with shyguys due to a only one onEnterFrame code. He could walk, jump, get stomped, and act (sex scene). But I was only giving it the onClipEvent in the walk frame, not the others. When peach stomped him, weird things started to occur (they were going left, having gravity...), and then I understood that's because of the omnipresence of onClipEvent. Then I studied a better form to use it -> declaring it with different code.

PS: I know I could also use 'delete onEnterFrame' but I needed it.

It can be understood as a state machine but a little rudimentar. So I may ask: 'if onClipEvent indeed can be recoded like this, the program needs to re-read it again / re-instantiate (a new onclipEvent overwriting the former). So, if you have three equal 'this.start = function() ' code, in three different frames, how Flash understands all are equal, not needing to re-read the 'this.start' everytime the pointer is at a given keyframe?

In other words, if keyframes code is re-read again (it should), code may impact performance if the timeline pointer passes over them all the time, just to check if the state if equal to the last one.

PS: Reading my own phrase, now I remember that the current onClipEvent could grab the pointer to it again (due to state != lastState), so , indeed, the function will NOT be re-read again while in this same onClipEvent domain.

For about the 9-grid slicing, do they only split the stretching/non stretching parts in two sides? That is, is there a possibility to split in three or four? (e.g. top pipe and bottom pipe not stretching, but the middle part stretching? If not, could I mix two or more 9-grid slacing? Grouping the shapes? (I've seen this function somewhere)

PS!! I noticed that we can gain some FPS if we dont use functions at all in game loops (which runs thousand of times a second).
If a given function has a couple of code, like applyMovement, its better to just title it as a comment: //APPLYMOVEMENT BELOW.

My next goal should be coding applyMovement to Peach, so she will not bounce anymore. Although its minimal, it gets annoying.
I didnt notice the necessity of readjusting player _x and _y because they can overlap in some situations (mostly when the game has lag due to several causes). You're right!
Thanks!

EDIT: using ApplyMovement may have increased Game FPS by 2!
But the jigging problem continues. I'm almost certain its because of this WHILE.

Spoiler (click to show/hide):

Code: Select All Code
//gravity
Peach_setY+= gravity;

//Anti gravity if she touches ground or if she's inside a block accidentally - she will be on top of it
      while (_root.ground.hitTest(_x+Peach_setX, _y+Peach_setY, true))   //check temp variables (Peach_setX and Y)
         {
          //char.grav = 0;
          Peach_setY-= gravity; //set temporary variable)
          char.grav = 0;

//
//
//ApplyMovement
_x+=Peach_setX;
_y+=Peach_setY;
//reset for the next loop
Peach_setX=0;
Peach_setY=0;


If I put 'Peach_setY-= 0.1' instead of 'Peach_setY-= gravity', she jigs MUCH less!
I can destroy the line which lets her 'up', so she will be falling if no ground, then she will stop falling if ground. HOWEVER, she will not climb slopes anymore.

I can do the climb code separatelly, checking her _x and _x-width, for example (her right and left boundaries). Then she will go up if she hittests a slope (pixels that is just a bit higher than her toes).
Last edited by Ivan-Aedler on Fri Sep 14, 2012 3:00 pm, edited 1 time in total.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby humbird0 » Fri Sep 14, 2012 9:51 am

ivanaedler Wrote:It can be understood as a state machine but a little rudimentar. So I may ask: 'if onClipEvent indeed can be recoded like this, the program needs to re-read it again / re-instantiate (a new onclipEvent overwriting the former). So, if you have three equal 'this.start = function() ' code, in three different frames, how Flash understands all are equal, not needing to re-read the 'this.start' everytime the pointer is at a given keyframe?

In other words, if keyframes code is re-read again (it should), code may impact performance if the timeline pointer passes over them all the time, just to check if the state if equal to the last one.

I don't clearly remember when onclipEvent's are run, because I never use them.
Flash actually runs actionscript very fast. Almost all slowdowns are caused by excessive graphics work.
The only time I've run into code slowdown is when I try to do huge amounts of collision detection, or intense bitmap manipulation.

When the code on a keyframe is re-run, any functions you define will get re-defined. But that alone doesn't run them.
Also, switching to another frame does not remove any defined functions or variables, so onEnterFrame will continue to exist when you switch to another frame unless you overwrite it or remove it first.
Image
The last version of Pokemon Hentai Version is: January 31, 2015
Every Pokemorph created for the game
Every cutscene picture in the game
Reference material gallery (characters, poses, outfits, expressions, personalities)
User avatar
humbird0
 
Joined: Wed Feb 01, 2012 10:54 pm

Re: MiM 'Mim Ae version' (XXX) 1.5g

Postby humbird0 » Fri Sep 14, 2012 9:54 am

ivanaedler Wrote:For about the 9-grid slicing, do they only split the stretching/non stretching parts in two sides? That is, is there a possibility to split in three or four? (e.g. top pipe and bottom pipe not stretching, but the middle part stretching? If not, could I mix two or more 9-grid slacing? Grouping the shapes? (I've seen this function somewhere)

Yes you can do that, because 9-slice scaling normally creates divisions for the top and bottom.
If you take my example with the pipe, all you have to do is add the pipe-cap under the lower division line.
The ends won't get stretched, but anything between the dividing lines will.
In this particular case, the divisions of the sides aren't really desired, so you could just move the side dividing lines to be outside of the sides of the pipe.
Last edited by humbird0 on Fri Sep 14, 2012 11:42 pm, edited 1 time in total.
Image
The last version of Pokemon Hentai Version is: January 31, 2015
Every Pokemorph created for the game
Every cutscene picture in the game
Reference material gallery (characters, poses, outfits, expressions, personalities)
User avatar
humbird0
 
Joined: Wed Feb 01, 2012 10:54 pm

PreviousNext

Return to Flash Projects



Who is online

Users browsing this forum: No registered users