Jump to content
  • Advertisement

HopHopTraLaLaGdaltiBshAna

Member
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

165 Neutral

About HopHopTraLaLaGdaltiBshAna

  • Rank
    Member
  1. HopHopTraLaLaGdaltiBshAna

    a little dilema abotu glut

    I started to develop my simple 2D engine in linux, but at the time I wanted to check it on windows , it was very easy to move it beacuse I wrote the engine with glut and glew, so it took me 10 mintues to compile the engine in windows .    the problem is that i feeling glut is very limiting me , and I tired of it so I think of moving the engine to WIN32 api and remove glut , it allow me more flexibility in my code .   for exmaple : to take a mouse position in glut I need to register event but in WIN32 api its so simple , its only 1/2 functions .   so what do you think ? move the engine to windows and destory the cross platform code or staying in glut . I cant deciding so I asking you . 
  2. HopHopTraLaLaGdaltiBshAna

    trying to avoid using if statements - is this good idea ?

      just make a varrible with the mode and change it ?
  3. HopHopTraLaLaGdaltiBshAna

    trying to avoid using if statements - is this good idea ?

      this function is called every frame        I want that , one class can represnt any Geometry - segment,triangle,and rectangle so the type of the geometry may change a lot so do you think its efficient ? 
  4. I would like to do that every object in my game can changed to filled or non filled . so instead of using if , so I made an array that get  0 or 1 , and number of vertexs , and return the draw mode  0 or 1 means non filled or filled const GLenum vertexToDrawModes[2][4] = { { /*No Filled Shapes */ /*1*/ GL_POINT, /*2*/ GL_LINES, /*3*/ GL_LINE_LOOP, /*4*/ GL_LINE_LOOP }, { /* Filled Shapes */ /*1*/ GL_POINT, /*2*/ GL_LINES, /*3*/ GL_TRIANGLES, /*4*/ GL_TRIANGLE_FAN } }; for exmaple , when triangle need to be drawn its look like that : class Triangle : public EntityNode { private: void Render() { // Update the data in GPU tVBO->VertexReplaceData(Vertexs.data(), (sizeof(Vertex))*3 ); // Render It tVBO->Draw(vertexToDrawModes[Filled][3-1], 0, 3); } and Fillled is bool .   I did this to avoid if , is this good idea ?
  5. Hello everyone .   I developed collision dectecion system that based on the old and the new position of objects - their Displacements . but now I faced with with a bigger problem .   circle in point A jumed to point G , the engine calculate and understand that the circle could collise in both circles while his way to G . but beacuse E created before C, the engine checked it first and that is a problem beacuse the circle in fact collised C before , how can I solve it .
  6. Hey guys .   I finally finished my 2d game engine , and I encountered in some problems .   1 ) I decided to build a pool game and I already finished my physics . the engine could draw segments,rectangle every geometry ,  how should I made a coordinates of Accurate pool board ?   2) My engine "knows" to Translate,Rotate,Scale Texture buy its still hard to map the texture on a small shapes , I need to change the arguments of the scale,translate and rotate function every compile and hope for good result .   suggestions ?
  7. HopHopTraLaLaGdaltiBshAna

    find the closest vector to point

    its up to your age, im only 15 :)
  8. HopHopTraLaLaGdaltiBshAna

    find the closest vector to point

          You may want to check your vector math. The EC' vector as shown in the diagram (arrow pointing from E to C') would be formed as (C' - E). Are you perhaps using (E - C') instead?   yes i'm , in the geogebra I did that , but in my code I saw that and I fixed that . and im really new in non-highschool math
  9. HopHopTraLaLaGdaltiBshAna

    find the closest vector to point

          thanks you very much guys this method which you explained to me had saved to me many resources ! thanks thanks thanks ! And Alvaro I actually checked it , and it seems like I needed the negative one , thanks alvaro
  10. HopHopTraLaLaGdaltiBshAna

    find the closest vector to point

    Hey guys .   every segment which defined by two points there are 2 unit normal vector .   I dont know how to explain it but I would like to find between these two vectors, the vector which is more "looking" to the point .     EC' is the vector that I woudl like to find beacuse he is more looking to Point F .
  11. hey every one , I would like to ask if there any formula to get distance from point A, to plane/segment B-C.
  12. HopHopTraLaLaGdaltiBshAna

    Find a two points in differents segments which their distances is K

      it's still doesnt help me .
  13. HopHopTraLaLaGdaltiBshAna

    Find a two points in differents segments which their distances is K

              I'll tell you guys my problem and why I need that .   there is problem when an object move too fast, the collision system can't deal with it . so I made an idea on paper which take the old and the new position of two movements of circles , and I need to find the Point in/on this segments (from the old and new position) which the distance is equal to the radiuses of the these two balls , and the next conditions and calculations depends on time , but this is the basic .  
  14. HopHopTraLaLaGdaltiBshAna

    Find a two points in differents segments which their distances is K

      I dont know what is respectively : here an exmaple so you can understand me better :     the segments are (0,0) (9,9) (0,0) (9,18) and k is 2
  15. There are two segments A and B, and I would like to find two points Ap and Bp which their distance is K for exmaple :   A (0,0) (9,9) B (0,0) (9,18)   and K is 2   so I will solve that by find AX+b line , and I will solve it by basic algebra, but how should the computer do that ?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!