Jump to content

Marleys Ghost

Members
  • Posts

    2,157
  • Joined

  • Last visited

Everything posted by Marleys Ghost

  1. Obviously not hence the Q lol .. but after reading your reply yes I can see where it might be useful .. unlike the other replies on this thread to a simple Q about the practical application.
  2. Quite a while now, current version is v3.22 ... V3 was released around the end of 2007 I think.
  3. ok .. so theres no real practical application?
  4. Well Control is always good, but I was wondering about the practical application.
  5. I read the thread does that count as making a start Robin?
  6. Well it was on the PSP Development Forum ....
  7. yeah I see now ... and you thought it would be plug and play ?
  8. from a discussion in the PSP Development Forum ?
  9. you are not going to manage to scale the solar system very well to LE units I dont think. You may well have to fake it along the way.
  10. Here I converted your code over to use Framewerk just make sure you point the Abstract path to your SDK folder and have the DLL's , shader.pak and scripts folder in your app folder: #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("PATH TO YOUR SDK FOLDER"); Graphics(800,600); AFilter(4) ; TFilter(1) ; TWorld world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera cam=GetLayerCamera(layer); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); // Setup Initial Post Processing FX SetGodRays(0); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetStats(2); LoadScene("abstract::tunnels.sbx"); TController player=CreateController(); EntityType(player, 1); SetBodyMass(player, 1); SetBodyDamping(player,0.0); SetWorldGravity(Vec3(0,-20,0)); PositionEntity(player, Vec3(38.9101448,6.67733288,1.72972393)); float move=0.0, strafe=0.0; TVec3 camrotation=Vec3(0); float mx=0, my=0; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { 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(cam,camrotation); move = 3 * (KeyDown(KEY_W) - KeyDown(KEY_S)); strafe = 3 * (KeyDown(KEY_D) - KeyDown(KEY_A)); //Jumping float jump=0.0; if (KeyHit(KEY_SPACE)) { if (!ControllerAirborne(player)) { jump=4.0; } } //Run if (KeyDown(KEY_LSHIFT)||KeyDown(KEY_RSHIFT)) { if (!ControllerAirborne(player)) { move*=2.0; strafe*=2.0; } } UpdateController(player, camrotation.Y, move, strafe, jump, 500.0f); //Position the camera TVec3 playerpos=EntityPosition(player); TVec3 camerapos=EntityPosition(cam); camerapos.Y=Curve(playerpos.Y+1.75,camerapos.Y,2.0); camerapos=Vec3(playerpos.X,camerapos.Y,playerpos.Z); camerapos=Vec3(playerpos.X,camerapos.Y,playerpos.Z); PositionEntity(cam,camerapos); UpdateFramework(); RenderFramework(); // Send to screen Flip(0) ; } } }
  11. You might also think about using Framework saves a lot of hassle and setup. http://leadwerks.com/werkspace/index.php?/topic/381-scene-loading-example/page__view__findpost__p__5665 But after trying out your code it seems it was simply the position of the controller when spawned, it was half way through the floor.
  12. Your welcome glad that little mystery is solved for you
  13. have you sync'd lately as I can get the issue with your compiled .exe but if I change the DLL's ect to the ones I currently have from the latest sync it seems to fix it.
  14. Would no have thought (in this case) it was as we seem to have the same card.
  15. Or as a test if you have not moved anything in the standard Tunnels.sbx : Try: PositionEntity(player, Vec3(29.3175259,3.12580490,-18.8330040));
  16. Try positioning the camera in the editor to a place inside the map thats above a surface then open the .sbx file in notepad and use the camerapositon co-ordinates to set the position of the controller , see if that helps.
  17. You're welcome has it helped fix your problems?
  18. Nope I have flown all round it .. up down left right back forward ... can't get that to happen. I am using your code as is except for a RegisterAbstractPath to my SDK directory, and the model and sbx you supplied.
  19. When you have the script for the object set, double clicking the object in the scene will bring up its propeties box.
  20. Make sure you have a lua scriptfor the model to set its collisions, right click the models icon in the right hand window of the editor, select view script. if its blank add: require("scripts/class") local class=CreateClass(...) and save, then double click the model and set the collision under the Physics tab.
  21. Thats the point, if your .gmf is not at the controllers position, (or of course the controller is not at the "models" postion) and large enough for the controller to "land" on and set to "scene" in its properties then you will have problems.
×
×
  • Create New...