Jump to content

Marleys Ghost

Members
  • Posts

    2,157
  • Joined

  • Last visited

Everything posted by Marleys Ghost

  1. Sounds good, but no matter what it is definately impressive stuff.
  2. Now that's excellent, very good watching the video, would it be possible using this approach to use more than one video info node to handle diffrent videos?
  3. Considering all the unistall's and re-installs of the winSDK and visual studio in the last few days that I have done I think I broke everthing can someone confirm the correct procdure for file placement (dll/lib/.h's) for the libtheoraplayer-1.0RC1? I keep getting linker errors
  4. There was an issue Omid had using that particular exporter Here not sure if this was resolved with the exporter. But you would need to create a lua script to set the properties which can be done with: require("scripts/class") local class=CreateClass(...) Which would allow the setting of the collisions and also the mass.
  5. Do you mean uneffected by physics (gravity, no collisions)?
  6. In the Editor under terrain > Altitude : default is 100
  7. Convert to DXT5 and generate mipmaps with the DirectX Texture tool, see if that helps.
  8. Just the physics file? are these acorns from an Oak tree near Chernobyl or are you from Lilliput ? Thanks Gimpy
  9. You do realise you are filling up my HDD ? lol .. thanks Gimpy another useful prop(s)
  10. cool, I like this thanks Gimpy.
  11. Try something like this to check: shader="abstract::mesh_diffuse_bumpmap_skin.vert","abstract::mesh_diffuse.frag" shadowshader="abstract::mesh_shadow_skin.vert",""
  12. Basic 3rd Person Camera If you have used the Simple Scene Loader with Player Controller in Blitzmax, this is a small addition to it that will change the camera view to 3rd person. The additions to the Simple Scene Loader code are enclosed in dashed lines. I hope this will be of some use to someone. SuperStrict Framework leadwerks.engine Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx" Include "lua-gluefunctions.bmx" AppTitle:String = "3rd Person cam test" GCSetMode(2) 'Register the directory under which the abstract file system will search. RegisterAbstractPath("PATH TO YOUR 2.3 SDK FOLDER") 'Create a Graphics window Graphics(800, 600) AFilter(1) 'Set the anisotropic filter. Range 1-16 'Using AFilter(MaxAFilter()) will use the maximum supported anisotropic filter on your PC 'Adding the line "DrawText ("MaxAFilter = " + MaxAFilter(), 0, 80)" 'after "fw.Render()" will display on screen the maximum supported anisotropic filter. TFilter(1) 'Set trilinear filtering : 0 = off : 1 = on. 'Create a new Framework object. Global fw:TFramework = TFramework.Create() If Not fw RuntimeError "Failed to initialize engine." SetScriptObject("fw", fw)'Setup the global script objects. SetPostFX()'Setup the post processing FX SetVegetationShadowMode(0)'Setup vegetation layer shadows : 0 = off : 1 = on. 'Load the scene. Global scene:TEntity = LoadScene("abstract::YOUR_SCENE.sbx") 'Setup the player controller. Global player:TController = CreateController(2.0) PositionEntity(player, StringToVec3(scene.getkey("cameraposition"))) EntityType(player, 3) SetBodyMass(player, 50.0) SetBodyBuoyancyMode(player,0) Collisions(1, 3, 3) 'Setup the player movement variables. Global move:Float = 0.0 Global strafe:Float = 0.0 Global camrotation:TVec3 = Vec3(0) Global mx:Float = 0.0 Global my:Float = 0.0 Global jump:Float = 0.0 Global playerpos:TVec3 = Vec3(0) '-------------------------------------------------------------------------------- 'Setup the player character model Global player_body:TEntity = CreateCube() ScaleEntity(player_body,Vec3(0.5,1.8,0.5)) playerpos = EntityPosition(player) PositionEntity(player_body,playerpos) EntityParent(player_body,player) 'Setup the camera pivot Global campiv:TPivot = CreatePivot() playerpos.Y = playerpos.Y + 0.80 PositionEntity(campiv,playerpos) '-------------------------------------------------------------------------------- HideMouse() 'Set stats level : 0 = No statistics : 1 = Show frame rate : 2 = Full statistics. fw.SetStats(2) 'Main program loop. Repeat If KeyHit(KEY_ESCAPE) Exit If AppTerminate() Exit UpdateAppTime() UpdateWorld(AppSpeed()) PlayerController() fw.Update() fw.Render() Flip(0) Forever fw.renderer.gbuffer = Null GCCollect() End 'Functions. Function SetPostFX()'0 = off : 1 = on. fw.renderer.SetAntialias(1) fw.renderer.SetBloom(1) fw.renderer.SetGodRays(1) fw.renderer.SetHDR(1) fw.renderer.SetSSAO(0) fw.renderer.SetWireFrame(0) End Function Function PlayerController() mx = Curve(MouseX() - GraphicsWidth() / 2, mx, 6) my = Curve(MouseY() - GraphicsHeight() / 2, my, 6) MoveMouse(GraphicsWidth() / 2, GraphicsHeight() / 2) camrotation.X = camrotation.X + my / 10.0 camrotation.Y = camrotation.Y - mx / 10.0 '-------------------------------------------------------------------------------- RotateEntity(campiv,camrotation) '-------------------------------------------------------------------------------- move = KeyDown(KEY_W) - KeyDown(KEY_S) strafe = KeyDown(KEY_D) - KeyDown(KEY_A) jump:Float = 0.0 If KeyHit(KEY_SPACE) & Not ControllerAirborne(player) jump = 4.0 End If If KeyDown(KEY_LSHIFT) | KeyDown(KEY_RSHIFT) move = move * 3.0 strafe = strafe * 3.0 End If '-------------------------------------------------------------------------------- playerpos = EntityPosition(player) playerpos.Y = playerpos.Y + 0.80 PositionEntity(campiv, playerpos) RotateEntity(fw.Main.camera,camrotation) PositionEntity(fw.Main.camera,playerpos) MoveEntity(fw.Main.camera, Vec3(0,0.5,-3)) '-------------------------------------------------------------------------------- UpdateController(player, camrotation.Y, move * 3, strafe * 3, jump, 500, 10) End Function Function StringToVec2:TVec2(text:String, scale:Float = 1.0) Local t:TVec2 = Vec2(1) Local sarr:String[] sarr = text.split(",") If sarr If sarr.length > 0 t.x = Float(sarr[0]) * scale If sarr.length > 1 t.y = Float(sarr[1]) * scale EndIf Return t EndFunction Function StringToVec3:TVec3(text:String, scale:Float = 1.0) Local t:TVec3 = Vec3(1) Local sarr:String[] sarr = text.split(",") If sarr If sarr.length > 0 t.x = Float(sarr[0]) * scale If sarr.length > 1 t.y = Float(sarr[1]) * scale If sarr.length > 2 t.z = Float(sarr[2]) * scale EndIf Return t EndFunction Function StringToVec4:TVec4(text:String, scale:Float = 1.0) Local t:TVec4 = Vec4(1) Local sarr:String[] sarr = text.split(",") If sarr If sarr.length > 0 t.x = Float(sarr[0]) * scale If sarr.length > 1 t.y = Float(sarr[1]) * scale If sarr.length > 2 t.z = Float(sarr[2]) * scale If sarr.length > 3 t.w = Float(sarr[3]) * scale EndIf Return t EndFunction Function SetScriptObject(name:String, o:Object) Local size:Int=GetStackSize() lua_pushbmaxobject(luastate.L,o) lua_setglobal(luastate.L,name) SetStackSize(size) EndFunction Function GetStackSize:Int() Return lua_gettop(luastate.L) EndFunction Function SetStackSize(size:Int) Local currentsize:Int=GetStackSize() If size<currentsize lua_pop(luastate.L,currentsize-size) EndIf EndFunction The above video is a screen capture of a small app that used together the following: Simple Scene Loader Basic Gamepad Control Basic 3rd Person Camera
  13. I think there is still an issue see Here in the tracker.
  14. [solved] Thanks for the above suggestion Lumooja
  15. Framewerk is now the seperate Framework and not a module. If you look in the BMX folder in the SDK it there are two folders Framework and Mod.
  16. I like that idea, could add a twist to in game puzzle solving by having to use the net as a resource ... maybe some parential controls too
  17. Cool, thanks for that Niosop and nice work Tyler
  18. I think maybe you are right, seems there were pitfalls with this approach. shame really it worked so well .. up to a point that is
  19. Well this is the code I am using, the additions to the Simple Scene Loader code are enclosed in dashed lines. I think it may well be the parenting. as removal of the parenting line clears up the reflection issue (of course the main cam then no longer functions as required lol) SuperStrict Framework leadwerks.engine Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx" Include "lua-gluefunctions.bmx" AppTitle:String = "3rd Person cam test" GCSetMode(2) 'Register the directory under which the abstract file system will search. RegisterAbstractPath("PATH TO YOUR 2.3 SDK FOLDER") 'Create a Graphics window Graphics(800, 600) AFilter(1) 'Set the anisotropic filter. Range 1-16 'Using AFilter(MaxAFilter()) will use the maximum supported anisotropic filter on your PC 'Adding the line "DrawText ("MaxAFilter = " + MaxAFilter(), 0, 80)" 'after "fw.Render()" will display on screen the maximum supported anisotropic filter. TFilter(1) 'Set trilinear filtering : 0 = off : 1 = on. 'Create a new Framework object. Global fw:TFramework = TFramework.Create() If Not fw RuntimeError "Failed to initialize engine." SetScriptObject("fw", fw)'Setup the global script objects. SetPostFX()'Setup the post processing FX SetVegetationShadowMode(0)'Setup vegetation layer shadows : 0 = off : 1 = on. 'Load the scene. Global scene:TEntity = LoadScene("abstract::YOUR_SCENE.sbx") 'Setup the player controller. Global player:TController = CreateController(2.0) PositionEntity(player, StringToVec3(scene.getkey("cameraposition"))) EntityType(player, 3) SetBodyMass(player, 50.0) SetBodyBuoyancyMode(player,0) Collisions(1, 3, 3) 'Setup the player movement variables. Global move:Float = 0.0 Global strafe:Float = 0.0 Global camrotation:TVec3 = Vec3(0) Global mx:Float = 0.0 Global my:Float = 0.0 Global jump:Float = 0.0 Global playerpos:TVec3 = Vec3(0) '-------------------------------------------------------------------------------- 'Setup the player character model Global player_body:TEntity = CreateCube() playerpos = EntityPosition(player) PositionEntity(player_body,playerpos) EntityParent(player_body,player) Global campiv:TPivot = CreatePivot() playerpos.Y = playerpos.Y + 0.80 PositionEntity(campiv,playerpos) PositionEntity(fw.Main.camera, Vec3(playerpos.X,playerpos.Y+1,playerpos.Z-3)) EntityParent(fw.Main.camera,campiv) '-------------------------------------------------------------------------------- HideMouse() 'Set stats level : 0 = No statistics : 1 = Show frame rate : 2 = Full statistics. fw.SetStats(2) 'Main program loop. Repeat If KeyHit(KEY_ESCAPE) Exit If AppTerminate() Exit UpdateAppTime() UpdateWorld(AppSpeed()) PlayerController() fw.Update() fw.Render() Flip(0) Forever fw.renderer.gbuffer = Null GCCollect() End 'Functions. Function SetPostFX()'0 = off : 1 = on. fw.renderer.SetAntialias(1) fw.renderer.SetBloom(1) fw.renderer.SetGodRays(1) fw.renderer.SetHDR(1) fw.renderer.SetSSAO(0) fw.renderer.SetWireFrame(0) End Function Function PlayerController() mx = Curve(MouseX() - GraphicsWidth() / 2, mx, 6) my = Curve(MouseY() - GraphicsHeight() / 2, my, 6) MoveMouse(GraphicsWidth() / 2, GraphicsHeight() / 2) camrotation.X = camrotation.X + my / 10.0 camrotation.Y = camrotation.Y - mx / 10.0 '-------------------------------------------------------------------------------- RotateEntity(campiv, camrotation) '-------------------------------------------------------------------------------- move = KeyDown(KEY_W) - KeyDown(KEY_S) strafe = KeyDown(KEY_D) - KeyDown(KEY_A) jump:Float = 0.0 If KeyHit(KEY_SPACE) & Not ControllerAirborne(player) jump = 4.0 End If If KeyDown(KEY_LSHIFT) | KeyDown(KEY_RSHIFT) move = move * 3.0 strafe = strafe * 3.0 End If '-------------------------------------------------------------------------------- playerpos = EntityPosition(player) playerpos.Y = playerpos.Y + 0.80 PositionEntity(campiv, playerpos) '-------------------------------------------------------------------------------- UpdateController(player, camrotation.Y, move * 3, strafe * 3, jump, 500, 10) End Function Function StringToVec2:TVec2(text:String, scale:Float = 1.0) Local t:TVec2 = Vec2(1) Local sarr:String[] sarr = text.split(",") If sarr If sarr.length > 0 t.x = Float(sarr[0]) * scale If sarr.length > 1 t.y = Float(sarr[1]) * scale EndIf Return t EndFunction Function StringToVec3:TVec3(text:String, scale:Float = 1.0) Local t:TVec3 = Vec3(1) Local sarr:String[] sarr = text.split(",") If sarr If sarr.length > 0 t.x = Float(sarr[0]) * scale If sarr.length > 1 t.y = Float(sarr[1]) * scale If sarr.length > 2 t.z = Float(sarr[2]) * scale EndIf Return t EndFunction Function StringToVec4:TVec4(text:String, scale:Float = 1.0) Local t:TVec4 = Vec4(1) Local sarr:String[] sarr = text.split(",") If sarr If sarr.length > 0 t.x = Float(sarr[0]) * scale If sarr.length > 1 t.y = Float(sarr[1]) * scale If sarr.length > 2 t.z = Float(sarr[2]) * scale If sarr.length > 3 t.w = Float(sarr[3]) * scale EndIf Return t EndFunction Function SetScriptObject(name:String, o:Object) Local size:Int=GetStackSize() lua_pushbmaxobject(luastate.L,o) lua_setglobal(luastate.L,name) SetStackSize(size) EndFunction Function GetStackSize:Int() Return lua_gettop(luastate.L) EndFunction Function SetStackSize(size:Int) Local currentsize:Int=GetStackSize() If size<currentsize lua_pop(luastate.L,currentsize-size) EndIf EndFunction
  20. ok, but am still not sure why the cameras in the other worlds require rotation because of the addition of a pivot? zoom too when zoom has not been changed in Main?
  21. So which is it then .. rotate the cameras or stop them rotating?
  22. well thats something I have been trying (still no luck yet) but why would that be the case? as the pivot is just another way to positon the main camera and I don't normally have to rotate/position the others in relation to the main camera.
×
×
  • Create New...