Jump to content

Chiblue

Members
  • Posts

    589
  • Joined

  • Last visited

Everything posted by Chiblue

  1. I am using a sniper simulation in my project and have a variable zoom, the problem I have is that when I am far away from an object but zooom in the object is using it's low polygon model which really does not look very realistic, should the model quality being used be based on the relative distance based on the FOV or zoom setting and not the actuall camera distance? Or is there a way I can set this?
  2. What do you need, I posting in the programming C++ forum... my logs, timing and code... I am performing the following cast... int hit = EntityPick(&pickent,gun,weap->maximumrange,0,0,(BP)PickFilter); This is my filter, although I have removed this and get the same results... int _stdcall PickFilter( TEntity pickentity) { int EntType = GetEntityType(pickentity); switch(EntType) { case 0: // terrain return 1; case 1: // terrain return 1; // <10 no force, but effects.. case 2: // terrain return 1; // <10 no force, but effects.. case 11: // Player return 0; case 12: // Freindly return 1; // 10> force and effects. case 14: // props return 1; // 10> force and effects. case 21: // Enemy return 1; default: return 1; } } I also tried this... int hit = EntityPick(&pickent,gun,weap->maximumrange,0,0); I placed an UpdateAppTime() and wrote a log file with the apptime before and after the raycast that hung... this happens every maybe 5-10 seconds in the game loop, only when I am firing or using my sight distance functions (bothe using raycast) one uses CameraPick the other EntityPick, I was trying to ensure that both cause the same problem, and they do.. This is the log record before and after the EntityPick/CameraPick... 12254122.000000 : PlayFPSAnimation - EntityPick 12254630.000000 : PlayFPSAnimation - EntityPick Done AQs you can see the function on this case took 500 miliseconds... which causes a significant lag in gameplay... I am using a scene created with Editor, all entities have types associated with them... I cannot be sure but the problem seems most prevelant when you intersect the terrain... but as I said this is only conjecture...Also it appears to happen when moving rotating i.e. changing the raycast results...
  3. I initially started using DBPro, then I went to Dark GDK, for various reasons only to find out that thier all encompassing Dark PHysics failed to perform raycast accurately... Now after spending several weeks with LE, and posting about this issue twice on the forums, Raycat in LE does not work, or rather is provides accurate collision reports but randomly HANGS for 500 or more miliseconds... which causes a major lag in my project and as a result makes it unviable as a FPS... I now understand why every time I have seen anything associated with bullet tracing is has been done with an object, rather than raycast... I posted a question concerning this a couple of weeks back and not once did anyone tell me Raycast dfoes not work... So please can I get this issue fixed... I know this is not exactly a feature request but it seems my posts about raycast hanging have gone completely ignored... I really like the LE Engine, but raycast is a critical part of my project requirements and without it I have no project...
  4. It is actually the raycast, my logs were decieving because time is only updated once... 12254122.000000 : PlayFPSAnimation - EntityPick 12254630.000000 : PlayFPSAnimation - EntityPick Done This is the call.. int hit = EntityPick(&pickent,gun,weap->maximumrange,0,0,(BP)PickFilter); This is the call back... int _stdcall PickFilter( TEntity pickentity) { int EntType = GetEntityType(pickentity); switch(EntType) { case 0: // terrain return 1; case 1: // terrain return 1; // <10 no force, but effects.. case 2: // terrain return 1; // <10 no force, but effects.. case 11: // Player return 0; case 12: // Freindly return 1; // 10> force and effects. case 14: // props return 1; // 10> force and effects. case 21: // Enemy return 1; default: return 1; } } I also remove the callback and it still hangs.. it is the EntityPick function that hangs.... The distance is 4000... I have also tried the CameraPick with the same results...
  5. I have restarted my machine about 20 times in the last 2 days, I lost a drive in the raid set and had to rebuild it...
  6. I took it out... same problem... 9171152.000000 : Start 9171713.000000 : End Update Woow this was almost 600... I guess it is called somewhere else... Strange thing is now the game.scene.Update() is causing the delay... which maybe were is was also being called from...
  7. I am using gamelib... but I never said I was not doing something wrong....lol
  8. I have been experiencing a problem with my project, when I am running my app it keeps hanging for a fraction of a second, but enough to be a pain... my FPS is in excess of 500 so I know it is not that... So I added a logging class and wrote out to the log after each function call in my main loop... WriteLogData("Start"); UpdateAppTime(); WriteLogData("End UpdateAppTime"); game.scene.Update(); WriteLogData("End Update"); game.MouseLook(game.scene.cam); I stopped the game immediately I hit a hang up.. this is the log.. 6886407.000000 : End DisplayHudControls 6886407.000000 : End 6886407.000000 : Start 6886815.500000 : End UpdateAppTime The time stamp is app time.. I normally see < 15 for every UpdateAppTime Call, except when I get the hangs and I then see over 400 or more... Can someone explain what this does and why it would hang? FYI... I am running Vista 64 ultimate.. on a quad core intel processor, 8gb memory and SLI GTX 8800 OC vidoes cards..
  9. Thanks that was what I thought but the other responses are helpful especially the fov equation!
  10. I am using Gamelib...And most of the existing properties for zoom, the gamelib property you mentioned allows for switching zoom levels I am already doing that using my own funtions but the issue is I want to show a scale on my sight textures showing a graphic representation on the zoom magnification the actual number is not that important per say, but the critical part I need is to establish a min and max zoom allong with reasonable increments within the graphic scale to show the player the actual or relative zoom they are at. So I guess the real question is, in a real world example if I set the zoom to say 20 what does this represent in comparison to 1,2,3,4.....19 is it simple 20x zoom level 1 or is there a more complex formula.
  11. Only work I have done in magnification calculations is in Astronomy, but there I have focal length, lens magnification and main optics... So given a zoom value how would I calculate the magnification... I have a sniper scope overlay and the mouse wheel zooms in and out, but I want to display the actual magnification i.e. 1x 2x 16x 50x etc...
  12. I am using camera zoom and I have been playing around with the limits... there does not seem to be any... so does anyone have any suggestions on the relative ratios of each zoom setting... e.g. when I set the zoom to 10 say, does this equat to 2x, 5x 10x???? or is there a clean calculation to get this??
  13. I am trying to create a realistic scope motion drife and shooting recoil in scope, I have created a random cam offset for X and Y, then I use curve to transition between the 0 and offsetm I then add this to the current camera rotation... I am using small values but no matter how smale I make the increment I still get a jerky motion... Does anyone have any other thoughts on ways to get scope drift working? even suggestions would be helpful.
  14. **** am I stupid.. Don't answer that... It's retorical!
  15. I am building a sniper function in my project and I have an overlay texture that I want to use for the image, basically it is a circle with some targeting lines that are alpha channel and the rest is opaque... I was going to load this into my scene using DrawImage, but when I want to switch out of sniper mode, I need to remove or hide the overlay... I was trying to use a plane but this presents all sorts of problems with zoom, collisions not to mention sizing and positioning.. Does anyone have any thoughts on how to but a my sniper overlay up and then remove it when leaving sniper mode? Thanks
  16. How does one get in one this, I would love to be part of this... the critical part of any FPS is look and feel. As far as SP or MP, MP is the cleanest due to the lack of AI requirements, although the comm stuff can get a little frustrating... As far as weapons I would suggect a menu drive loadout screen so that a player can select thier own weapons based upon the specifc server constriants... Vehicles, one of the biggest issues in most games is that the vehicles are destroyed to easily it should take 2 or 3 direct hits on a vehicle to disable it... in COD 5 WaW the tanks would be destroyed by a single RPG round to the rear, this meant no one used them in MP games... The next big challenge is game types, like Capture the flag, Search and Destroy, Sabatage, Recon, Kill the Commander, etc... these all have very specific requirements and any design needs to allow the game type to be seleactable within any map, which changes the whole dynamic of that map.. Finally, weapons.. if the game is an era based game weapons need to be realistic in thier capabilities and damage, Future is always better because you don't have a precedent for the performance, although games like Crysis and BF2142 failed in this, you are running around with high tech weaponry and still when you shoot someone you fire 50 rounds into them and they are still not down...
  17. I am using the camera raycast to select objects hit by a bullet, I am using a call back in the filter to ignore all controlller body objects, this works very well with one exception occasionally when I do the raycast the initialization, I.e the processs in le between perrforming the cast and returning the first collision entity seems to hang for a short time which hangs the game. The problem does not appear to be multiple object in the collision or the distance as I can cast with noting in the path and lots of objects in the path and the hang will be random, this said it appears to be more prevelant when I rayvcast with multiple collisions. Are there any guidelines for doing this or known issues I need to work around?
  18. I just installed 2.31, and can no longer run my project.. I get lots of errors, I am using Gamelib which I am assuming is not supported yet? 1>LEO Leadwerk Engine Objects, version 2.3.1. 1>d:\leadwerks\projects\fpsbase\fpsloader.cpp(313) : error C2039: 'GetRenderer' : is not a member of 'LEO::Framework' 1> c:\program files (x86)\leadwerks engine sdk\cpp\leo\leoframework.h(16) : see declaration of 'LEO::Framework' 1>d:\leadwerks\projects\fpsbase\fpsloader.cpp(313) : error C2228: left of '.SetSkybox' must have class/struct/union 1>d:\leadwerks\projects\fpsbase\fpsloader.cpp(569) : error C2039: 'GetRenderer' : is not a member of 'LEO::Framework' 1> c:\program files (x86)\leadwerks engine sdk\cpp\leo\leoframework.h(16) : see declaration of 'LEO::Framework' 1>d:\leadwerks\projects\fpsbase\fpsloader.cpp(569) : error C2228: left of '.SetWater' must have class/struct/union 1>d:\leadwerks\projects\fpsbase\fpsloader.cpp(574) : error C2039: 'GetRenderer' : is not a member of 'LEO::Framework' 1> c:\program files (x86)\leadwerks engine sdk\cpp\leo\leoframework.h(16) : see declaration of 'LEO::Framework' 1>d:\leadwerks\projects\fpsbase\fpsloader.cpp(574) : error C2228: left of '.SetWaterHeight' must have class/struct/union 1> These are a few of the errors... Is there something I am missing?
  19. Works like a dream, thanks again for all your help...
  20. If you use the demo you created and then try to use any 2D functions after the leglEnd you cannot...
  21. Yes I did both of them... If I run my start and end code, with your texture function everything works... but if I use your start and end functions it seems like the co-ordinates are meesed up.. i.e. I get a white screen or a large white block... and I don't see the difference, this is my code.. void glStart2D(TScene &scene) { glPushMatrix(); glMatrixMode (GL_PROJECTION); glLoadIdentity(); glOrtho(0, scene.sx, scene.sy, 0, 0, 1); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Drawing color. glColor4f(1.0f, 1.0f, 1.0f, 1.0f); } void glEnd2D() { glBindTexture(GL_TEXTURE_2D, NULL); glDisable(GL_TEXTURE_2D); glMatrixMode(GL_MODELVIEW); glPopMatrix(); // Undo changed settings. glDisable(GL_BLEND); glCullFace(GL_BACK); glDisable(GL_CULL_FACE); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); } The main difference I see is that I have "glMatrixMode (GL_PROJECTION);" which if I set it to GL_MODELVIEW I do not get the images... I also use glOrtho not gluOrtho2D.. glStart2D(scene); glColor4f(0.0f, 0.0f, 0.0f, 0.5f); // have to translate the rotational origin to the center of the plane glTranslatef(size.X/2,size.Y/2,0.0); // rotate it by angle required.. glRotatef(zrotation,0.0,0.0,1.0); // reset the rotation origin.. glTranslatef(0-size.X/2,0-size.Y/2,0.0); // build the plane at 0,0... by size x and y glScalef(1.0f, 1.0f, 0.0f); glEnable(GL_TEXTURE_2D); BindTexture(this->roseimage, 0); // LE command. glBegin(GL_QUADS); glTexCoord2i(0,0); glVertex2i(0, 0); glTexCoord2i(0, 1); glVertex2i(0, size.Y); glTexCoord2i(1, 1); glVertex2i(size.X, size.Y); glTexCoord2i(1, 0); glVertex2i(size.X, 0); glEnd(); glEnd2D(); But using this start and end and the above code, everything works fine.. I did have a problem but I once I did a glDisable(GL_TEXTURE_2D); everything seems to work as I want it... I know this start and end do not support 3D drawing but I only need the 2D... I would still like to know what I am doing wrong.. Interestingly I created a new function will your tutorial code in it and using your start and end, when I called the function I still had the same problems... I should add that I am using a modified verion of Gamelib, which may or maynot be causing an issue..
  22. I cannot get this to work, I copied your code and that works fine... I applied your code to my project... the functions and include are as in your code... This is the code were I try to use the 2D and texture draw... leglBegin(); glColor4f(0.0f, 1.0f, 1.0f, 0.5f); glTranslatef(size.X/2,size.Y/2,,0.0f); glRotatef(zrotation,0.0f,0.0f,1.0f); glScalef(1.1f, 0.8f, 0.0f); leglBindTexture(this->roseimage); glBegin(GL_QUADS); glTexCoord2i(1,1); glVertex2i(0-size.X/2, 0-size.Y/2); glTexCoord2i(1,0); glVertex2i(0-size.X/2, size.Y/2); glTexCoord2i(0,0); glVertex2i(size.X/2, size.Y/2); glTexCoord2i(1,0); glVertex2i(size.X/2, 0-size.Y/2); glEnd(); glLoadIdentity(); leglBindTexture(NULL); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); leglEnd() I want the texture in the top left corner spinning... any thoughts? I get nothing on the screen?? I also pasted your code in and I get the line following the mouse but the GL_QUADS does not display??
  23. Thank you... I appreciate the effort.. nice review..
  24. Either would be very much apprpeciated, problem is 2 fold understanding the initialization for 2D objects which based on my tests I had to use GL_PROJECTION, the coordinate system for 2D and the internal pixel coordinate system, finally loading and applying DDS textures... The first 2 I managed to work around, although I think I did something wrong in the glOrtho function because when I load my 2D object I get very strange lighting affects... But as I said anything you can provide in the way of tutorial or advice would be very helpful, thanks
×
×
  • Create New...