Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About S41NT

  • Rank
  1. Well... since we are talking about best techniques, I thought I should ask: considering heap and computational power constraints, the objects have a very simple geometry. With that in mind, SAT or GJK? :)
  2. Thanks for the answers. Let me try to give more details on what I need: Well, the game has physics at its core. A few moving objects collide with each other and all of them collide with the environment. I expect them to gain angular speed and bounce after collisions, which means using only bounding boxes will not work. But of course, that does not mean I need pixel perfect collisions either. If I go with what I called the geometric approach, low vertex count (let's say numVertices <= 6)convex polygons will do for both environment and moving objects. In the pixel approach, the moving obstacles will probably be in a 20 x 20 image. With that in mind, is the geometric approach still the way to go?
  3. Hi! I'm currently working on a physics engine for a 2d mobile phone game. I'm familiar with collision detection techniques used in 3d games, but in a mobile phone, pixel distances are way smaller and i was wondering which approach is potentially faster (since performance is a serious issue): 1) Geometric, knowing the vertices of each object 2) Image based, working with pixel projections 3) A mix of the above I was hopping you could shed some light on the subject. Maybe point me to other threads discussing this (I couldn't find much, sorry). Thanks, S41NT
  4. Hi! I'm working with an LG VX9800 in a 3D game. I wanted to add a periodic translation to a texture, so i chose to use the texture matrix stack, but I'm facing some weird problems. Even though on the simulator everything works fine, when I run the app on the device, the texture is only translated when i get really close to it at a certain angle. If it didn't work at all, I would assume it was not implemented on the device. The fact that the texture is translated in some situations makes me think I might somehow fix the problem. I'm posting the code related to the problem below. This is the only place where I change the matrix mode to GL_TEXTURE in the project. GL_Bind is the function that binds the texture (duh) and DrawPolys makes the calls to glVertexPointer, glTexCoordPointer and glDrawElements. glMatrixMode(GL_TEXTURE); glTranslatex(transX, transY, 0); glMatrixMode(GL_MODELVIEW); GL_Bind (t->gl_texturenum); DrawPolys(&(texture->polys)); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); Any help would be greatly appreciated. Thanks Cesar
  5. Hi! I'm developing a mobile game using the OpenGLES api (I'm not sure I should post here or at the mobile forum, please tell me if I'm at the wrong place). And I remember I heard someone tell me OpenGLES is faster when only one big array is used for all vertex information and different data is accessed using the stride parameter (instead of an array only for vertex coordinates, another one only for texture coords, etc). Does it make any sense? And if so, why? Thanks, Cesar
  6. If I understand things correctly, I should assign a metatable to the userdata pushed onto the stack. I tried, but without sucess. So that means I'm still looking for help :)
  7. Hi! Our team is developing a game engine and we will use callbacks to let script writers deal with collisions and other stuff detected by the engine. So I write a test function which at some point goes like this: // function to be called lua_getglobal(CLuaScript::L, l_pcFunctionName); void *test = (void *)&(; //pushing collision report onto the stack lua_pushlightuserdata(CLuaScript::L, &test); // do the call (0 arguments, 0 result) lua_pcall(CLuaScript::L, 1, 0, 0); At the script, theres a function with the specified name and it is called. But I can't get the report back. Then I tried casting IN THE SCRIPT to the correct type: tolua.cast(variable, "Report"); And everything works. I don't want to cast inside the script. How can I make the callback specifying the type of the argument? Thanks very much.
  8. Hi! I'm developing for pdas and I just can't get the ipaq 4700 to work in vga mode. Could any of you point me to a tutorial or just tell me how? Thanks
  9. S41NT

    ANN - learning AND / OR

    It just occurred to be maybe I should try to explain. I'm not very good at explaining but let's try: You want d to be non-positive if the answer is false (A AND B = false) So that means A * w1 + B * w2 must be equal or less than zero. Because it has to be less than zero for A = 0 and B = 1 or A = 1 and B = 0, both w1 and w2 will have to be non-positive (do the math. None of them can be positive because 1 and 0 must return the same answer as 0 and 1). So we need w1 and w2 <=0. How will we ever get a positive d? It's not possible. Now suppose you have a bias. Then you can get an answer with something like w1 = 0.6; w2 = 0.6; w3 = -1;
  10. S41NT

    ANN - learning AND / OR

    It's been a while since I worked with ANNs, but if I'm not mistaken, it's possibly not a coding problem. You'll never get it working with that threshold. You either add a bias to the node (you know, an input which is allways 1: d = x1*w1 + x2*w2 + 1*w3) or change the threshold to something positive (I would make the neuron biased). If I'm wrong in my assumptions, I'm sure someone here will correct me.
  11. Hummm.... Ok. In a few days I should start coding this, let's see how it goes. If I have any problems, I'll post again. Thanks.
  12. I don't know much about models. My engine is currently using md2 models, which, as far as my knowledge is concerned, do not have skeletal information. I suppose I could export the skeleton in a sepparate file? md3 models include skeleton information?
  13. Hi, I'm working on how to warn the game-engine user that a specific part of the entity was hit (like head, right leg, left wing). So far, the game developer has to create a different entity for each different part and change the parts of the same element together to keep the animations synchronized. I wanted to make this whole process easier for the developer. And I'm looking for ideas, tips, papers, websites, etc to help me figure out the best way to do it. So far, I'm considering something like a scene node (don't know if I should use scene nodes without any change or make a special scheme for entities). The developer will add models to the entity and then use the entity as just one object. When a collision is detected (for example), it will return the object and the sub-object to the user. I also thought that I could have just one visualization model and several other very very simple overlaping models for physics and collision detection computations moving along with the one used for visualization. Performance is a major concern. So... Any ideas? Anyone knows how the big, famous, expensive game-engines work? Thanks
  14. Hi! I'm having a problem geting a pointer from one of my structs... The code used by tolua is something like this: typedef struct type_base { ... float x; struct type_base *nextType; } Type; but when, in the script, I try something like newType = oldType.nextType; newType.x = 10; the access to the x field does not work. In the generated .c file, the field getter returns "type_base", when I wanted to get "Type". How can I solve this problem without having to cast in the script? thanks
  15. S41NT

    Continuous collision detection

    That's very good reading. Now I understand it perfectly! Thanks a lot b34r! That's exactly what I was looking for. [with a zombie voice] Can't wait to implement this... MUST CODE...
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!