Forged Alliance Forever Forged Alliance Forever Forums 2013-08-28T20:35:27+02:00 /feed.php?f=2&t=4631 2013-08-28T20:35:27+02:00 2013-08-28T20:35:27+02:00 /viewtopic.php?t=4631&p=51988#p51988 <![CDATA[Re: Directionnal explosions]]>
in gamemian on firstupdate send a simcallback with the option param to the sim Prefs.GetFromCurrentProfile('thevarname')
have the simcallback set the NewEffects var to the param, have the effects code check the param, do new or old effects depending on the param :) easy

any option can be sent from the front end user layer this way...

you could even set up a few functions like SaveSimData('name', params) in the front end user layer and user layer, this function will always save the name params to the same prefs name like 'simdata' it will look like this you will need checks to make the conditions are met, ill do a quick summary

in gamemain.lua

use the onfirstupdate function to trigger sending the simdata to the sim

Code:
function OnFirstUpdate()
--do old function code
SendSimData()
end

-----------------------------------------------------------------------------------

in the usersync.lua

function OnSync()
--do old function code
if Sync.SimData then
UpdateSimData(Sync.SimData)
end
end

function UpdateSimData(data)
Prefs.SaveToCurrentProfile('SimData', data)
end

function SaveSimData(name, params)
local current = Prefs.GetFromCurrentProfile('SimData') or { }
current.name = params
Prefs.SaveToCurrentProfile('SimData', current)
end

function SendSimData()
local data =  Prefs.GetFromCurrentProfile('SimData') or { }
local SD = { Func = 'UpdateSimData', Args = { params = data  } }
SimCallback(SD, true)
end

function SetSimData(name, param)
if name and param then
SaveSimData(name, param)
SendSimData()
end
end

----------------------------------------------------------
in simsync.lua
local SimData = {}

function ResetSyncTable()
--do old ResetSyncTable code
Sync.SimData = false
end

function UpdateSimdata(data)
if data then
SimData = data
end
end

function GetSimData(name)
if SimData[name] then
return SimData[name]
else
return nil
end
end

function SendSimData()
SimSync.SimData = SimData
end

function SetSimData(name, param)
SimData[name] = param
SendSimData()
end

----------------------------------------------------------

in simcallbacks.lua

Callbacks.UpdateSimData(data)
UpdateSimData(data.params)
end


2 way communication wihtout desync from the front end user layer, the user layer and the sim.
just remember the info in the tables is global so all armies can view it and change it. which is what you want for this kinda communication.

Statistics: Posted by Domino — 28 Aug 2013, 20:35


]]>
2013-08-28T19:54:57+02:00 2013-08-28T19:54:57+02:00 /viewtopic.php?t=4631&p=51984#p51984 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by Ze_PilOt — 28 Aug 2013, 19:54


]]>
2013-08-28T19:11:54+02:00 2013-08-28T19:11:54+02:00 /viewtopic.php?t=4631&p=51978#p51978 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by Domino — 28 Aug 2013, 19:11


]]>
2013-08-19T23:37:51+02:00 2013-08-19T23:37:51+02:00 /viewtopic.php?t=4631&p=51089#p51089 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by RoundTabler — 19 Aug 2013, 23:37


]]>
2013-08-19T22:30:58+02:00 2013-08-19T22:30:58+02:00 /viewtopic.php?t=4631&p=51082#p51082 <![CDATA[Re: Directionnal explosions]]>
You will have to live with it.

Statistics: Posted by Ze_PilOt — 19 Aug 2013, 22:30


]]>
2013-08-19T22:28:25+02:00 2013-08-19T22:28:25+02:00 /viewtopic.php?t=4631&p=51081#p51081 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by Lionhardt — 19 Aug 2013, 22:28


]]>
2013-08-08T09:11:16+02:00 2013-08-08T09:11:16+02:00 /viewtopic.php?t=4631&p=50381#p50381 <![CDATA[Re: Directionnal explosions]]> https://bitbucket.org/thepilot/forged-a ... explosions

Also, bloom is now disabled by default in all fidelity presets, because, well, it sucks and hide lot of nice particle effects.

(try ctrl-k a battleship in sandbox with bloom on then off if you don't believe me).

Statistics: Posted by Ze_PilOt — 08 Aug 2013, 09:11


]]>
2013-08-07T00:28:40+02:00 2013-08-07T00:28:40+02:00 /viewtopic.php?t=4631&p=50293#p50293 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by Crotalus — 07 Aug 2013, 00:28


]]>
2013-08-02T17:51:16+02:00 2013-08-02T17:51:16+02:00 /viewtopic.php?t=4631&p=50098#p50098 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by IceDreamer — 02 Aug 2013, 17:51


]]>
2013-08-01T15:53:42+02:00 2013-08-01T15:53:42+02:00 /viewtopic.php?t=4631&p=49992#p49992 <![CDATA[Re: Directionnal explosions]]>

Statistics: Posted by Eukanuba — 01 Aug 2013, 15:53


]]>
2013-08-01T12:13:52+02:00 2013-08-01T12:13:52+02:00 /viewtopic.php?t=4631&p=49968#p49968 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by dstojkov — 01 Aug 2013, 12:13


]]>
2013-08-01T10:25:35+02:00 2013-08-01T10:25:35+02:00 /viewtopic.php?t=4631&p=49965#p49965 <![CDATA[Re: Directionnal explosions]]> Statistics: Posted by Bliss — 01 Aug 2013, 10:25


]]>
2013-07-31T00:30:58+02:00 2013-07-31T00:30:58+02:00 /viewtopic.php?t=4631&p=49867#p49867 <![CDATA[Re: Directionnal explosions]]>

Statistics: Posted by lextoc — 31 Jul 2013, 00:30


]]>
2013-07-31T00:17:15+02:00 2013-07-31T00:17:15+02:00 /viewtopic.php?t=4631&p=49866#p49866 <![CDATA[Re: Directionnal explosions]]>
The debris are bigger, but that doesn't impact on the CPU or the GPU.

I'm not computing any new thing. The vector is already given in a function, I merely passing that value to the debris function and apply it to the general direction.

So, air units will not be slower or faster than before. Nothing will be slower or faster actually.

Right now you don't see them as much because :
- They are twice smaller.
- They are going upper.

Statistics: Posted by Ze_PilOt — 31 Jul 2013, 00:17


]]>
2013-07-30T23:37:09+02:00 2013-07-30T23:37:09+02:00 /viewtopic.php?t=4631&p=49861#p49861 <![CDATA[Re: Directionnal explosions]]> if it doesn't affect performance - great,
if it comes with a slider - bonus.

would a larger unit, say an EXP produce more or larger pieces?
does the same physics apply to air units (including performance) ?
a couple more vids showing these would be nice ;)

Statistics: Posted by FireMessiah — 30 Jul 2013, 23:37


]]>