Jump to content

flachdrache

Members
  • Posts

    397
  • Joined

  • Last visited

Posts posted by flachdrache

  1. It seams to be no longer in the download section - if there is no LEBuilder sample which contains the "scene loader utility.cpp" then you might post him about a re-release. Utilitys are most likely included in the gamlib source base too - it does thinks a little different and uses "framewerk" iirc, which doesnt matters for the helper/utillity functions though.

     

    Finally the "scripts" folder holds some lua versions like :

     

    -- // ...
      local toStart=string.Explode(moveToStart,",")
      x=tonumber(toStart[1])
      y=tonumber(toStart[2])
      z=tonumber(toStart[3])
      self.model:SetPosition(Vec3(x,y,z))
    

     

    ... which uses "," as delimiter which would be faster with a smaller memory footprint imo. ;)

  2. There was a collection of utility functions in the old scene loader sample. You may find those by searching the forum or download the old source. I, however, took this from the utility.cpp from rolands c++ scene loader sample - which might be a better choise because its more up-to-date.

     

    TVec3 StringToVec3( const string& s, char delimiter  )
    {
    stringstream ss ;
    ss << s ;
    
    TVec3 v ;
    if( delimiter == ' ' )
     ss >> v.X >> v.Y >> v.Z ;
    else
    {
     char d1, d2 ;
     ss >> v.X >> d1 >> v.Y >> d2 >> v.Z ;
    }
    return v ;
    }
    

     

    hth

  3. What ? ...

    Iam pretty sure we agreed in some topic that "UpdateFramework()", just like "UpdateFramewerk()", does call an update on world and AppTime already - and that a second use of update calls does nothing but to make the ups displayed wrong.

     

    void Framewerk::Update()
    {
    UpdateAppTime();
    SetWorld( background.GetWorld() );
    UpdateWorld( AppSpeed() );
    SetWorld( transparency.GetWorld() );
    UpdateWorld( AppSpeed() );
    SetWorld( main.GetWorld() );
    UpdateWorld( AppSpeed() );
    }
    

     

    Dont get me wrong - i talk about framework here but i had the intention it should look quit similar ... the version differences are getting on my nerves.

     

    ... "UpdateWorld()" is in charge for updating the physics as well afaik - calling it two times should/would/could fobaring quit a lot.

     

    Can this be clarified for real this time ?!

  4. iirc i couldnt stream the video and had to use a "media" folder for the .ogg but the "Data" bit is actually the data.pak while the "Shaders.pak" is where the exe is. I have that sample "boxed" and not all media in the folder e.g. cant simply rebuild and test it atm.

  5. I had no issues with using it in 2.31 - i dont remember if i had to set the default path to where the pak file actually is ...

     

    i have it setup like this :

     

    Initialize();
    
    
    // RegisterAbstractPath("C:/Leadwerks Engine SDK/");
    
    // Standalone :
    // copy archive of shaders/data into main and set values as needed.
    RegisterAbstractPath("./Data");
    RegisterAbstractPath("./Media");
    
    SetZipStreamPassword("Shaders.pak", "schlumperdingeryohoho");
    
    TFramework fw = CreateFramework();
    
    if( fw == NULL ) return FALSE; 
    
    // Set Lua framework object	   
    SetGlobalObject( "fw", fw );			   
    
    // Set Lua framework variable
    BP lua = GetLuaState();
    
    // ....
    
    

  6. - door flickers in open state if coming down the stairs

    - some invisible objects i can step on (might be snd emitters or such)

    - staying between the two controllers, looking at the boobs, dropped the fps to 3-6 fps (controller update)

    - i was able to strafe into the small wooden cart, got pushed through the terrain and the app crashed with no info

    - the game time does not advance for me here

     

    ... iam around 30 FPS because of my setup - might be the reason for most of the issues.

     

    Looking good - i like the take/examine feature for the inventory ... even dropped the key (of course).

    The sounds are nice but i guess the birds shadow does add the most real-life like feeling to the scene.

  7. Hmmmm, chrome tried and asked but kept the exe locked . I allowed it, then winXP restricted the execution. After a good minute, win gave up and crashed with the windows "i dont know" app error -

    Fehlgeschlagene Anwendung kingdom of soul.exe, Version 0.0.0.0, fehlgeschlagenes Modul , Version 0.0.0.0, Fehleradresse 0x00000000.
    

     

    Some debugger and even glIntercept cant output any error.log so far.

  8. Interesting, I've never really noticed that!

     

    I doubt that the editor is able to show the scenes in such a condition - he most likely doesnt had the filter settings in his sample + some pretty low screenresolution.

     

     

    At some point josh provided the less compressed, highres terrain textures for licensed leadwerks users for a limited time ... at first i thought that not having them could have been the issue - it usually looks much, much better - even if dds textures can be borked to a point at which no filter will save the day. I actually cant understand why artists work 14 days on highres models and distribute the extracted normalmaps in .jpg or compressed dds files ... "ok - iam done ... that was hard ... now lets destroy it".

     

    So, if you bring in your own art this might not be the norm ... a little "comparison".

     

    Left the default road_node texture - right the high-res terrain textures.

    >>link because screenres<<

  9. One usually just needs a good texture editor and a mass viewer like irfanView ... gimp with the dds & normalmap plugin .. dont miss the CeGui layout plugin, if you work with that. PSP was the all time awesome program for alpha channel and texture mixing tasks ... thx to you photo editing, red-eye removers - it was left-behind and we all now have to life with the mediocre - since psp 7 seams to keep crashing with winXP sp3 and up.

     

    http://portableapps.com/apps
    

  10. I do not exactly "destroy/delete" structures but reInit them with scene values ... e.g. the camera gets places at an "info_player" which is fetched on scene load.

     

      // --
      // Prepare App for new sceneLoad
      if( KeyHit(KEY_F5) )
      {
       ResetFramework();
       playerIndex01.~cController();
       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() );
      }
      else if( KeyHit(KEY_F6) )
      {
       ResetFramework();
       playerIndex01.~cController();
       playerIndex01.SetCamera( GetLayerCamera( _layer_main ) );
       playerIndex01.CreatePlayer();
       scene.~cScene();
       scene.Load( "abstract::SceneParaTropique_GTownBlank.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() );
      }
    

     

    Which means on start of the game and only the menu comes up (going back to menu in your case) i have a default.sbx scene loaded with a controller in the background. I do this to keep some "game assets" around which keeps load times somewhat shorter and for the menu background world.

     

    If a "CreatePlayer" has to add a controllable player or just the camera could be fetched with Set/GetKey for init_spawnpoint Vs. player_spawnpoint ... Load/Save belongs to "CreatePlayer" then imo.

     

    a little dodgy to explane but hth ...

  11. I am not too sure about when stuff gets called ... e.g. onReset() Vs. doReset() would have been more clear. I`ll test that out again then ... the issue iam having is to build positionable game entity`s w/o disturbing the update loop. A combination of Reset() and UnlockKeys() does work currently but going for random tests is not a preferable task ... but you know that.

  12. from switch.lua - does this actually mean something or is it outdated...

     

    function object:Reset()
       self.model:SetKey("active","0")
       self.model:SetKey("valuetouse","1")
       self.model:SetKey("keytoset0","active")
       self.model:SetKey("arguments","self.active")
       self.model:SetKey("message0","Run Code")
       self.model:SetKey("message1","Activate")
       self.model:SetKey("reloadafterscript","1")
       self.disable = 0 
    end
    

     

    thx

  13. "Cover nodes" ...

    i like to think about it this way - everything the agent cound use is an object. A door, a ladder, a cover point doesnt matters. If the agent is in range of such an object it simply can be used (state machine - onEnter/onExit for animations etc.). In terms of a cover the team ai might be attracted to such special nodes - might even giving it higher priority as player orders which sometimes is used as "aiTrustsPlayer". If you order your AI well they follow you, if you send them into open fire they trust cover points more etc.

  14. Unfortunately i still do have some gameplay related classes to write for my lua [debug] framework ... it`ll speed up implementation and testing a lot for me so it needs to be done.

     

    I think with EKI One and by the ruleset of fps-stealth gameplay - going the event trigger route is the best bet. Ill implement that as a gimmick into my "debug" framework too, just because there are events which need to be broadcasted and i won`t have Eki One available for that. I actually plan to make my fps-bot project available for us users but only as a Eki project which everybody will need to change/extend for one`s own usability.

     

    I still dont know how i can use the "new" navGrid for terrain reasoning e.g. the big path and not the fine detail local navmesh ... i assume i can switch from grid to mesh if the goal says so but ill have to figure that out. Thats the latest helpfile right ?! I can jump from "Grid world structure" to "World structure" but tagging and switching isnt realy explained afaik.

     

    thx for your work anyways :P

     

    Ps :

     

    BlockWorldElement
    BlockWorldElementForCurrentMovement
    BlockWorldElementForMovementDefault
    ...
    

  15. I wrote a 3x3 grid of planes treadmill. Currently the whole grid is repositioned if the camera would exiting the range of 1 tile size (from center to center). Obviously that just works if the camera if following n/s/w/e exactly (the tilable texture dictates) - if going diagonal the camera is located between the tiles and repositioning does "snap" the view/grid to the center of the treedmill again (very noticable because of the tilable texture).

     

    question :

    How do i rewrite the grid repositioning to find the exact opposite point ?

     

    currently :

    
    require("scripts/class")
    require("scripts/constants/collision_const")
    local class=CreateClass(...)
    function class:CreateObject(model)
    local object=self.super:CreateObject(model)
    -- Load all the parts for the 3x3 grid
    -- & setup
    --[[
     \ | / patch 1, 2, 3
     - o - patch 4, 5, 6
     / | \ patch 7, 8, 9
    --
    --]]
    local oldViewPos
    local newViewPos
    local patchPos
    local viewLevel = -1.0
    function object:Init()
     patchPos = Vec3(0,0,0)
     patchPos.y = patchPos.y + viewLevel
     self.model:SetPosition(patchPos)
     oldViewPos = self.model.position
     newViewPos = fw.main.camera.position
     -- preSetup w/o update
     --
     self.treadmill_patch1:SetPosition( Vec3(patchPos.x-340, patchPos.y, patchPos.z+340), 1)
     self.treadmill_patch2:SetPosition( Vec3(patchPos.x, patchPos.y, patchPos.z+340), 1)
     self.treadmill_patch3:SetPosition( Vec3(patchPos.x+340, patchPos.y, patchPos.z+340), 1)
     self.treadmill_patch4:SetPosition( Vec3(patchPos.x-340, patchPos.y, patchPos.z), 1)
     self.treadmill_patch5:SetPosition( Vec3(patchPos.x, patchPos.y, patchPos.z), 1)
     self.treadmill_patch6:SetPosition( Vec3(patchPos.x+340, patchPos.y, patchPos.z), 1)
     self.treadmill_patch7:SetPosition( Vec3(patchPos.x-340, patchPos.y, patchPos.z-340), 1)
     self.treadmill_patch8:SetPosition( Vec3(patchPos.x, patchPos.y, patchPos.z-340), 1)
     self.treadmill_patch9:SetPosition( Vec3(patchPos.x+340, patchPos.y, patchPos.z-340), 1)
    end
    object.treadmill_patch1=LoadModel("abstract::treadmill_patch1.gmf")
    object.treadmill_patch2=LoadModel("abstract::treadmill_patch2.gmf")
    object.treadmill_patch3=LoadModel("abstract::treadmill_patch3.gmf")
    object.treadmill_patch4=LoadModel("abstract::treadmill_patch4.gmf")
    object.treadmill_patch5=LoadModel("abstract::treadmill_patch5.gmf")
    object.treadmill_patch6=LoadModel("abstract::treadmill_patch6.gmf")
    object.treadmill_patch7=LoadModel("abstract::treadmill_patch7.gmf")
    object.treadmill_patch8=LoadModel("abstract::treadmill_patch8.gmf")
    object.treadmill_patch9=LoadModel("abstract::treadmill_patch9.gmf")
    object.treadmill_patch1:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch2:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch3:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch4:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch5:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch6:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch7:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch8:SetCollisionType( COLLISION_SCENE, 0 )
    object.treadmill_patch9:SetCollisionType( COLLISION_SCENE, 0 )
    --parent all parts to form the model
    --
    object.treadmill_patch1:SetParent(object.model)
    object.treadmill_patch2:SetParent(object.model)
    object.treadmill_patch3:SetParent(object.model)
    object.treadmill_patch4:SetParent(object.model)
    object.treadmill_patch5:SetParent(object.model)
    object.treadmill_patch6:SetParent(object.model)
    object.treadmill_patch7:SetParent(object.model)
    object.treadmill_patch8:SetParent(object.model)
    object.treadmill_patch9:SetParent(object.model)
    --object handling will now be performed relative to its parent
    --
    object.treadmill_patch1:SetPosition(object.model.position, 1)
    object.treadmill_patch1:SetRotation(object.model.rotation, 1)
    object.treadmill_patch2:SetPosition(object.model.position, 1)
    object.treadmill_patch2:SetRotation(object.model.rotation, 1)
    object.treadmill_patch3:SetPosition(object.model.position, 1)
    object.treadmill_patch3:SetRotation(object.model.rotation, 1)
    object.treadmill_patch4:SetPosition(object.model.position, 1)
    object.treadmill_patch4:SetRotation(object.model.rotation, 1)
    object.treadmill_patch5:SetPosition(object.model.position, 1)
    object.treadmill_patch5:SetRotation(object.model.rotation, 1)
    object.treadmill_patch6:SetPosition(object.model.position, 1)
    object.treadmill_patch6:SetRotation(object.model.rotation, 1)
    object.treadmill_patch7:SetPosition(object.model.position, 1)
    object.treadmill_patch7:SetRotation(object.model.rotation, 1)
    object.treadmill_patch8:SetPosition(object.model.position, 1)
    object.treadmill_patch8:SetRotation(object.model.rotation, 1)
    object.treadmill_patch9:SetPosition(object.model.position, 1)
    object.treadmill_patch9:SetRotation(object.model.rotation, 1)
    function object:Update()
     local distance
     local range	 = 340
     patchPos = fw.main.camera:GetPosition()
     patchPos.y = viewLevel
     distance = PointDistance(oldViewPos, newViewPos)
     print(" distance : ", tonumber(distance) )
     if ( distance > range) then
     print("exiting range : ", tonumber(distance) )
    -- ?!
    -- ?!self.model:SetRotation(Vec3(0,self.model.rotation.y+fw.main.camera.rotation.y,0), 1)
    -- ?!
     patchPos.x = newViewPos.x-range
     patchPos.z = newViewPos.z+range
     self.treadmill_patch1:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch1:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x
     patchPos.z = newViewPos.z+range
     self.treadmill_patch2:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch2:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x+range
     patchPos.z = newViewPos.z+range
     self.treadmill_patch3:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch3:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x-range
     patchPos.z = newViewPos.z
     self.treadmill_patch4:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch4:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x
     patchPos.z = newViewPos.z
     self.treadmill_patch5:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch5:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x+range
     patchPos.z = newViewPos.z
     self.treadmill_patch6:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch6:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x-range
     patchPos.z = newViewPos.z-range
     self.treadmill_patch7:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch7:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x
     patchPos.z = newViewPos.z-range
     self.treadmill_patch8:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch8:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     patchPos.x = newViewPos.x+range
     patchPos.z = newViewPos.z-range
     self.treadmill_patch9:SetPosition( patchPos, 1)
    -- ?!self.treadmill_patch9:SetRotation(Vec3(0,fw.main.camera.rotation.y,0), 1)
     oldViewPos = fw.main.camera:GetPosition()
     oldViewPos.y = viewLevel
     end
    end
    --[[
    function object:Collision(entity,position,normal,force,speed)
    end
    ]]--
    --[[
    function object:UpdateMatrix()
     self.treadmill_patch1:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch1:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch2:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch2:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch3:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch3:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch4:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch4:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch5:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch5:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch6:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch6:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch7:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch7:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch8:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch8:SetRotation(self.model:GetRotation(0), 1)
     self.treadmill_patch9:SetPosition(self.model:GetPosition(0), 1)
     self.treadmill_patch9:SetRotation(self.model:GetRotation(0), 1)
    end
    ]]--
    object:Init()
    function object:Free(model)
     self.super:Free()
    end
    end
    
    

     

    PS : you might ignore "object:init()" and "object:UpdateMatrix()" plus you might replace ":update()" with ":draw()".

     

    tia

  16. had been outsmarted by fuzzy logic because fuzzy defines what a agent/bot wants to goal in relationship of what is resonable in a certain situation - last thing i road however is that neural nets are considered practical in city-raceGames.

     

    quake2 is still the best solution to learn/test/debug AI ...

     

    link :

    http://botepidemic.no-origin.net/neuralbot/index.htm
    

     

    give`em pain & hf ;)

    • Upvote 2
  17. Leadwerks light`s do allow us to use a projected textures as lightfilter ... these are just 2d textures though. If someone is able to compute the vec3 texcoord for cubemap projections in the pointlight.frag shader, please contribute your solution !

     

    What it does ...cubemap projected lights are an old trick to display "fake" volumetric lighting used for water caustics, gas lanterns, disco lights and other light related fx ...

×
×
  • Create New...