Jump to content

Canardia

Developers
  • Posts

    4,127
  • Joined

  • Last visited

Everything posted by Canardia

  1. Why do you use windows API functions, when there is also a cross-platform version available? You will only make the engine more bloated and buggy that way Use (double)clock()/(double)CLOCKS_PER_SEC for millisecond measurements, it's completely cross-platform, and it's always much more accurate than Windows API functions.
  2. You could temporarily rename the AmbientLight function in engine.cpp to make it cause compiler errors in places where you used the function. Then you could find where you have used it.
  3. Sure, that would be a different kind of tutorial then. More like a general learning of possible ways to work. I think there should be both kinds of tutorials, hardcoded copypaste tutorials which compile and run, and then the theoretical tutorials which explain the philosophy of life and 3D game development
  4. That is in Power Tutorial, but it seems Josh has cleaned up the Wiki main page a bit, so I need to make a new website for custom tutorials
  5. Canardia

    VS 2010

    Wait for Service Pack 1, I've heard of many problems with VS 2010 with all kinds of libraries, not only LE. Also all C++ standard libraries have usually only VS 2005 and VS 2008 .lib files, so using VS 2010 is not enough supported yet.
  6. You have the wrong Entities folder in your project.
  7. You need call first UpdateFramework(), then your code, then RenderFramework(), then Flip(0). But also your code first, then UpdateFramework, then RenderFramework(), then Flip(0) works in most cases. I'm not 100% which one is the better approach, but the worst is to call UpdateFramework(), then RenderFramework(), then your code, then Flip(0), because then the physics bodies are totally out of sync with the meshes.
  8. You need to multiply by AppSpeed(), not divide. By dividing you only make the FPS speed effect worse And you should also not call UpdateAppTime(), since Framework does that already.
  9. LE 2.3 has also only frustum culling, but no occlusion culling. I tried to make my own occlusion culling with EntityVisible() and the HideEntity() if it's not visible, but unfortunately EntityVisible() is horribly slow and doesn't bring a better FPS.
  10. It's actually more important than any other OS.
  11. You can actually do it with a simple loop, which modifies all terrain grids.
  12. Canardia

    Model citizen

    It's easy to get 500 million friends on facebook. Just put a picture of some hot chick as avatar and invite everyone
  13. The more I think about it, the more I tend to an engine which can do huge numbers of everything. When it comes to a game idea, the most often occuring problem of any engine is that it can't handle enough entities, or far enough distances. Using double type for everything would solve the problem on the CPU side, and for the GPU side OpenGL 3 would be needed to support double. Minecraft is a good example of a game which is simple, but needs a lot of entities. If you wanted to do that with LE and physics, I don't think you could, since it lacks occlusion culling. But with LE3 it might actually work.
  14. The only use I know for TFormVector is to rotate a vector so that it has the same rotation as some entity. So to use it for gravity force, you point a pivot from an object to the gravity center, and then use TFormVector to get that rotation, so you can use it as force vector: PointEntity( pivot, gravitycenter ); // pivot is parented to the object TFormVector( &force, pivot, NULL); AddBodyForce( object, force );
  15. ForEachEntityDo(), TFormVec() and AddBodyForce().
  16. It's quite easy, you just need to loop through all physics bodies and add a force to them in direction of the nearest/biggest gravity center.
  17. Your first job is to bring back the Linux installation option to XBOX, so that people can fully access the GPU from Linux
  18. Parenting has many of those problems you describe (problems with rendering, problems with animations, problems with physics, etc...), so in most cases it's better to use SetEntityMatrix/GetEntityMatrix to simulate parenting. Usually I parent first, then see if it works, and it not, then I use SetEntityMatrix/GetEntityMatrix and continue with the game development.
  19. require "scripts/constants/engine_const.lua" RegisterAbstractPath(".") Graphics(800,600) fw = CreateFramework() camera =fw.main.camera camera:SetPosition(Vec3(0,20,-20)) light = CreateDirectionalLight() light:SetRotation(Vec3(45,45,0)) camRotation=Vec3(0,0,0) MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2) HideMouse(1) prevPos = Vec3(0) cube = {} cube1 = {} cube2 = {} gx=0 gy=0 cub=CreateCube() for a = 0, 50, 1 do for b = 0, 100, 1 do cube[b] = CopyEntity(cub) cube[b]:SetPosition(Vec3(prevPos.x + 1,prevPos.y + 1,prevPos.z)) prevPos = cube[b]:GetPosition() end prevPos = Vec3(0,0,prevPos.z + 2) end prevPos = Vec3(0) for a = 0, 50, 1 do for b = 0, 100, 1 do cube[b] = CopyEntity(cub) cube[b]:SetPosition(Vec3(prevPos.x - 1,prevPos.y + 1,prevPos.z)) prevPos = cube[b]:GetPosition() end prevPos = Vec3(0,0,prevPos.z + 2) end CameraClearMode(camera,-1) minibuffer=CreateBuffer(256,256,BUFFER_COLOR+BUFFER_NORMAL+BUFFER_DEPTH) thisbuffer=GetBuffer() while KeyHit(KEY_ESCAPE)==0 do --Camera look gx=Curve(MouseX()- GraphicsWidth()/2,gx,10) gy=Curve(MouseY()- GraphicsHeight()/2,gy,10) MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2) camRotation.x = camRotation.x+gy /10 camRotation.y = camRotation.y-gx /10 camera:SetRotation(camRotation,1) --keys move = Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,10) strafe = Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,10) camera:Move(Vec3(strafe ,0,move)) fw:Update() thisbuffer=GetBuffer() SetBuffer(minibuffer) camera:Turnf(0,180,0) RenderWorld(); RenderLights(minibuffer); camera:Turnf(0,180,0) SetBuffer(thisbuffer) fw:Render() SetBlend(1); SetColor(Vec4(0,1,0,0.5)); DrawImage(GetColorBuffer(minibuffer,0),0,300,256,-256) SetBlend(0); Flip(0) end
  20. Yeah, I use it all the time for rending mirrors, maps and radars and other simple small buffers.
  21. I think the easiest and best way is to work in circles. First make a very small circle, which means a very small game which you can complete in minimal time. Then make the next bigger game in the same circle way. For each circle (=each game), you have also this subcircle which gives a more detailed explanation what happens in side one game circle:
  22. You also need to call RenderFramework() once before the main loop, because it initializes a lot of stuff.
  23. CreateBuffer() must be before the main loop, and you should have UpdateFramework() in the loop also.
×
×
  • Create New...