The Daily Click ::. Forums ::. Klik Coding Help ::. Layered Armor and how to get it to not look like total ass
 

Post Reply  Post Oekaki 
 

Posted By Message

- Yelnek -



Registered
  03/05/2003
Points
  1016

VIP MemberI am an April Fool
3rd December, 2007 at 11:49:31 -

I had the LAG problem in my game then I was helped by the awesome people on here... (prob Circy) and then BAMB!
I used the "Mask" object thingymajingy and it works like sex now. I love it. Woot!

 
"I have dreamed a dream... But now that dream is gone from me."








Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
4th December, 2007 at 11:06:50 -


Originally Posted by Radix
A cheap method is to have all your object parts have the same default movement, in addition to the always relocate event. They'll almost always stick together without lag if you do that. A similar principle can be applied to custom engines.

They way I do it in my games is not to relocate the objects to follow the leader; instead I give them relocation actions in the same event. It's important however that these actions come AFTER the main object. Example:

xinertia of MainObject > 0
--MainObject: set X position to X(MainObject) + (xinertia(MainObject)/4)
--ObjectPart1: set X position to X(MainObject)
--ObjectPart2: set X position to X(MainObject)

The following would be equivalent, but action order is irrelevant (though event order is not):

xinertia of MainObject > 0
--MainObject: set X position to X(MainObject) + (xinertia(MainObject)/4)
--ObjectPart1: set X position to X(ObjectPart1) + (xinertia(MainObject)/4)
--ObjectPart2: set X position to X(ObjectPart2) + (xinertia(MainObject)/4)

That's probably an excessive example, but how you need to do it depends on your engine.



Ah! That's pretty sound, in essence you're just moving everything all at once instead of forcing the bit parts to always follow your mask around.

Thanks Radix, and good to see you back!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click