Jump to content

Shard

Members
  • Posts

    293
  • Joined

  • Last visited

Everything posted by Shard

  1. When using EntityPick, I've noticed that my game stalls for a few seconds and then continues to run as normal. This happens the first time a pick happens at a high poly surface or at least it seems like that. At first I thought this was because of DOF, but I turned that off because it became a large enough problem. But now when our character shoots, it does a pick to see what it hit and it freezes up just the same. I'm just checking to see if anyone else has had this problem and how they fixed it. If not, I'll create a basic program and upload to bug tracker.
  2. Thanks for that. The video is showing now, but there is no sound. What do I do about that? The sound works fine in VLC. Heres the code: // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #pragma comment(lib,"libtheoraplayer.lib") #pragma comment(lib,"opengl32.lib") #pragma comment(lib,"openal32.lib") #include <windows.h> #include "engine.h" #include <gl/gl.h> #include "TheoraVideoManager.h" #include "TheoraVideoFrame.h" #include "OpenAL_AudioInterface.h" int nextPow2(int x) { int y; for (y=1;y<x;y*=2); return y; } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { Initialize() ; SetAppTitle( "hello_video" ) ; Graphics( 1024, 600 ) ; TWorld world; TBuffer gbuffer; TCamera camera; world = CreateWorld() ; gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); camera=CreateCamera(); // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP TheoraVideoManager *mgr = new TheoraVideoManager(); OpenAL_AudioInterfaceFactory *iface_factory=new OpenAL_AudioInterfaceFactory(); mgr->setAudioInterfaceFactory(iface_factory); mgr->setDefaultNumPrecachedFrames(32); //TheoraVideoClip *clip = mgr->createVideoClip( "bunny.ogg",TH_RGB,0,1); TheoraVideoClip *clip = mgr->createVideoClip( "bunny.ogg",TH_RGB,0,1); clip->setAutoRestart(1); float w=clip->getWidth(); float h=clip->getHeight(); float tw = nextPow2(w),th=nextPow2(h); TTexture videotexture = CreateTexture( tw, th, TEXTURE_RGB ); // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP unsigned long time=GetTickCount(); unsigned long t=time; // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { // THEORA CODE UPDATE TEXTURE // THEORA CODE UPDATE TEXTURE TheoraVideoFrame *f = clip->getNextFrame(); if(f) { BindTexture(videotexture); glTexImage2D( GL_TEXTURE_2D,0, GL_RGB, w-1, h-1, 0, GL_RGB, GL_UNSIGNED_BYTE, f->getBuffer() ); clip->popFrame(); } //mgr->update(AppSpeed()); // THEORA CODE UPDATE TEXTURE t=GetTickCount(); float diff=(t-time)/1000.0f; if (diff > 0.25f) diff=0.05f; // prevent spikes (usually happen on app load) mgr->update(diff); time=t; // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; // Render SetBuffer(gbuffer); RenderWorld(); SetBuffer(BackBuffer()); RenderLights(gbuffer); // THEORA "PLAYBACK" // THEORA "PLAYBACK" DrawImage(videotexture,0,0,GraphicsWidth(),GraphicsHeight() ); // Send to screen Flip(0) ; } } // Done return Terminate() ; }
  3. Are there any plans for soft body collisions? Also, is there a way to set different collision values on different parts of an object? Like for a tree, where the trunk is 100% resistive and the low branches and leaves are only 20% resistive so that if the player keeps pushing, they will eventually make it through.
  4. >,> Leading by example is not a strong suit of mine
  5. What settings do you use for it? I've included screencaps of my default settings. The second screencap is the video not running in your code and the last screen cap is the video running in VLC player. Best of luck with your deadline Thank you. Please be sure to sign up for the beta if you haven't at http://3rdinitiative.com/system/
  6. You sir have just done magic! Or Science. Take your pick It work marvelously now. Now on to the question of how one converts an avi into ogg. Any idea? How do you guys do it? I have been unable to find a converter that converts an ogg with video. They all do audio.
  7. So it seems that I've found a problem. Your code works perfectly fine in VS2008 but crashes at the same location in VS2010. Do you know what might be causing this? Would this have something to do with some configuration? Can you test it in VS2010? I can't really revert to 2008 as it would be a lot of trouble so if you would know what would solve this, I would be even more grateful.
  8. You sir are a savior. Thank you very much for this. I'll be able to figure out the missing components from this. I think you should upload this to the downloads section, right next to LETheora so people who have questions in the future can look at this.
  9. It was done in the Leadwerks Editor using the Leadwerks SDK. Also, grammer.
  10. You probably want to use a different piece of software if your just looking to generate terrain. Google Terrain Generator or the like. Leadwerks is a fully fledged engine with its own libraries, editor, code, etc and its not free, though certainly cheap for what it offers. Leadwerks SDK is the libraries used in a coding language. The Sandbox (now known as Editor) is a level editing program. They are both part of the same Leadwerks package and not available separately. Overall, you wanna go with something else, because you wont be using 99% of Leadwerks features. Leadwerks isn't compatible with FPS Creator, it is its own piece of software.
  11. 1) Didn't work, got this message 2) I have been doing that 3) Have been doing that.
  12. I need C++ and print didnt work
  13. No I'm doing it in C++, so I'm actually drawing the texture to the screen, because I don't paint anything with it.
  14. A feature request to be able to write to the LE Log file.
  15. Can we have the tutorial files included with the SDK be named. For example, the Sound tutorial is named "Lesson 4 - Sound" or something. I'd did this myself but with each update, it gets w"iped. That is all.
  16. The mouse position is reset to the center of the screen every frame so that the mouse controls can pull the correct update for mouse movement data. You'll learn once you get your toes wet with the engine code;
  17. +1 Also, r5 doesn't have the EntityCallback fixed yet.
  18. Thanks, that worked perfect. The linking works fine. Now if we could get this to work, we'd be set >,> http://leadwerks.com/werkspace/index.php?/topic/2080-letheora-crashing-at-create-clip/
  19. Thanks a butt load. Its still not working =O I just downloaded R5 and updated it and copied over the dll and it still breaks at the same point. What do? The update for r4 works but not for r5 so I assume that the dll for r5 needs to be updated.
  20. Thank you very much. Your suggestions worked marvelously.
  21. In the disassembly it breaks to here: 00424953 mov esi,esp 00424955 call dword ptr [leUpdateFramework (47E708h)] 0042495B cmp esi,esp 0042495D call @ILT+15255(__RTC_CheckEsp) (3C2B9Ch) I don't believe that this is because of multiple callbacks anymore. The callback isn't called again, this error happens as soon as it breaks out of the loop. Can someone with source code please test this out and tell me what is going on?
  22. Mind = Blown. Didn't even think of this.
  23. Shard

    Some hints of 3.0

    Prefabs == Destructible Environments?
  24. Attached is the project file. Please note that this includes my solution files so you may have to relink the engine/leo cpp files depending on your directory structure. Edit: It seems I forgot to include the shader.pak and the video.mat files. Please toss this in. My apologies. (These are included in the project, just forgot to import them into the upload)
×
×
  • Create New...