Jump to content

Canardia

Developers
  • Posts

    4,127
  • Joined

  • Last visited

Everything posted by Canardia

  1. I think the project wizard targets are freely customizable via some .ini file, so we can add our own languages templates.
  2. You are probably initializing Framework before Graphics is created. If you use LEO classes in your own classes, you should always specify Classname object(CREATE_LATER), else your classes will launch in a random order (in the order you declared their instances).
  3. It disables creating the engine.log file and also any output into the engine.log and to stdout from the engine itself. But it doesn't disable stdout from C++. You can compile my example with mingw64 using: g++ main.cpp -Ic:\prg\le\cpp c:\prg\le\cpp\engine.cpp -O6 -static -m32 -o main.exe to see it yourself.
  4. AppLogMode(0) disables all the engine logs, and you can still use use printf() to print your own debug messages: #include "engine.h" int main() { Initialize(); AppLogMode(0); Graphics(); CreateFramework(); CreateSpotLight(); BP cube=CreateCube(); MoveEntity(cube,Vec3(0,0,5)); double n; while(1) { UpdateFramework(); if(KeyHit(KEY_A))printf("**** My Debug Message ****\n"); if(KeyHit(KEY_ESCAPE))break; n=AppSpeed(); TurnEntity(cube,Vec3(1*n,2*n,3*n)); RenderFramework(); Flip(0); } return Terminate(); }
  5. Is there a possibility to have somekind of ../Common/*.cpp folder for common source files, so you don't have to copy the same source code into each different platform folder?
  6. It's very simple actually. You can use a normal Apache PHP server, and send HTTP requests to the server. For sending HTTP request, you can use for example libcurl ( http://curl.haxx.se/ ), which is very easy to use, for example: /* A multi-threaded example that uses pthreads extensively to fetch * X remote files at once */ #include <stdio.h> #include <pthread.h> #include <curl/curl.h> #define NUMT 4 /* List of URLs to fetch. If you intend to use a SSL-based protocol here you MUST setup the OpenSSL callback functions as described here: http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION */ const char * const urls[NUMT]= { "http://curl.haxx.se/", "ftp://cool.haxx.se/", "http://www.contactor.se/", "www.haxx.se" }; static void *pull_one_url(void *url) { CURL *curl; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_perform(curl); /* ignores error */ curl_easy_cleanup(curl); return NULL; } /* int pthread_create(pthread_t *new_thread_ID, const pthread_attr_t *attr, void * (*start_func)(void *), void *arg); */ int main(int argc, char **argv) { pthread_t tid[NUMT]; int i; int error; /* Must initialize libcurl before any threads are started */ curl_global_init(CURL_GLOBAL_ALL); for(i=0; i< NUMT; i++) { error = pthread_create(&tid, NULL, /* default attributes please */ pull_one_url, (void *)urls); if(0 != error) fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error); else fprintf(stderr, "Thread %d, gets %s\n", i, urls); } /* now wait for all threads to terminate */ for(i=0; i< NUMT; i++) { error = pthread_join(tid, NULL); fprintf(stderr, "Thread %d terminated\n", i); } return 0; } This example is also multi-threaded, so it doesn't stop your LE main thread while sending/getting HTTP data from the web server.
  7. Standard OpenCL works with all GPUs, so this Bolt wrapper might add some incompatibilites, if it's not open source or is using AMD specific commands.
  8. You can use 7-zip to make a zip file with compression which works as LE pak file.
  9. I hope png at least, I don't want to store uncompressed dds on my harddisks, since they are huge.
  10. GTX 560 is about twice as fast as Radeon 7770, and the price is the same: http://www.hwcompare.com/11885/geforce-gtx-560-vs-radeon-hd-7770/
  11. You can use the UpdatePhysics hook: require("Scripts/constants/keycodes") require("Scripts/console") local bonks=0 local frames=0 function MyPhysicsHook() bonks=bonks+1 AddConsoleText("PhysicsUpdates: "..bonks.." Frame: "..frames) end --Register abstract path RegisterAbstractPath("") --Set graphics mode if Graphics(1024,768)==0 then Notify("Failed to set graphics mode.",1) return end world=CreateWorld() if world==nil then Notify("Failed to initialize engine.",1) return end fw=CreateFramework() camera=fw.main.camera camera:SetPosition(Vec3(0,0,-2)) light=CreateSpotLight(10) light:SetRotation(Vec3(45,55,0)) light:SetPosition(Vec3(5,5,-5)) model=LoadModel("abstract::oildrum.gmf") ground=CreateBodyBox(10,1,10) groundmesh=CreateCube(ground) groundmesh:SetScale(Vec3(10.0,1.0,10.0)) ground:SetPosition(Vec3(0.0,-2.0,0.0)) groundmesh:Paint(LoadMaterial("abstract::cobblestones.mat")) ground:SetCollisionType(1) Collisions(1,1,1) --DebugPhysics(1) SetStats(0) light=CreateDirectionalLight() light:SetRotation(Vec3(45,45,45)) local timer=AppTime()+1000 consolemode=1 AddHook("UpdatePhysics",MyPhysicsHook) while AppTerminate()==0 do if KeyHit(KEY_ESCAPE)==1 then break end if timer<AppTime() then timer=AppTime()+1000; model=CopyEntity(model) model:SetPosition(Vec3(0,10,0)) end fw:Update() fw:Render() frames=frames+1 DrawText("FPS: "..UPS(),300,0) Flip(0) end
  12. I have successfully used a PS3 controller on the PC with the SDL_Haptic lib, and I think it supports XBOX 360 controllers also. Just google for SDL_Haptic, or maybe nowadays it would be GLFW to google for, since things change, but there will be always one lib which support PS3/XBOX controllers on PC.
  13. Like I said, it's the BlitzMax GUI, not sure why my comment was deleted. I actually read about the riched20.dll problem on a official report where I had to fix 20 servers at office. Maybe it is not allowed to critisize BlitzMax, I can't see any other reason.
  14. Maybe try installing the latest nVidia drivers.
  15. Try to put LE SDK under a folder which is supported by Windows (no spaces and special characters), for example c:\prg\le25, and also run editor as Administrator.
  16. Delete editor.ini, your gamepath is pointing to some directory which is missing some files.
  17. They can be even 4096x4096, if your GPU supports it. GeForce 8800 at least does.
  18. But today is the last day of the month, so you buy it today?
  19. 1) Yes. 2) No, only upgrade. LE2.5+upgrade to LE3 is cheaper than LE3. 3) Yes (all C/C++ compilers work with LE2.5, as well as all other languages which can load a dll). 4) Yes, if you count the community made add-ons as features (new advanced shaders, day/night modules, 3D models, etc...). 5) Yes and No, essentially it is the same size, but it is slightly bigger, because it is newer than the trial version and might have some additional files.
  20. You need to use a transparent texture, and also put the transparent object into the foreground world.
  21. Laptop is like a Notebook, but it has Intel or AMD CPU, and nVidia or Radeon GPU. They are also thicker and heavier than Notebooks. Notebooks are mean for casual web browsing and office documents, while Laptops can do almost everything a Tower PC can do.
  22. You must Curve() the camera position to the body, look at the FPS script example in Editor.
  23. Just copy paste the code into your main loop, it calculates the speed of a pivot between 2 frames (flip changes a frame).
  24. Canardia

    iOS 6 Blues

    The sad thing is, the Apple fans don't care about critics and facts, they just demand that every app should work fine. So far S2 has worked very well for me, very fast FPS with realtime shadows and hundreds of drawcalls. The mobile business is getting like the PC business, there are the GeForce 8800 phones (old, but highend), and there are the Intel GMA phones.
  25. Canardia

    Not So Fast

    Of course, if the real file name does not matter to the user, it can be anything. But maybe sometimes some debugging is needed, and then a human-readable filename hint would help a lot?
×
×
  • Create New...