Jump to content

Chiblue

Members
  • Posts

    589
  • Joined

  • Last visited

Everything posted by Chiblue

  1. When using editor, I start building a scene and everything is working really well, then at a point in the middle, I go to game mode to test my scene and the return to edit mode and I get errors about "Failed to open file"... when I look at the log I see that I am errors on the lua scripts. The scripts in the log are ones that have been in the scene without any problems. These are very simple scripts... and the message is "CreateClass (a nil value)" require("Scripts/constants/properties") local class=CreateClass(...) function class:InitDialog(grid) self.super:InitDialog(grid) end Why is this happending? the scripts are all the same, I am using the default Class script for most of my objects and as I stated this seems to work well for a while... If I go back to a previous save before the error everything is fine... I does not seem to be when I add anything particalur...
  2. Chiblue

    DrawText()

    Just saw this, I use my own open gl functions for all 2d objects le 2d functions are limited and what you will find is that as soon as you start using them you need to do things they don't support. Save yourself a lot frustration and build up a suite of your own 2d open gl functions. Once you understand the basic princiles it's actually very simple and offers many options for improvement.
  3. Chiblue

    DrawText()

    Just saw this, I use my own open gl functions for all 2d objects le 2d functions are limited and what you will find is that as soon as you start using them you need to do things they don't support. Save yourself a lot frustration and build up a suite of your own 2d open gl functions. Once you understand the basic princiles it's actually very simple and offers many options for improvement.
  4. Actually the coding is relatively simple compared with a A* graph or even moving entities together... the big difference with a neural net approach is like a neuron each bot on cares what it's nearest neighbors are doing... so rather than all following one, each ones behaviour is based on that of those bots within a sphere of influence... you have a lead bot and the others are basically connected by being within a sphere, each bot instance has code that defines it has the leader or not. If it is the leader then it follows the current behaviour, if it is not the leader then it follows those around it... so basically any action trickles down from the lead bot to those next and then the next furthest and so on, until it reached the furthest bots... by building in a small time delay for each bot to respond to the others around it (actually those nearest within the sphere of influence) you end up with much more organic flock motions. this is becuase the impact of the behavior by the lead affects all others over a space of time, not immediately, so in my scenario when I change formation it happens over time not immediately... Hope this makes sense...
  5. I have been working on my AI control mechanism and have gotten most of the functions I want to use working but now I hit a dilema and wonder if anyone else has been down this track? I have a multi-layer, multi-resolution graph A* path finding routing that works very well for guiding a bot to a location in my scene, and thanks to help from you guys I have now got a inside building raycast mapping engine that builds a layer onto my exisiting graph with entry/exit links and works very well, thanks for the help. Ok my problem or design consideration is this.... I want to addin the ability to control a group of bots that will move in a formation of sorts, but the question here is, I have 2 options, 1 I take on bot in the group as a leader and have the other bots maintain thier relative position to that bot in the formation, or I build a neural net control mechanism for all the bots to get the the desired location (formation relatively speaking). The reason I am asking this is that the option 1 would resuilt in a formation movement but will probably appear very mechanical, were as the neural net machanism will be more of a natural motion. I basically have options 1 and it is sort of a mechanical motion, but I would be interested in any experience anyone has had in doing this?
  6. Chiblue

    VS 2010

    I was using VS2010 express but had some issues, LE though was no one of them and everything seemed ok, I went back to VS2008 becuase of some wierd things in the editor, I really like the intellisnse though in VS2010 you don't have to wait for Christmas for it to update on large projects... Also looking forward to SP1 to give it another try... Although I will have to keep VS2008 becuase Dark GDK WILL not work with the latest Direct X SDK, well won't work with anything more recent than 2007. which really sucks.
  7. Do you use raycasting to create the entire graph or just on meshes within the scene? Thank you that helps me to feel better about my approach...
  8. I have been working on building a A* pathfinding solution for use with SBX scenes, I have a basically functional solution with a couple of problems. Buildings and other meshes in the scene that are open to entering, I have been using AABB entity functions to get the bounding areas of meshes, the problem I have whit this is that is say the building is open to be entered the bounding area does not consider this and as such my path finding routing can only find paths around the mesh not inside it... I was going to use a class node point that can be places within the mesh to show the interior structure and entrances, this works but is clumsy and requires a significant effort in the scene design. What would be better would be to allow my graph engine to map the inside of the building even as a new graph layer (Layers represent distinct scene areas, AI bots are not allowed across layers unless specific pathways are designed into the scene) anyway.. I guess what I am asking is there a way to break a mesh down so that I can find if the interior is accessible and if it is open within. I was thinking of casting a raycast on all meshes to map them. I have a scene preperation routine that prepares the scene to run on my dedicated server, this maps all the meshes and creates the layers and graphs for each layer. this cuts down load time and all bot control is done on the server. Any creative ideas would be appreciated... The other issue I am having is bot control, I currently have all players, human and AI using body controllers, I am not sure if this is a practical solution, should I just create bounding boxes and then move the players, other than the client player this way, but keep the client player using a body controller... or is there practically no difference between these 2 approaches, I don't want to find when I get this functioning the right way that when I hit 50 players both AI and human the clients cannot deal with handling all the body controllers... thoughts please? thanks
  9. I actually found the problem, and this was purely by accident, but what happens if if you try to use functions in LE like LoadMesh, LoadTexture, LoadModel etc... within a callback from DarkNet you get this message, I am assuming that something in these LE functions is trying to do something that causes DarkNet to fail.. I change my code to move all these from within any callback steams and everything is working fine... Lumooja - can only talk from experience and I agree in general products like DarkGDK, DarkPhysics etc are buggy, which is one of the reasons I came to LE originally... but I don't know how much you know about DarkNet but this is not produced by The Game Creators, just like LE it is sold through The Game Creators, but the actual product was developed outside the Dark products, I believe it is called DarkNet simply becuase the first iteration of the product was written for DBPro... Given the buggy nature of The Game Creators products I would not have gone this way if it had been from them.. this product is very similar to LE and is a one man band who created it and supports it, for support you get direct contact with the creator so things get resolved quickly.. I have had several issues all either design questions or problems and within a few hours I have always got a response with enough detail to work through... I have the product working now, written as a dedicated server and the game clients... the communications and packet passing works very well and so far (only had 3 clients running) seems to be fast. The only other DarkXXX product I use is thier AI engine, which I use in my server to spawn and control bots in the client... although so far I am using simple AI control (hope to expand it once working).. I have found the my client can forcus on "look and feel" for the game, while my server focuses entirely on game mechanics like spawning, weapons, characters, AI interaction the client simply places players and AI and moves them based on what the server tells them, so far it works very well, this is the same mechanism that games like BF2, BF2142 BF BC2 all use, the single player games are really a multiplayer but running a local server that provides the AI control... Anyway, if you want to take a look - DarkNet Website
  10. I am using DarkNet as my FTP/UDP engine to provide multiplayer communications with a dedicated server program... Everything has been working until I try to use LoadScene function in LE. When this runs I get a DarkNet error stating the following "An Error occured in the internal function (_ManageCompletionPort) whilst executing. The cause of the error is unclear at line 882 of the file ".\CompletionPort.cpp". Error code -1 Version "Release v1.1.7 (Sep 18 2009, 16:07:44)". Woudl you like to exit?" I do not understand why LoadScene would affect TCP or UDP comms, can someone give me some idea of what is happening, does LoadScene perform and TCP or UDP communications?
  11. It would be very helpful to have the options panel in the editor to be a lua class script so that we can customize these settings for our own use... or even have the ability to create an options.lua that will add to the existing functions.
  12. problem here is you hit a limit on the number of clients that can connect. Games like cod mw2 do this but you are limited to the number of clients if you want 50 or more clients you need a dedicated server.
  13. Sm3? I guess I should write a conversion routine that takes the scene and builds a config file for my server to load..
  14. I am using pretty much standard open GL functions to allow me to rotate objects... but I do not know what I am doing wrong maybe there is something I need to initialisze first but I am calling my leglDrawImageRect which I have included which in a different project loads the image ang rotates it in a 2d environment... here is the associated code... can someone help?? void leglBegin(TCamera camera, float zoom, CullMode cm) { // Setup projetion according to argument if (NULL != camera) { // Save current projection matrix. Then reset glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); // Calculate the view frustum float nearRange, farRange; GetCameraRange(camera, nearRange, farRange); float theta = 1.0f / zoom; // tan(45°) = 1.0f float aspect = float(BufferWidth(CurrentBuffer()))/BufferHeight(CurrentBuffer()); glFrustum (-nearRange*theta, nearRange*theta, -nearRange/aspect*theta, nearRange/aspect*theta, nearRange,farRange); // Reset transformation glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); // LE uses a differently handed coordinate system than ogl does glScalef(1.0f, 1.0f, -1.0f); // Calculate the LookAt vectors (camera direction and up vector)... TVec3 from = EntityPosition(camera, true); TVec3 to = {0,0,-1}; to = TFormVector(to, camera, NULL); to += from; TVec3 up = {0,1,0}; up = TFormVector(up, camera, NULL); // Set LookAt gluLookAt(from.X, from.Y, from.Z, to.X, to.Y , to.Z, up.X, up.Y, up.Z); } else { glPushMatrix(); // Set orthographic projection (used for 2D drawing) // Get the current viewport/buffer size. int vPort[4]; glGetIntegerv(GL_VIEWPORT, vPort); // Set the projection gluOrtho2D(0, vPort[2], vPort[3], 0); // like glOrtho(0, vPort[2], vPort[3], 0, -1, 1); // Reset transformation glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); } // Setup default drawing settings. // Alpha blending. glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Backface culling. if (CULL_NONE != cm)glEnable(GL_CULL_FACE); if (NULL != camera)glCullFace((CULL_DRAW_CCW == cm) ? GL_BACK : GL_FRONT); else glCullFace((CULL_DRAW_CCW == cm) ? GL_FRONT : GL_BACK); // Depth test for 3D projection if (NULL != camera)glEnable(GL_DEPTH_TEST); // Drawing color. glColor4f(1.0f, 1.0f, 1.0f, 1.0f); } // End drawing. Set "was3D" to true if you specified a camera at leglBegin (= used 3D projection). void leglEnd(bool was3D) { // Undo changes only made in 3D mode (camera != NULL) if (was3D) { glMatrixMode(GL_PROJECTION); glPopMatrix(); glDisable(GL_DEPTH_TEST); } else glPopMatrix(); // Reset transformation. 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); //leglBindTexture(NULL); } void leglBindTexture(TTexture texture) { if(NULL != texture) { glEnable(GL_TEXTURE_2D); BindTexture(texture, 0); // LE command. } else { glBindTexture(GL_TEXTURE_2D, NULL); glDisable(GL_TEXTURE_2D); } } void leglDrawImageRect(int x, int y, int w, int h, TTexture image, TVec3 rotation, TVec3 scale) { leglBegin(); glTranslatef(w/2,h/2,0.0); // rotate it by angle required.. // rotate X if(rotation.X != 0.0) glRotatef(rotation.X,1.0,0.0,0.0); if(rotation.Y != 0.0) glRotatef(rotation.Y,0.0,1.0,0.0); if(rotation.Z != 0.0) glRotatef(rotation.Z,0.0,0.0,1.0); // reset the rotation origin.. //glTranslatef(size.X/2,size.Y/2,0.0); glTranslatef(0-w/2,0-h/2,0.0); // build the plane at 0,0... by size x and y glScalef(scale.X, scale.Y, scale.Z); if(image != NULL) leglBindTexture(image); // LE command. glBegin(GL_QUADS); glVertex2i(x,y); glVertex2i(x+w,y); glVertex2i(x+w,y+h); glVertex2i(x,y+h); glEnd(); leglEnd(); } Like I said this works in a different project, so I don't know what I am doing wrong and see no difference in code....
  15. Sounds like fun... BUT I guess I will parse the sbx, pick up the models... load the mesh and get the AABB limits of the mesh for my AI collision...
  16. Is there an specs or doc available for the structure of the sbx file? It would be useful to know what could be in there so I can build a process to handle anything I find and how it is structured? Also I will need dimensions of the models loaded...what do I need to intialize to use loadmesh?
  17. I am in the process of building a dedicated server for my game client... my problem is that all the information required by the server so that it can control the clients is contained within the scene.. What I would like to do is basically load certain classes from the scene, things like weapons, characters, spawns, bit controls etc... but I do not want to have the scene run on the server. Is there a way that I can load the entities I need from an editor scene file without having to establish a framewerk etc.
  18. I am creating an emitter in my world scene and positions it... I and setting the world to thew foreground world and then creating the emitter, the emitter is showing but is positioned a long way from where I want it. I drew a box and positioned it at the position I wanted and it was perfect. Any idea why this is happening? the froeground wolrd I am using if from the framewerk... i.e. framewerk.GetTransparency().GetWorld()
  19. I read this with interest, I am trying to do a similar thing... but failing, I tried using the z-sort... with depth mask and depth test settings, but my model appears to get culled... also the problem I have with this is my model has multiple materials so this causes problems in it's appearance.. I have not really worked much with worlds, I use the standard foreground for emitters. but can someone help me by explaining how I create my own world (yes I know CreateWorld ) but once it is created how do I ensure my model is rendered to that world and how do I ensure that that world is "on top" of everything else?
  20. Oh my, found my problem I had a corrupted shader pack... that sucks..
  21. So this is the problem I am having, see attached image... the terrain texture only covers the terrain from x/Z 0/0 to x+?/z+? basically one quarter of the terrain... why would this happen? In the attached you can see I am looking basically north from point 0/0 and I see terrain left, nothing right, if I turn 90 to the right I see terrain left and nothing right... but if I move onto the area without the terrain map I still have collision so there is terain just no map.
  22. what do I edit... Same problems with 2.32.. thats good news... well it means its the code... which is not so good...
  23. I installed the latest download of 2.32 and now I get "Unable to find DLL function: ControllerCrouched"
  24. I am not sure whether my problems are 2.4 but my last project using 2.32 worked very well, but 2.4 seems to have problems, I am tacking my project back to 2.32 and then if everything works I will move to 2.4 don't see lots of differences... so should not be too difficult..
  25. Does anyone else use 2.40? I seem to be having a lot of problems, I am going to go back to 2.32 and see if I have better lock with that...
×
×
  • Create New...