OwnerOfSuccuby Wrote:Sorry for a long answer i was sleeping
OwnerOfSuccuby Wrote:If it is on the same level then it is more simple solution. Just let us think about possible situation: It is possible to make visible / invisible part of object - and for example it is possible to make it on like hit objects work - and even do not put x there.
OwnerOfSuccuby Wrote:It is posible to attach player to another layer. It is possible to use swap depth and change layers of where the parts are and make Player Under or before object.
OwnerOfSuccuby Wrote:So if i would make some kind of that i would make it on Mario hitTest some recktangle - and make part of object visible (when mario is under the construction and invisible in other situations).
Gorepete Wrote:You should sent a PM or go to HNRLY's blog. He did a good job of doing what you are asking since Sex Realm used that perspective. If I remember correctly, he had a function that dynamically mapped out the hitbox for an object on stage so the character would walk "around" things correctly.
Gorepete Wrote:Alternately, as you suggest, you can just cheat and make two objects on top of each other with the character's layer in between then map out seperate hitboxes for them. Although the game will have to full load both and depending on how complex you get lag could start to become an issue.
OwnerOfSuccuby Wrote:For example you can make it like MovieClip with 2 frames where first is empty - empty MovieClip frame will not take more CPU i think. I do not test how visiability use CPU so i can not say about this but for empty movie clip - why not ?
OwnerOfSuccuby Wrote:Sorry i wil return soon - need to go outside for a time - but let us see how do you want it to work. And the most important that i need is to understand where it your Player object ?
OwnerOfSuccuby Wrote:When you move the map how do you make it ? You move each object or only container ?
OwnerOfSuccuby Wrote:For example can you some how make one object before another like right click -> make in front ... .
OwnerOfSuccuby Wrote:There are 3 samples in zip file - i will only try to show idea.
OwnerOfSuccuby Wrote:If it is for MiM game may be if you want to use it on map
OwnerOfSuccuby Wrote:i do not see short distance betwen objects there - so may be it even can be possible to make it with out code - by seporating object on 2 one ow it is before and another after player ?
OwnerOfSuccuby Wrote:By the way - i did not test Swap Depth on CPU usage - so it is better to make it on change of variables or some thing like that. Not like in my example - it was fast to show create.
OwnerOfSuccuby Wrote:By the way do registration points work faster ? If you will move it you have to remake them ? Or they work automatickally ? May be make 2 invisible rechtangles for example and calculate positions by them - then you can use this mashroom again with out change code. By the way i do not think that hit test object will eat more cpu in this situation too.
OwnerOfSuccuby Wrote:By the way - i read that your game require computer with 2 core - how do you seporate it on the 2 cores ? Or flash make it by itself in new version ?
?_root.char._y-_root.char._height * 2, or something like that
OwnerOfSuccuby Wrote:In my example i make swap depth each time object is on the recktangle - it means 24 times per second. (24 fps). May be It is better to make variable and if it change depth make it for example true - and if it is not true do not swap again. And the same for false value of this variable. I think that swap depth eat more recources then: if (a==false){then swap depth; a=true;}
But i do not test it - do not use swap depth in a lot of objects in this way.
OwnerOfSuccuby Wrote:So in your situation you calculate this point like:?_root.char._y-_root.char._height * 2, or something like that
OwnerOfSuccuby Wrote:I just think - As i understand a lot modern android smartfons use 2 not very poverful cores - for example i have - 2 cores with 1 mhz. And if for example it can use more then one core it can maybe give better perfomance for flash on it. But it is just for fun so it does not metter
Users browsing this forum: No registered users