Jump to content

ZioRed

Members
  • Posts

    1,133
  • Joined

  • Last visited

Everything posted by ZioRed

  1. Something like: Collisions(1, 2); TEntity scene = LoadScene("abstract::yourscene.sbx"); EntityType(scene, 2); TController player = CreateController(); EntityType(player, 1); SetBodyMass(player, 1);
  2. It seems that they missed to add or expose a SetCallback method in the Entity class like the one exposed in the Material class.
  3. Well I may love C++ when I will be enough forward in my training with it, but atm after almost 10 years of NET programming there is no comparable language as easy but powerful as NET... C++ is really too complex for me now, I must admit that it is really more powerful in term of performance etc but I still know too few about it to appreciate more.
  4. Well, I'm testing the wrapper just now to use for my project (since I don't like C/C++ and love C#) with the 1.2 beta version downloadable from that thread and it doesn't occur any error. If you are on a x64 machine perhaps you should use x86 build configuration (building x64/AnyCPU configuration it raised some errors on my Windows 7 64-bit). I used the code from the "C# Getting started" page on wiki, only using 800x600 as resolution instead of 640x480 and creating a Windows Form Project instead of a Blank Solution (still you need to copy the DLLs, shaders.pak and Scripts from LE SDK folder to your build executable folder).
  5. The downloadable map RAR in the topic contains the .SBX, .DDS and .RAW, it should be all: download here. Thank you in advance and sorry, I'm trying to code my first game at all PS: I'm almost thinking to ask for hire (pay per hour) someone from the community to help in this first times until I good understand how to play with the engine by myself.
  6. Nope, I already disabled all effects in the editor.
  7. Well I changed something as suggested and now the code is the following: TEntity light = CreateDirectionalLight(); RotateEntity(light, Vec3(45, 35, 0), 0); LightRange(light, 500); SetShadowmapSize(light, 1024); SetShadowDistance(light, 6, 0); SetShadowDistance(light, 20, 1); SetShadowDistance(light, 100, 2); AmbientLight(Vec3(0.6)); But the result is the following: As you can see it is still darker as regards to the editor: Particularly regarding the "white" light on the mountains. What am I still doing wrong?
  8. I have tried to to use Gamelib but with no success to achieve the editor graphic quality: game.scene.LoadMap("abstract::mappaprova2.sbx"); AmbientLight(Vec3(1)); EntityShadowMode(game.scene.terrain,1); Can someone try to achieve it and post me the code please (using the map linked in the topic and possibly using standard LEO) so I can learn what I'm doing wrong?
  9. I suppose you're talking about calling SetShadowMode(1) to the terrain entity (or not? I already tried calling that method on the character which is of Mesh type but it don't appear with shadow on the body as it seems in the editor using the crawler sample GMF), so I tried to reproduce the GetFirstEntityByKey function of Gamelib into LEO (that I like more than procedural calls) but I fall into access violation errors. The following are how I wrote them: struct TKeyData { str key; str value; Entity result; }; int _stdcall GetOneEntity(Entity e, TKeyData *data) { int i = 0; if(NULL==data->result) { std::string s; s = e.GetKey(data->key, "nothing"); if(s==data->value) { data->result=e; return 0; } else return 1; } else return 0; } Entity GetFirstEntityByKey(Entity e, str key, str value) { TKeyData data; data.key=key; data.value=value; data.result=NULL; e.ForEachDo((BP)GetOneEntity, (BP)(TKeyData*)&data,ENTITY_MODEL); return data.result; } then I tried to call: Terrain terrain = (Terrain)GetFirstEntityByKey(scene, "class", "Terrain"); but the client stops giving the access violation on the last line of GetFirstEntityByKey ("return data.result")... I'm doing errors somewhere?
  10. When I load a SBX scene in the code, I don't succeed to achieve the same quality as the same scene is rendered in the editor expecially for the shadows. This is a portion of the scene rendered in the editor: This is almost the same portion rendered in the client code: The code I used to load the scene is the following: TBuffer gbuffer = CreateBuffer(AODO_GAME_DEF_WIDTH, AODO_GAME_DEF_HEIGHT, BUFFER_COLOR | BUFFER_DEPTH | BUFFER_NORMAL); TBuffer lightbuffer = CreateBuffer(AODO_GAME_DEF_WIDTH, AODO_GAME_DEF_HEIGHT,BUFFER_COLOR | BUFFER_DEPTH); // Set graphic quality SetTextureQuality(1); TFilter(1); AFilter(4); fw.renderer.SetBloom(true); fw.renderer.SetHDR(1); DirectionalLight light; light.Create(); light.SetPosition(Vec3(0, 1, 0), GLOBAL); light.SetRotation(Vec3(44.9999924,34.9999924,2.14186755), GLOBAL); Scene scene; scene.Load("abstract::mappaprova2.sbx"); scene.SetType(2); fw.main.GetWorld().SetAmbientLight(Vec3(1)); light.SetColor(Vec4(0.15)); EDIT: the SBX scene contains the environment Ambient entity, you can download the scene here.
  11. The new homepage content is really nice, perhaps you could/should move the Flash media content just after the "Latest news" box to solve the "hidden hover menu" (unfortunately it's impossibile in the browser rendering to write any HTML/CSS/Javascript content over a flash content, as you can see trying to move your mouse over the menu in the home), or even trying to replace the flash with some jquery implementation (there are some examples of similar boxes on the net).
  12. I'm just going to code a MMORPG now, so probably I will going to meet the same situations as yours when I will go to code the game server (now I'm just concentrating on the client part to learn the engine)
  13. About Dexsoft packs, I have recently purchased the fantasy House and Blacksmith packs, but when I tried to insert the houses in the Leadwerks Editor I didn't succeeded to activate a correct physic for collision (even if I set collision to "Scene" in their properties and tried to re-create the .phy file with the LE phy-tool) and the character pass through the house walls. I'd like to know if any other purchased the medieval houses from them and succeeded to have collisions work (and how).
  14. I'm following this way, but now I'm trying to figure out how to rotate the controller when the body mesh is turned in a direction. This is my scenario: when I hold down the right mouse button my body mesh turn into the inverted camera direction but of course the controller will not. This is the code (before framework update method call): if (Mouse::IsDown(RIGHT)) { body.SetRotation(camrotation); body.Turn(Vec3(0, 180, 0)); } I have tried to call the following line both just inside that "if" and after the framwork Update method but without luck: player.SetRotation(body.GetRotation()); What happens is the mesh flickering or turning from left to right position. Any thoughts or suggestion?
  15. Please don't forget fantasy theme, since not all of us are interested in FPS development (I think there are really too much of them in the game world, and I love RPG that is what I'm working on just now ).
  16. For the model of FN SPR A4 that you are trying to export in this post, these were the steps I followed to create a fully animated GMF model: - converted hand JPG to DDS - opened the "gun_D" and "hand_tex" DDS with Microsoft DirectX Texture Tool (it is the default DDS viewer tool installed with Microsoft DirectX SDK) to change the surface format to DXT5 and create Mip maps, then I ran the GenMat to create the MAT files and edited them (shader="abstract::mesh_diffuse_bumpmap_skin.vert","abstract::mesh_diffuse.frag" and shadowshader="abstract::mesh_shadow_skin.vert") - finally changed the texture maps of the materials in UU3D and saved as GMF The result was a fully animated GMF model.
  17. mmh.. didn't work, I tried SetType(0) and SetType(3) (that is no collisions w/ other entities) but the model still seems to collide w/ something (if I comment the SetMass on player controller than the model seems to follow cylindrical collisions). That works perfectly, I think to use Mesh instead of Model too, thanks.
  18. The game I'm working on (an RPG) is based on 3rd person camera view, but it seems I'm doing something wrong (in this example I'm using LEO): // ... Controller player; player.Create(); player.SetType(1); player.SetMass(1); player.SetPosition(Vec3(4.04601192,2.42112565,-16.9856968), GLOBAL); player.SetRotation(Vec3(7.50344181,163.239944,-2.95039424), GLOBAL); Model body("abstract::soldier.gmf"); body.SetType(1); body.SetMass(1); body.SetPosition(Vec3(4.04601192,2.42112565,-16.9856968), GLOBAL); body.SetRotation(Vec3(7.50344181,163.239944,-2.95039424), GLOBAL); // ... while( !Keyboard::I****(KEY_ESCAPE) && !engine.IsTerminated() ) { move = KeyDown(KEY_W)-KeyDown(KEY_S); strafe = KeyDown(KEY_D)-KeyDown(KEY_A); // ... player.Update(0.0, move * 2.5, strafe, jump, 500.0f, 1, crouch); TVec3 playerpos = player.GetPosition(); body.SetPosition(playerpos); // ... engine.Flip(); } return engine.Free(); The problem is that the character model (the soldier) does not move when I press the WASD keys but it's ever moving all around (even if I don't press any key): I have tried in a fresh project the CreateController example on wiki but it didn't work for me (I'm using LE 2.31), the cylinder didn't move at all. PS: I don't know if I need a Controller or it's enough simply a Model to position when key pressed (this game will not have a 1st person camera view), I am really newbie both in LE and in game development (I've been a senior "management software" developer till now).
  19. Thank you for reply, I solved just while you were writing the last post only copying shaders.pak and Scripts folder in the compiled directory (I believed that since was declared RegisterAbstractPath thingoid than it was not necessary to copy those files). Now I'm receiving an error "Null framewerk" when hitting ESCAPE to shut down the program, I'll investigate about it (may use the Framework API instead of C [i love OOP and coming from C# ]), may be it's used inside some lua script of that scene/models.
  20. I am trying to load the tunnels.sbx scene within the sample maps in LE SDK 2.31 and add a TController to navigate throught it, but it happens that the Controller falls down as if the collision between the scene and the controller didn't work. The same happens trying to load every map, both the samples (deserthighway.sbx, terrain_arctic.sbx) and my custom. As you can see I have set both Collisions and Body Mass on the Controller, the code is the folling: Initialize(); RegisterAbstractPath("C:/Leadwerks Engine SDK"); SetAppTitle( "SceneTest" ) ; Graphics( 800, 600 ) ; AFilter(); TFilter(); TWorld world; world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TBuffer gbuffer = CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TCamera cam = CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); TModel scene = LoadScene("abstract::tunnels.sbx"); EntityType(scene, 2); Collisions(1, 2, true); TController player=CreateController(); EntityType(player, 1); SetBodyMass(player, 1); SetBodyDamping(player,0.0); SetWorldGravity(Vec3(0,-20,0)); PositionEntity(player, Vec3(-3.41, 1.78, -4.86)); 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); // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; //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); // Render SetBuffer(gbuffer); RenderWorld(); SetBuffer(BackBuffer()); RenderLights(gbuffer); // Send to screen Flip(0) ; } } Am I forgetting something in the code?
  21. Thank you very much mate!! I will send your notes and fixed file to my game designer. I hope he can walk by his own feet really very soon
  22. Well, the script editor already has the undo function, so I think there is no reason to undo script changes from the world editor. But undoing world changes that you mentioned (movement/creation/deletion/terrain) should be present.
  23. Hi Masterxilo, thank you for looking at it.. I see your export is correct (excepting the smooth, but it's not important now), my designer is looking for what have you done to correct it (more than removing the turbo smooth)... can you write something to say to it in a "graphicer/designer language"? (lol) The correct .MAX file modified should be very helpful too, aside from a description of steps to reproduce the fix (since now we need to export every piece of cloth by our own to understand the process and do some tests on parenting body and clothes in the C++ code). Thank you yet!
  24. I am experiencing (or better my designers, since I really don't understand graphics and animations at all) hard problems exporting with 3D Max 2009 a character made of a body with clothing pieces skinned and animated. Since I don't understand graphics and animation at this moment (even if I'm trying to study about these arguments, but I am a developer not a designer), my designer has no really experience in game designing so I think he's skipping or doing bad something in the procedure. The workflow we are following is this: Open the .MAX file on 3D Studio Max 2009 Click on LEADWERKS TOOLS > EXPORT OBJECTS Activate the following options: export smoothing groups; export binormals, tangents; write UD properties to meshes; export animation; export skins; exports materials IDs (max ID: 50); export materials (copy textures: replace) Click export The result is a file GMF and some files .MAT, but opening the GMF with LE ModelViewer it shows only bones animated and some incorrect spheres, which my designer says to be bones conjunctures which should not be exported. You may see the bad preview on ModelViewer here and can download the source character here. I will thank everyone who may download the source and export it (possibly only the body with its bones and animation, without clothes) in the correct format (GMF/MAT) with correct animation and say to me a detailed explanation about how he did it (a video on youtube/vimeo should be very useful), so I can pass the information to my designer who will try to repeat the steps by his own.... I may even pay for this work, since we are working on a game project and absolutely need to understand how we must proceed using 3D Max 2009 and Leadwerks Engine to walk by our feets Thank you in advance.
  25. Medieval/fantasy characters, armor pieces and weapons is what I mainly need, since I'd like to work on a (MMO)RPG game.
×
×
  • Create New...