SigmaTechJoin Date: 2010-01-28 Post Count: 643 |
There are things in a game that essentially wastes processing space doing something that nobody is there to see. StreamingEnabled offered developers an option to only load parts to a client based on their computer power, but didn't reach its way to scripts.
What would it do?
----------------------------------------------------------------------------------------
".BeingObserved" would be an event of a brick that fires any time that any client sees the brick on their screen. It would return true or false for the state of being observed or not and table of observers. The event should fire every time the state is changed, including changes in the list of players viewing the brick.
The difference between .BeingObserved and just cloning to local parts is the fact that the script will still be idling, whether local or server-side.
Application in lag reduction
----------------------------------------------------------------------------------------
As it relates to lag reduction, .BeingObserved could be used by a developer to hybridize the activity of his or her script like so:
{code}
function onObservation(isInView, players)
while isInView do --While being seen, do
--repetitive strobe lighting that only worsens when more vehicles w/ lights are spawned
print(unpack(players)) --print the player table for fun
end
end
script.Parent.Part.BeingObserved:connect(onObservation)
{code}
Application in game development
----------------------------------------------------------------------------------------
For game developers, .BeingObserved goes way beyond lag reduction and could be used as a versatile, practical and very effective method of detecting that an object is on a user's screen. For instance, in a Slender game, the event could trigger the scary static screen (and staring timer) when looking at Slender. Doing this using proximity would not realistic, as the Slender NPC could easily be *behind* the player and still within the detection radius. You could even make a very good Medusa NPC by connecting the event to the NPC's eyes.
Application in quantum mechanics (For the lulz)
----------------------------------------------------------------------------------------
For the experimental of folk, .BeingObserved can be used to collapse perceived reality when modeling the quantum-mechanical idea of Copenhagen interpretation. Ever heard of superposition? What about Schrödinger's cat? The basic idea is that, when a situation has 2 possible outcomes that are equally likely to happen, the outcome, until observed (sight, sound, etc.) exists in superposition, being BOTH outcomes at the same time. Human observation collapses reality into one outcome because superposition cannot be observed.
--Schrodinger's cat
dead = true
alive = true
function collapseReality(seen) --what a godly function name
if seen then
unstableIsotype = math.random(1,2) --1 = decayed, 2 = didn't decay
geigerCounterDetectedRadiation = (function() if unstableIsotype == 1 then return true elseif unstableIsotype == 2 then return false end end)
if geigerCounterDetectedRadiation then
--kill cat
dead = true --because of entanglement
alive = false --because of entanglement
else
--don't kill cat
dead = true
alive = false
end
script.Disabled = true --Newtonion laws are happy now c:
end
end
cat.BeingObserved:Connect(collapseReality)
TL;DR: Make an server-side event that triggers (+returns a boolean & list (table) of players) when players are actively looking at a defined point-of-interest
ΣTech |
|
Reapper2Join Date: 2009-11-16 Post Count: 6572 |
Nicely stated and support.
"No cats where harmed in this scripting" |
|
|
BasenessJoin Date: 2015-10-07 Post Count: 1001 |
You can already do this with LookVector and CFrame.
|
|
clubb12Join Date: 2010-04-07 Post Count: 627 |
Support.
kazuhira |
|
XenonLiJoin Date: 2009-08-19 Post Count: 5013 |
the suggested implementation of this code seems to be severely flawed, but i support |
|
SigmaTechJoin Date: 2010-01-28 Post Count: 643 |
@Rowe Talking about a server-side thing
ΣTech |
|
SigmaTechJoin Date: 2010-01-28 Post Count: 643 |
@XenonLi
Which code
ΣTech |
|
roun12Join Date: 2012-08-05 Post Count: 2 |
All of my support.
|
|
|
SigmaTechJoin Date: 2010-01-28 Post Count: 643 |
@Doge It seems like you have the fire spread virus lol... Some free models have it and people publish models unknowingly with the virus in it.
ΣTech |
|
|
ApertureCJoin Date: 2012-04-20 Post Count: 1095 |
iSupport.
New from Apple. |
|
EnrxqJoin Date: 2012-11-30 Post Count: 666 |
Support |
|
DaywatchJoin Date: 2012-09-24 Post Count: 2681 |
@Doge there are fire remove commands you can find.
Support |
|
|
Support
I am surprised this hasn't been in here sooner. and it would be amazingly effective for game creators.
ChromaPlayer,
Because I was bored (also because it was on the Pinewood Builders page)
|
|
Patchy319Join Date: 2011-06-12 Post Count: 183 |
Support;
Even Though I don't Code xD
#Trump2016!1 |
|
|
Support.
Kebab Remover of OT. |
|
BorsyJoin Date: 2014-07-31 Post Count: 15111 |
hi
всё хорошо) /translation/ Everything is http://chat.roblox.com/ :) |
|
|
|
peteme123Join Date: 2012-04-19 Post Count: 96 |
Well, generally Roblox is not that laggy of a game. With an average player frame rate being 30 fps, there really isn't a huge need for a lag reducer. Although I do have a fairly decent computer (MSI Gaming G Series), I do "lag" on more in-depth games such as "Phantom Forces". If these are the types of games you are talking about, I agree with you.
I half support. |
|
BorsyJoin Date: 2014-07-31 Post Count: 15111 |
@pet
this is a suggestion that scripters would use
lets say you have an area that has a lot of scripting but lags the entire game
with this suggestion you'd be able to deactivate the script if nobody is looking at the area and reduce lag
всё хорошо) /translation/ Everything is http://chat.roblox.com/ :) |
|
|
Support. Seems to me like this will be similar to quantum physics in Roblox if the event only applies to objects being observed.
|
|
LynbeanJoin Date: 2012-12-04 Post Count: 43 |
Support. |
|