Jump to content

flachdrache

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by flachdrache

  1. owww bummer - tiles might match but its seams like the wave calculation is not tilable but iam no expert either ... you might can interpolate vertex.y like in the curve function ?! You can use a simple linepick from above to below waterpatch to place stuff at the intersecting point - however, sice the sender knows nothing about the receiver and the receiver usually doesnt care about any stuff the sender might tries to archive the user in question might have to come up with its own kind of filter to get rid of failures forwarded into space by the sender. Ps : there was a (very) early preview of sea waves [in] le3d which appearance a little more realistic, however afaik
  2. Never got that thing working myself - thanks for sharing.
  3. Here is my "openwater_low" lua w.i.p. script - you most likely want to use SetShaderVec4 in le2.5+, however. It lets the user choose a model to draw the effect on ... not sure how instance safe it is though ... require("scripts/class") local class=CreateClass(...) function class:InitDialog(grid) self.super:InitDialog(grid) group1 = grid:AddGroup("Model") group1:AddProperty("usemodel", PROPERTY_FILE, "GMF Files (*.gmf):gmf", "Model File", "Model Files") group1:AddProperty("waterdepth", PROPERTY_FLOAT, "2|0.0,20","Water depth") group1:AddProperty("depthcolor",PROPERTY_COLOR,"176,176,227,89","Water Depth color") group1:AddProperty("fogcolor",PROPERTY_COLOR,"99,99,130,32","Water Fog color") group1:AddProperty("fogrange",PROPERTY_VEC2,"","Water Fog range") group1:AddProperty("ambientintensity", PROPERTY_FLOAT, "2|0.0,4","Intensity") group1:Expand(1) end function class:CreateObject(model) local object = self.super:CreateObject(model) object.model = model object.waterdepth = 6.0 object.fogcolor = Vec4(0.39, 0.39, 0.51, .125) object.fogrange = Vec2(0.0, 400.0) object.depthcolor = Vec4(0.69, 0.69, 0.89, .35) object.ambientintensity = 1.0 --Use the invisible material so the model is not visible, but can still be picked object.model:Paint(LoadMaterial("abstract::invisible.mat"), 0) function object:SetKey(key,value) if key=="usemodel" then if fw~=nil then SetWorld(fw.transparency.world) -- does leak into other instances (one shader instance) -- if self.useModel == nil then self.useModel = LoadMesh("abstract::"..value ) end if self.useModel ~= nil then self.useModel:SetPosition(object.model:GetPosition(0)) self.useModel:SetRotation(object.model:GetRotation(0)) self.useModel:SetScale(object.model:GetScale(0)) end SetWorld(fw.main.world) end elseif key=="fogcolor" then color=string.Explode(value,",") r=tonumber(color[1]) g=tonumber(color[2]) b=tonumber(color[3]) a=tonumber(color[4]) if r==nil then r=255 end if g==nil then g=255 end if b==nil then b=255 end if a==nil then a=255 end self.fogcolor = Vec4(r/255.0,g/255.0,b/255.0,a/255.0) elseif key=="fogrange" then self.fogrange=StringToVec2(value) elseif key=="depthcolor" then color=string.Explode(value,",") r=tonumber(color[1]) g=tonumber(color[2]) b=tonumber(color[3]) a=tonumber(color[4]) if r==nil then r=255 end if g==nil then g=255 end if b==nil then b=255 end if a==nil then a=255 end self.depthcolor = Vec4(r/255.0,g/255.0,b/255.0,a/255.0) elseif key=="ambientintensity" then self.ambientintensity = tonumber(value) elseif key=="waterdepth" then self.waterdepth = tonumber(value) else return self.super:SetKey(key,value) end return 1 end function object:GetKey(key,value) if key=='fogcolor' then return (self.fogcolor.x*255.0)..','..(self.fogcolor.y*255.0)..','..(self.fogcolor.z*255.0)..','..(self.fogcolor.w*255.0) elseif key=="fogrange" then return self.fogrange.x..","..self.fogrange.y elseif key=='depthcolor' then return (self.depthcolor.x*255.0)..','..(self.depthcolor.y*255.0)..','..(self.depthcolor.z*255.0)..','..(self.depthcolor.w*255.0) elseif key=='ambientintensity' then return self.ambientintensity elseif key=='waterdepth' then return self.waterdepth elseif key=='usemodel' then return self.useModel else return self.super:GetKey(key,value) end return value end function object:Refresh() if fw~=nil then SetWorld(fw.transparency.world) local mat=LoadMaterial("abstract::effect_oceanplane_low.mat") local shader=GetMaterialShader(mat) SetShaderFloat(shader,"waterdepth", self.waterdepth) SetShaderFloat(shader, "fogcolorr",self.fogcolor.x) SetShaderFloat(shader, "fogcolorg",self.fogcolor.y) SetShaderFloat(shader, "fogcolorb",self.fogcolor.z) SetShaderFloat(shader, "fogcolora",self.fogcolor.w) SetShaderFloat(shader, "fograngex",self.fogrange.x) SetShaderFloat(shader, "fograngey",self.fogrange.y) SetShaderFloat(shader, "depthcolorr",self.depthcolor.x) SetShaderFloat(shader, "depthcolorg",self.depthcolor.y) SetShaderFloat(shader, "depthcolorb",self.depthcolor.z) SetShaderFloat(shader, "depthcolora",self.depthcolor.w) SetShaderFloat(shader, "lightambient",self.ambientintensity) --Use the invisible material and hide the model self.model:Paint(LoadMaterial("abstract::invisible.mat"), 0) self.model:Hide() if self.useModel ~= nil then self.useModel:Paint(mat) self.useModel:UpdateLocalAABB() self.useModel:UpdateAABB() self.useModel:SetColor(self.model.color) end --Switch back to the main world SetWorld(fw.main.world) end end function object:UpdateMatrix() if fw~=nil then if object.useModel ~= nil then self.useModel:SetPosition(object.model:GetPosition(0)) self.useModel:SetRotation(object.model:GetRotation(0)) self.useModel:SetScale(object.model:GetScale(0)) end end end function object:UnlockKeys() self.super:UnlockKeys() self:Refresh() end function object:Free(model) local model,entity for model,entity in pairs(self.class.instances) do if entity~=self then entity:Refresh() break end end if self.useModel ~= nil then self.useModel:Free() self.useModel=nil end --self.super:Free() --Notify("Inside free") end end PS: i think it would be a good idea to have "effect_ambient" and "effect_sundirection" as a global with the dynamic "night&day" emitting these shader values but couldnt take a look into it further. hth
  4. @mumbles - i dont questioning skills ... how could i. By bumping the fine detail of linux however you have to live with remarks, every now and again me thinks.
  5. erm ... dont use example code i am posting while figuring stuff out myself - in that matter do we talk about throwing a physics controller into the scene while still loading the map (the latest bit i posted) or using appspeed to equalise framerates. 1. load the gamedata / map, force pause screen and let the player enter/spawn into a stable environment. or. 2. use VsyncOn and live with the 60 fps or cap the frames yourself (timebased rendering vs. framebased). Dont take every bit as granted - we all work from different preconditions ... imho.
  6. The releases so far do kind of puzzle me ... i could run all builds with your first release never going out of "fade_screen" however. I suggest to go two steps back and dont complicate things for starters. Build samples for features, get into app design and assemble it into smaller builds till you tackle your game code as such. if(Fullscreen) Graphics(Width,Height,32); else Graphics(Width,Height); Could be just "Graphics(Width,Height,fullscreen);" with a const int fullscreen = 32; or not. You have two "noise.dll" in your shader.pak - causing errors or white halos at least. For the AppSpeed() issues i suggest to simply spawn 200+ dynamic objects to let them tear down your fps - the old sample map for the gameLib had a pyramid of of bodys for that matter. In my case its the other way around and i simply can use a 640x480 resolution to get 120+ fps while i usually have my inGame scenes at ~60 fps. Now the evil part - as a developer, i usually do not download .exe files because its a sample/test build i do, however. 1. put a "build.txt" or something in the zip with a date and some keyboard settings at least ! 2. your "config your screenRes from console build" (see what i mean with build.txt) somewhat archives its settings ! 3. the build before (which all other couldnt run) was stable at 29 - 32 fps - the "consoleRes" version jumps back to initial spawn position now and then which i cant track down to issue ... the later two are most evil because its bad behaviour imho ... a crash could be tracked down, some strange behavior just looks like bad hacking. Even worse would it be to save random config files into the path of random user profiles (who ever is in charge by the time of execution) or to install additional software secretly in the background, however ... avoid that. Sys spec`s are in my sig, hth. [edit] : ... and dont listen to Mumbles, she`s experimenting a lot with all kinds of strange systems.
  7. FYI : Because its not quickload but scene change i dont know if clearing the world will do ... or what happens with the data if its memory isnt free`d. that is from some lua engine.exe fps-sample if KeyHit(KEY_F1)==1 then FreeFramework(fw) fw=CreateFramework() SetGlobalObject("fw",fw) g_playerstart = nil scene=LoadScene("abstract::SceneParaTropique_GTownCamp.sbx") g_playerstart = scene:FindChild("playerstart") playercreation() dofile("sample_Player_Fps.lua") end if KeyHit(KEY_F2)==1 then FreeFramework(fw) fw=CreateFramework() SetGlobalObject("fw",fw) g_playerstart = nil scene=LoadScene("abstract::SceneParaTropique_GTownCamp.sbx") g_playerstart = scene:FindChild("playerstart") playercreation() dofile("sample_Player_Fps.lua") end ... which works because of the differance of who`s client<>host.
  8. OK - "ResetFramework()" simply seams to do the trick in my case ... some hours wasted to code functionality which already is implemented.
  9. Hi, i want to convert my sceneLoader C source to c++ and hit a wall with retrieving the lua state for using its transparency script settings ... this is/should all be frameWork. The entities in question are not handled within ProcessScene(), are the usual suspects firepit, waterplane and the atmosphere but loading fine first time around. from the engine.log Loading script "c:/devlab01/le23sample/vs2008_proto_arena_01/media/engine/models/props/firepit/firepit.lua"... Lua error: c:/devlab01/le23sample/vs2008_proto_arena_01/media/engine/models/props/firepit/firepit.lua:25: attempt to index field 'transparency' (a nil value) I init lua like this : // -- // Set Lua framework object SetGlobalObject( "fw", fw ); // Set Lua framework variable BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); // ... i brute force reLoading in the main loop like this : // -- // Prepare App for new sceneLoad if( KeyHit(KEY_F5) ) { FreeFramework(fw); fw = CreateFramework(); // Set Lua framework object SetGlobalObject( "fw", fw ); // GfxSetup // -- SetBloom( true ); SetHDR( true ); SetGodRays( false); SetSSAO( false ); SetAntialias( true ); SetReflectionElements(ENTITY_MESH | ENTITY_MODEL | ENTITY_TERRAIN); playerIndex01.~cController(); // -- // recreate layer_world for new framework TLayer _layer_main; TLayer _layer_background; TLayer _layer_transparency; _layer_main = GetFrameworkLayer(0); _layer_background = GetFrameworkLayer(-1); _layer_transparency = GetFrameworkLayer(1); // Set its global vars for lua ... SetGlobalObject ("main.world", _layer_main ); SetGlobalObject ("transparency.world", _layer_transparency ); SetGlobalObject ("background.world", _layer_background ); playerIndex01.SetCamera( GetLayerCamera(_layer_main) ); playerIndex01.CreatePlayer(); // -- scene.~cScene(); scene.Load( "abstract::SceneParaTropique_GTownCamp.sbx" ); // add camera from scene PositionEntity( playerIndex01.GetCamera(), scene.GetCameraPos() ); RotateEntity( playerIndex01.GetCamera(), scene.GetCameraRot() ); // add controller from scene camera PositionEntity( playerIndex01.GetPlayer(), scene.GetCameraPos() ); } As you can see i even tried to pass framework layers with "SetGlobalObject" - however, i just want to assign/get the previous lua state back to use fw.transparency etc ... hint&help appreciated
  10. If generating a navgraph one usually removes non-valid edges between nodes in a post step e.g. if a node is inside a entity aabb remove the node or if node A cant see node B ( blocked by a wall ) dont link these nodes ( north-west-south-east ). MG had something implemented for dynamic obstacles - i dont know how he solved that, however.
  11. I tidy up some of my stuff and realise that 2.5 is somewhat falling behind earlier releases in terms of included content or does contain slight outdated material ... since josh got his head running leadwerks3D - i like to suggest to make it a little easier for him maintaining future (final ?!) builds of leadwerks 2.x and have the community find those loose ends. e.g. -the light fixture "Hanginglight" seams to be no longer a physical object -the switch shader "switch.frag" is missing the normalmap slot ... thats how it appears to me at least - there is possible more. Ill start and add the missing shader line to the bug tracker. thx for reading [edit] - forget the "switch.frag" - seams to be fixed already.
  12. Leadwerks has a "custombuffer" - i used to render le`s framework to a custom openGL context but the upload got lost during the forum database mismatch some time ago. PS: "fallthrough" was suggested by using librocket`s "spacegame" demo.
  13. Dont post try out code if you got the source. I pointed out that the dll is picky about its file paths (material, dll, video path). It could be anything from your description ... even more so with the "try out" code. put the video in the root e.g. same level as the scripts folder and work from a sample which only is there to get that thing done - no other stuff in its way.
  14. The ninja smiley already is way cooler as the wink one. However, some posts or look-at-me behavior of very special people often do demand something more ... since i cant autoplay an applause sound file, i like to request these smiley`s. thx for you coexistence
  15. iirc the lib was added by request and niosop just provided the tools. You fix it by integrating your video surface with given sample. Take care about the "video.mat", the dll path and the cleanup when the surface isnt needed anymore. CreateMaterial aint in for an abstract path in that case afaik. Ps : You seam to be something else then just lazy if you choose an image above the good old code tags. If i would need to point out what you might do wrong - i would need to rewrite your code .... people these days.
  16. So i can drag a highpoly car model into the scene and build a simple version with CSG from it to be used as physics collider or AI obstacle ? - i currently have to convert my Le SDK models to a 3D world studio format or use a bbox to do that.
  17. right - no sign of an eula is strange ... on the other hand, i did put up a lot of art assets as a starter w/o any license myself and since it looks like a students work i wouldnt mind. Defending the law is easy - using the internet - would be hard with real world brands ( VW, BMW, Porsche etc. ) or obviously "extracted" game content though. Game content usualy is obvious because of its well thought-out uv maps etc. I write a mail though - once "we can have it" ... can we ?
  18. Hey there - just found an offer which almost looks to good to be true. A whole lot of "lowpoly" cars ... max users ! - please take a look and consider converting the " lowpoly car-sets 1-6" from the given site. http://tinyurl.com/6t8opcq PS : you might ask why obj and not gmf ... the texture sheets might need to be merged down for inGame usage. tia
  19. depends ... with my sheer knowledge of shader programming i would say that one "reflect" beats two instances of "normalize" in terms of speed + processing vertexshaders is basically allways faster as fragmentshader processing but since i dont know what the compiled shader expect to be better, i play it save and say - add the old "cubecoord" instance to your .vert/.frag ... just the "varying vec3 cubecoord;" in the mesh.frag though. PS: iam not aware of random changes to some 2.5 shader ( insert funny EvilSmiley here).
  20. Very nice work ... perfectness screams "move your head" though - but in a cutscene one blending this into the skeleton setup i assume.
  21. tbh - thats not my work and i never had the files of the "river-nodes" from the showcase video ... which means, no projected caustics so far.
  22. FYI : Mirrors dont depicture reality ... its not there job - they instead show the shadow of a copy of reality. This might be no longer true if you rewire both of your brain halfes ... and as much as i know the manykinds - there properly exists a drug for that too ... good luck !
  23. You close your topic with an "I`ll be back" ... isnt that just a little "over the top".
  24. Hrm, thats happen if i try it with the slang ... "game of death" is a bruce lee movie. ... same kind of leveling-up - if i understand correct.
  25. Historically you might be interested in the "way of the exploding fist 2" game, which diversificated (kind-of) into mortal-kombat : shaolin monks and Jade Empire ... or most likely not - because you are doing your own thing ... which looks/sounds good. PS: if you dont like to ancounter you tube for an walkthrough video - its basically like "game of death".
×
×
  • Create New...