|
| 21 Dec 2011 10:14 AM |
I'm trying to make my game so that only bricks that are within 100 studs of the player will appear. So I know if you want to make a brick that a specific person can see and interact with, you use a local script and put the brick under the player's CurrentCamera.
The problem that I'm having is that I don't entirely know how to do this. Would I clone what's in the Workspace and then remove it, then adding and removing the cloned bricks based on the player's distance to them? And what do I do about player's characters? Like if someone is 101 studs away from another player, how do I remove their character so the player can't see him since he's too far away?
Any help would be nice, as I'm not very good with local things :P |
|
|
| Report Abuse |
|
|
| |
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 21 Dec 2011 01:39 PM |
| you can use Fog to restrict viewing distance.. |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 01:52 PM |
| I already am, but there are a lot of bricks loaded on each level and it would greatly increase the speed of the game if they didn't all have to appear... |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 03:14 PM |
| I think this was done before in one of Anaminus's games/test places. I remember I went to it in offline mode and opened up the script he used to make the parts appear if they were close enough to you. It was like a giant chess-like maze/board. However it was a while ago and I can't find it now, so maybe he removed it, but I know it can be done. If anyone could find the script he used or knows how to do this I would appreciate the help :) |
|
|
| Report Abuse |
|
|
cart6157
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 2194 |
|
|
| 21 Dec 2011 03:17 PM |
| Fog is basically the same. |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 03:24 PM |
*sigh*
Fog = lower visibility + lots of bricks (lag)
Local Bricks = ensures a lower visibility + very small amount of bricks (no lag)
Local Bricks is way more effecient. I'm going to be using both anyways so there's a smooth transition of visibility with the fog, and then all the useless bricks that are too far away to see anyways (that just slow things down) will be removed.
There are going to be a lot of bricks generated at my place each game. I would like it if there was not lag-kill everytime it says "Generating Map" |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 03:25 PM |
Press SHIFT+F10
Users can decrease the rate bricks are rendered now by doing that. In-game "quality settings" |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 21 Dec 2011 03:25 PM |
I don't think fog lags..
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 03:31 PM |
I never said fog causes lag.
And I know about pressing Shift+F10. I think it's under the game settings as well under the menu. However not everyone knows about this or wants to change it. And there's no way to change a user's setting via script. I'd like to make sure the game runs quickly and smoothly (I love games that run well) for everyone and locally loading the bricks would help a lot. Plus I don't want players to see past a certain distance anyways, even with fog. I want a certain amount of studs (100) and fog doesn't allow a direct cutoff of the visibility past a certain distance. |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 03:32 PM |
| When I said (lag) I meant from the amount of bricks that would remain on the map if I chose to go with fog. |
|
|
| Report Abuse |
|
|