Jump to content

Canardia

Developers
  • Posts

    4,127
  • Joined

  • Last visited

Everything posted by Canardia

  1. LoadScene uses LoadMesh, which is the best way to instance models. You could theoretically use CopyEntity to make instances of the model too, but I think it does not work perfectly, or then I had some other issue with occlusion culling when I tested it. So always use LoadModel to make perfectly instanced models. LoadModel doesn't load from disk if the model is already loaded, so there is no additional disk activity either.
  2. RenderFramework doesn't initialize everything in the first call, but sometimes it takes a few calls to get everything loaded. For example the 32 water textures can take up to 32 seconds to load. But when you call RenderFramework for a few seconds before the main loop and rotate and move the camera around, everything what is critical should be loaded.
  3. Maybe you need to make LE preload the shaders, so don't use your OpenGL commands befora you have called RenderFramework() before the main loop once.
  4. You need to use LE's BindTexture() command, before you can use those commands.
  5. That's how I would do it too, except for the few naming inconsistencies (first letter of method always Big, no underbars in front of attribute names).
  6. I think he wants unique numbers for each unique object. He could do it using some int id attribute too, and int operator==() which returns the id of the object. When the id is the same, it's the same object. When the id is different, then the object is a different instance of the class
  7. You are not creating the object at all, but you only declare a pointer to the object. So you should either get rid of the * or use new Object()
  8. The engine commands are the same in all languages, either procedural or OOP. SetEntityKey(entity,"key","value") or Entity::SetKey("key","value")
  9. You need to manually paint the places between the stones transparent. You could also photograph the stones on a green or blue paper, then it's a bit easier to fill the green or blue are with transparent color.
  10. You can create an alpha channel with GIMP or Paint.NET. The POM alpha bitmap must come from a high poly model from Blender or 3DSMax.
  11. Works fine for me: #include "engine.h" int main() { Initialize(); Graphics(); CreateFramework(); TCamera cam=GetLayerCamera(GetFrameworkLayer(0)); TMesh cube=CreateCube(); MoveEntity(cam,Vec3(0,0,-5)); AmbientLight(Vec3(0)); CreateDirectionalLight(); EntityColor(cube,Vec4(1,0,0,1)); TShader gaussianrally = LoadShader("abstract::postfilter.vert","abstract::postfilter_blurrally.frag"); TBuffer shaderbuffer = CreateBuffer(640,480,BUFFER_COLOR); SetBloom(1); while(!KeyHit()) { UpdateFramework(); TurnEntity(cube,Vec3(AppSpeed())); SetBuffer(shaderbuffer); RenderFramework(); SetBuffer(BackBuffer()); SetShader(gaussianrally); DrawImage(GetColorBuffer(shaderbuffer,0),0,0,640,480); SetShader(NULL); Flip(0); } return Terminate(); }
  12. Ah, now it makes sense. I think google translator has problems when you forgot to use punctuations like , . ; etc.... + In Editor, set collistiontype=prop or scene + set CameraRange(0.001,5000.0) + use the driver.lua script as example how to make a car driving script --------------- Ah, şimdi mantıklı. Google çevirmen sizin gibi noktalama işaretlerini kullanmaya unuttum sorunlar olduğunu düşünüyor. , Vs ... + olarak Editör, set veya sahne pervane çarpışma type + Set CameraRange (0.001,5000.0) + Nasıl yapmak örnek olarak driver.lua script komut dosyası kullan sürüş bir araba
  13. There are tutorials how to install the engine for Visual Studio and Code::Blocks also. I would recommend to use Code::Blocks with MinGW, since it's the fastest compiler (fastest compilation time + fastest code), and it has also the most modern C++ version. I think using devpacks is more work, because every standard library is very easy to install, and you don't need to create a devpack for each standard library: 1) compile the library if it's not already in .lib format 2) drag the .lib file with the mouse to the project 3) add the include directory to your project or IDE Dev-C++ uses also MinGW, so at least the compiler should be fine. The fact that it's written in Delphi, makes me rather want to use a IDE which was written in C++. The fact that it's for Windows only, makes me also want to use Code::Blocks instead.
  14. It seems to be translated from türkisch. Maybe try to google translate from türkisch to german, as it might give a better translation.
  15. I don't understand what you are saying, could you try to use google translator?
  16. Asus GTX 580 is good quality and in most cases faster than other GTX 580: http://www.techpowerup.com/reviews/ASUS/GeForce_GTX_580_Direct_Cu_II/
  17. By default the camera clear mode is set to clear nothing, so it shows the background world.
  18. Canardia

    namespace?

    The namespace LE was added long time ago, and it doesn't change anything for the user's game source code as it's automatically activated. The TVec... structures and Vec... functions have been always like that.
  19. http://lua-users.org/wiki/MathLibraryTutorial
  20. I guess need to hide the mesh using HideEntity(GetChild(pivot));.
  21. SetBodyOmega(chassis,Vec3(0)); SetBodyTorque(chassis,Vec3(0)); // might not be needed SetBodyVelocity(chassis,Vec3(0));
  22. Alternatives for Actor: Activity Movement (like in classic musical compositions: 1st Movement, 2nd Movement, etc...) Action Task Job Intelligence Process Program (like in washing machines) Thread Daemon Subscript (new meaning for the word!)
  23. SetBodyVelocity(chassis,Vec3(0));
  24. Canardia

    Multimap

    #include <string.h> #include <iostream> #include <map> #include <utility> using namespace std; int main() { // Compare (<) function not required since it is built into string class. // else declaration would comparison function in multimap definition. // i.e. multimap<string, int, compare> m; multimap<string, int> m; m.insert(pair<string, int>("a", 1)); m.insert(pair<string, int>("c", 2)); m.insert(pair<string, int>("b", 3)); m.insert(pair<string, int>("b", 4)); m.insert(pair<string, int>("a", 5)); m.insert(pair<string, int>("b", 6)); cout << "Number of elements with key a: " << m.count("a") << endl; cout << "Number of elements with key b: " << m.count("b") << endl; cout << "Number of elements with key c: " << m.count("c") << endl; cout << "Elements in m: " << endl; for (multimap<string, int>::iterator it = m.begin(); it != m.end(); ++it) { cout << " [" << (*it).first << ", " << (*it).second << "]" << endl; } pair<multimap<string, int>::iterator, multimap<string, int>::iterator> ppp; // equal_range( returns pair<iterator,iterator> representing the range // of element with key b ppp = m.equal_range("b"); // Loop through range of maps of key "b" cout << endl << "Range of \"b\" elements:" << endl; for (multimap<string, int>::iterator it2 = ppp.first; it2 != ppp.second; ++it2) { cout << " [" << (*it2).first << ", " << (*it2).second << "]" << endl; } // Can't do this (??) // cout << ppp.first << endl; // cout << ppp.second << endl; m.clear(); }
  25. The best would be if the LE function would use internally alloca() instead of new or malloc(), because then they would be using stack memory which is much faster than heap memory, and CPU uses also parts of the stack memory as CPU registers which makes it even faster. But maybe I can make my own LE3 version which uses only stack memory.
×
×
  • Create New...