generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Which is most efficient...?

Previous Thread :: Next Thread 
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Jan 2012 08:44 AM
[ Content Deleted ]
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
18 Jan 2012 08:50 AM
Are the parts anchored?
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
18 Jan 2012 09:04 AM
1st
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Jan 2012 09:06 AM
[ Content Deleted ]
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
18 Jan 2012 09:08 AM
They are anchored?
And you're thinking about welds?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Jan 2012 09:13 AM
[ Content Deleted ]
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Jan 2012 09:13 AM
[ Content Deleted ]
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
18 Jan 2012 09:15 AM
You cant do that with welds without having them all unanchored.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Jan 2012 09:18 AM
[ Content Deleted ]
Report Abuse
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
18 Jan 2012 09:23 AM
Does model:MoveTo() (or whatever) work?


Anyway, I'd guess it's more efficient to let roblox handle it (the weld and cframe once one) (hopefully it's on the c side), but you could always try both and measure how long each one takes.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Jan 2012 09:49 AM
[ Content Deleted ]
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
18 Jan 2012 11:26 AM
Now that you have that settled out, which of these two methods of changing the CFrame of parts based on another part's CFrame would be more efficient?

http://www.roblox.com/Forum/ShowPost.aspx?PostID=61606516
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
18 Jan 2012 11:44 AM
@Oys: Because if you use the second option you'll watse memory on Welds and then again Roblox itself would re-position them and we know that Roblox is inefficient in most parts when it comes to scripting.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
18 Jan 2012 12:31 PM
What lags more, many parts being CFramed quite a bit within a short period of time, or all those parts being welded to an object that's CFrame is being changed constantly within a short period of time.

Welds use up memory, and CFrames create lag (If colliding with other parts). I don't really know what'd be more efficient, though. Run a few tests.

­<'+1 Post. Ujelly?'>
Report Abuse
HotThoth is not online. HotThoth
Forum Moderator
Joined: 24 Aug 2010
Total Posts: 1176
18 Jan 2012 02:32 PM
The key issue here is physics. Doing things in Lua vs. C++ should not make nearly as big an impact as having anchored vs. unanchored parts. If welding parts to an anchored part has them treated (for physics) as anchored by the engine, then that's the best way to do it. Otherwise, the best way is to simply CFrame everything separately so you can still have everything be anchored. I'm not actually sure whether or not the weld-to-anchored-part optimization is implemented, though (although I imagine it would be).
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
18 Jan 2012 07:52 PM
There's also the idea that if you use the CFrame method you can clone the original CFrame and not even have to move the original part.

@HotThoth

Would a method that calls a function on all children of an object increase performance if you were working with hundreds of children at once?

~+[CROOKITY BANDED SNAKES]+~
Report Abuse
SecureDatabase is not online. SecureDatabase
Joined: 12 Dec 2010
Total Posts: 392
18 Jan 2012 07:56 PM
I wouldn't use welds if I were you. Welds have a tendency to error (double point?), with large amounts (and small) of parts.

I would CFrame it. However, around 300 parts moving with CFrame creates lag, so....
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
19 Jan 2012 11:52 AM
Remember that with welds youre replicating a single body moving while with cframing youre replicating 1000 bodies (each brick separately) moving.

The result is quite ugly, i once made a crane which used cframe to move around and rotate the arm thingy and the parts didnt move in sync...
Report Abuse
HotThoth is not online. HotThoth
Forum Moderator
Joined: 24 Aug 2010
Total Posts: 1176
19 Jan 2012 12:17 PM
@popin: not quite sure what you mean; example plox?
Report Abuse
nightname is not online. nightname
Joined: 10 Jun 2008
Total Posts: 8960
19 Jan 2012 01:01 PM
"@popin: not quite sure what you mean; example plox?"

I think he means doing something like this:

for i,v in pairs(workspace:GetChildren()) do
if v.Name == "Block" then
v.Touched:connect(function(d)
print(v.." has been touched by: "..d);
end)
end
end

Report Abuse
McBlocker is not online. McBlocker
Joined: 16 Nov 2008
Total Posts: 1721
20 Jan 2012 01:57 PM
Using welds would be faster (and simpler), but the thing with welds is that you never know if they'll keep up. As I'm sure you've experienced, lots of welds equals lots of image probems.

So it's really effeciency vs realness. (Couldn't think of a better word than "realness")
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image