Jump to content

Benton

Members
  • Posts

    409
  • Joined

  • Last visited

Everything posted by Benton

  1. Benton

    Plugins

    No I think he means *engine* plugins, nothing for editor, but, like, GUI for games...at least thats what I think...
  2. Who bumped this 2009 thread?
  3. Benton

    LoadScene?

    Gahh, you saved my life Mac, I was going crazy. Thanks
  4. Benton

    LoadScene?

    Is this a bug or...? Edit: After playing around with it, It can't seem to find shaders...? I thing the whole project is messed up, so I will create it in a new directory...
  5. Benton

    Plugins

    Editor plugins would be nice too...
  6. Its good to see you are making progress with CSG. I have never worked with it before, but it looks like a really good way of making simple buildings and such. I am really excited for LE3's editor.
  7. +1 This would be really USEFUL!
  8. Really good. What tools do you use for this...? Photoshop?
  9. Benton

    LoadScene?

    Ok so I made a really simple script: require("Scripts/constants/keycodes") require("Scripts/linkedlist") require("Scripts/filesystem") require("scripts/math/math") require("scripts/constants/engine_const") ScreenWidth = 1200 ScreenHeight = 720 --Set graphics mode if Graphics(ScreenWidth,ScreenHeight)==0 then Notify("Failed to set graphics mode.",1) return end RegisterAbstractPath("") --Create framewerk object and set it to a global object so other scripts can access it fw=CreateFramework() if fw==nil then Notify("Failed to initialize engine.",1) return end SetGlobalObject("framewerk",fw) FlushKeys() --HideMouse() local camera = fw.main.camera local scene = LoadScene("abstract::mountianvalley.sbx") while KeyHit(KEY_ESCAPE)==0 do --Camera look fw:Update() fw:Render() Flip(0) end camera=nil ShowMouse() No scene gets loaded... engine.log: Leadwerks Engine 2.5 Initializing Renderer... OpenGL Version: 4.1.0 GLSL Version: 4.10 NVIDIA via Cg compiler Render device: GeForce GTX 460/PCI/SSE2 Vendor: NVIDIA Corporation DrawBuffers2 supported: 1 32 texture units supported. GPU instancing supported: 1 Max batch size: 64 Shader model 4.0 supported: 1 Conditional render supported: 0 Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//query.vert", ""... Invoking script "C:/Users/Benton/Documents/Leadwerk Projects/turning_heads/Scripts/start/collisions.lua"... Invoking script "C:/Users/Benton/Documents/Leadwerk Projects/turning_heads/Scripts/start/fliphook.lua"... Invoking script "C:/Users/Benton/Documents/Leadwerk Projects/turning_heads/Scripts/start/globals.lua"... Loading material "c:/leadwerks engine sdk/materials/cobblestones.mat"... Loading texture "c:/leadwerks engine sdk/materials/cobblestones.dds"... Loading texture "c:/leadwerks engine sdk/materials/cobblestonesdot3.dds"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse_bumpmap.vert", "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse_bumpmap_specular.frag"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.vert", "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/clearcolor.frag"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//guide.vert", "zip::c:/leadwerks engine sdk/shaders.pak//editor/guide.frag"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_shadow.vert", ""... Loading texture "incbin::noise.dds"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.vert", "zip::c:/leadwerks engine sdk/shaders.pak//lighting/directionallight.frag"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.vert", "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.frag"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.vert", "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/depthblit.frag"... Loading texture "incbin::Arial9.dds"... Now one thing I don't understand: why is it looking in c:/leadwerks engine...when it should be looking in the script directory...
  10. Benton

    LoadScene?

    LoadScene() is not working for me? require("Scripts/constants/keycodes") require("Scripts/linkedlist") require("Scripts/filesystem") require("scripts/math/math") require("scripts/constants/engine_const") ScreenWidth = 1200 ScreenHeight = 720 --Set graphics mode if Graphics(ScreenWidth,ScreenHeight)==0 then Notify("Failed to set graphics mode.",1) return end RegisterAbstractPath("") --Create framewerk object and set it to a global object so other scripts can access it fw=CreateFramework() if fw==nil then Notify("Failed to initialize engine.",1) return end SetGlobalObject("framewerk",fw) FlushKeys() --HideMouse() local camera = fw.main.camera local scene = LoadScene("abstract::mountianvalley.sbx") chassis=LoadModel("abstract::vehicle_monstertruck.gmf") carobject=objecttable[chassis] car=carobject.vehicle if car==nil then Notify("Vehicle object not found.",1) chassis:Free() return end chassis:SetPositionf(130, 5, 690) chassis:SetRotationf(0,camera.rotation.y+180.0,0) --Variables local dx=0.0 local dy=0.0 local camerapitch=camera.rotation.x local camerayaw=camera.rotation.y local move=0.0 local strafe=0.0 local steering = 0.0 local torque = 0.0 local steerlimit = 30.0 local steerrate = 2.0 local steerangle=0.0 local prevmouseX = 750 local changemouseX MoveMouse(Round(GraphicsWidth()/2),Round(GraphicsHeight()/2)) while KeyHit(KEY_ESCAPE)==0 do --Camera look gx=Round(GraphicsWidth()/2) gy=Round(GraphicsHeight()/2) --dx=Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed()) --dy=Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed()) --MoveMouse(gx,gy) camerapitch=camerapitch+dy camerayaw=camerayaw-dx camerapitch=math.min(camerapitch,45) camerapitch=math.max(camerapitch,10) fw.main.camera:SetRotationf(camerapitch,chassis.rotation.y-180,0,1) local tirespeed=-(KeyDown(KEY_UP)-KeyDown(KEY_DOWN))*1.0 car:AddTireTorque(tirespeed,0) car:AddTireTorque(tirespeed,1) car:AddTireTorque(tirespeed,2) car:AddTireTorque(tirespeed,3) steermode=0 changemouseX = MouseX() - prevmouseX turnrad = changemouseX/10 steerangle=steerangle-turnrad*AppSpeed() steerangle=Clamp(steerangle,-5,5) car:SetSteerAngle(steerangle,0) car:SetSteerAngle(steerangle,1) steerangle=Clamp(steerangle,-25,25) car:SetSteerAngle(steerangle,0) car:SetSteerAngle(steerangle,1) fw:Update() local campos=TFormPoint(Vec3(0,1,0),chassis,nil) fw.main.camera:SetPosition(campos) fw.main.camera:Move(Vec3(0,0,-10)) local t=TFormVector(Vec3(0,0,1),camera,chassis) a=-math.deg(math.atan2(t.x,t.z))+180.0 chassis:Hide() chassis:Show() fw:Render() Flip(0) end chassis:Free() chassis=nil camera=nil ShowMouse() It does not seem to be loading a scene, its black with the car loaded...no errors...the scene DOES exist...
  11. The problem I am having is not getting really realistic physics, but getting "the standard LE vehicle" working on my car model. But I don't understand why it is not working. For instance: chassis=LoadModel("abstract::monstertruck.gmf") carobject=objecttable[chassis] car=carobject.vehicle error: Attempt to index global carobject a nil value... I can't find any docs for objecttable[chassis] I just want to get the standard LE vehicle setup working for my model, thats it...
  12. Ok so I need to set up a car from scratch. Can I use some of the scripts that are already written, or do I need to totally write some new code?
  13. Benton

    Snow Day

    could use a bit of bloom...
  14. Thanks! Did not know that you needed that for objecttable...
  15. Hey guys, I am adding my car models into my racing game in place of the scout model that comes with LE. However, my model viewer crashes every time I try to view that scout model so I can't see how it is structured. How each part of the model is named, etc. Could someone help me set up my car model? Thanks, Benton Edit: The error I get when I change the chassis model to my chassis is: chassis=LoadModel("abstract::muscleblack.gmf") carobject=objecttable[chassis] car=carobject.vehicle Error: Attempt to index global 'carobject' a nil value...
  16. I don't know but 1.3 mil polys at 46 fps is expected...
  17. LOD distance to 4? And still not getting good FPS? Weird...
  18. Hey guys, How do you go about making a material shiny and reflective, so it reflects the enviroment around the model? Not quite like a mirror, more like a really glossy car... I have no clue how to do this Thanks, Benton
  19. I saw some water shaders in the shaders.pak file, I wonder if you could apply them to a smaller plane?
  20. What effects are you running? Also, turn off skype before you do any tests as it is a memory hog. I can run a million polys at 60 fps on my computer so maybe a problem with your drivers?
×
×
  • Create New...