Jump to content
  • Advertisement

Martin Radev

Member
  • Content Count

    19
  • Joined

  • Last visited

Community Reputation

173 Neutral

About Martin Radev

  • Rank
    Member
  1. Martin Radev

    3D World editor

    Hello!   I am searching for a 3D map editor where I can put models and maybe add meshes in a very simple way. Also, I may want to add certain attributes to an object on the map like some kind of string, integer, etc. The output should be very easy to read so that I am able to write some code to load it later.   Any ideas?
  2. Can you explain how you got it working?
  3. Here is my suggestion: Every zombie is some kind of convex polygon, circle or something like that. Then you can relatively easy implement collision detection. I did something similar some time ago I guess - https://github.com/martinradev/2dShooter/tree/master/VirtualCommando/src/main/java/me/martin/radev/game/virtualcommando/geometry https://github.com/martinradev/2dShooter/blob/master/VirtualCommando/src/main/java/me/martin/radev/game/virtualcommando/game/interaction/CollisionDetection.java   There are probably some bad java approaches but the idea of collision detection is outlined. One thing to notice is that you will have to do further optimizations to get the collision detection faster. One idea is creating a Binary Space Tree of the map. https://github.com/martinradev/2dShooter/blob/master/VirtualCommando/src/main/java/me/martin/radev/game/virtualcommando/structures/BinarySpaceTree.java Though this is not a true binary space tree and it can be improved.
  4. Martin Radev

    Camera rotation problem

    Ok, I am sorry. I think it is ok, but I got a bit confused of how the scene should actually look like. I did some checks and the position was at it should be. The problem was that it seemed like something was going wrong due to a relatively big FOV. Sorry for the thread.
  5. I have been doing this tutorial http://ogldev.atspace.co.uk/www/tutorial15/tutorial15.html but I have run into problems. I think I did it in a bit different way. The problem is that for some reason at some point the coordinate system seems to change and when I target the bottom and starting going in that direction, I go along another axis.   Basically, I still build a quaternion to the rotation around some axis given some angle.     Vector3 zAxis(0,0,1);     Vector3 xAxis(1,0,0);     Vector3 yAxis = zAxis.crossProduct(xAxis);     zAxis.rotateAround(yAxis, hAngle);     xAxis = yAxis.crossProduct(zAxis).getNormalizedVector();     zAxis.rotateAround(xAxis, yAngle);     yAxis = zAxis.crossProduct(xAxis).getNormalizedVector();     up = yAxis;     target = zAxis; Move of mouse:     if (newMousePosX == mousePosX && newMousePosY == mousePosY) return;     const int deltaX = (mousePosX - newMousePosX);     const int deltaY = (mousePosY - newMousePosY);     hAngle -= deltaX/30.0f;     yAngle -= deltaY/30.0f;     yAngleTotal -= deltaY/30.0f;     if (yAngleTotal > 90.0f) {         yAngle -= (yAngleTotal - 90.0f);         yAngleTotal = 90.0f;     } else if (yAngleTotal < -90.0f) {         yAngle += (-90.0f - yAngleTotal);         yAngleTotal = -90.0f;     }     glutWarpPointer(mousePosX, mousePosY);     I hope I have understood everything correctly. I set the Z-axis and the X-axis and get the Y-axis by the corresponding cross product. Then I rotate the Z-axis around the yAxis given the angle. This is basically, the left-right rotation. I get the new X-axis by the cross product of the new Z-axis and the Y-axis. Then I rotate the zAxis around the new new X-Axis. This is basically the up-down rotation and get the new Y-axis by the cross product. Then I store the up and the target vector. However, this doesn't seem to work as I want. It could be so that everything is fine, but it seems incorrect due to the fact that I have only 1 triangle to orientate around. Do you think that everything is fine? The rotation around axis is done using a Quaternion as explained there and also read additional material on the internet.
  6. Martin Radev

    OpenGL learning methodology

    No, I use the latest dev version of Mesa and the opengl version is 3.0. I am stuck with it.
  7. Martin Radev

    OpenGL learning methodology

    Unfortunately, it seems the newest version is 3.0 in my case. I am using the Intel HD Graphics 3000 and Ubuntu as OS. Is this a huge drawback?
  8. Hello,   I started recently to learn OpenGL. However, I find it a bit confusing at the beginning to start learning it in right way due to many tutorials being deprecated and new ones not being as good as they could actually be.   I will explain the path I have chosen so far and I hope I get some feedback.   Here is how I started. - . I started with these tutorials. I believe they could be quite deprecated, but it seems they are quite fine explained for beginners. - Latest edition of the red book   Meanwhile I will embark on some project just to use what I have learned so far.   So, my question is whether I should really start with something deprecated and probably not done in the right way or I should just go with the latest version of the red book?   How have you started? What do you think is important?   Greetings, Martin
  9. Hello,   I am working on a game using SDL. I was pointers to some 2d primitives, however probably to bad management there were some memory leaks. I switched to use references and not allocate dynamic memory. I believe the problems were due to not following the rule of 3 (not declaring explicitly the assignment operator).   So, my questions is: should I try to avoid dynamic memory allocation. For example, I know that some object is needed in the scope of a function or that it should last for a very very brief period where a few functions have to work on it. Should I in this case pass by reference or by pointer to the object?   What do you think?   To me, it seems that dynamic memory allocation is helpful only when one has to create an array where the size of the array is not known.   I would be grateful if you give some hints and point out when they would be definitely necessary to be used.
  10. Martin Radev

    Proper multiplayer communication

    Thank you. What I wanted was to make the commands shorter. I believe I will use your approaches. The problem was with the latency since the current commands were too long.
  11. Martin Radev

    Proper multiplayer communication

    I made the strings shorter by making the commands to be only by one character and accordingly the numbers to lose their precision. Now, the commands are of the type: rp yuyuyu -0.07            where yuyuyu is the name of the player Before that the command was: rotate player yuyuyu -0.4332702160639106   Since there aren't a lot of commands I think, maybe I can combine rp and -0.07 in a bit representation to save space.
  12. Martin Radev

    Proper multiplayer communication

    I use Java for my game.
  13. Hello!   I am searching for some suggestions how to improve the multiplayer communication in my game. Currently, it is done in the following way:   - I create a server game and other players can connect to it using the ip and the port - They send information about their player and the server receives it - Then the server sends the information to every other player   The commands are of the following way: update player Radev 0.0 0.0 100 100 5000 5000 0.0 rotate player Radev -0.4332702160639106 shoot player Radev 0.0001 0.77878   Do you think I should try to encode it in some way or just make the commands shorter like: upRadev 0.0 0.0 100 100 5000 5000 0.0 rpRadev -0.4332702160639106 spRadev 0.0001 0.77878   However this does not make the commands a lot shorter in any case. Any ideas?
  14. Martin Radev

    Improve rendering

    Thank you. It worked flawlessly.
  15. Martin Radev

    Improve rendering

    Here is an image of the game screen: http://imgur.com/1rCq1Qv Here is the code where I do the fog of war and check whether a players sees another player/bullet: https://github.com/martinradev/2dShooter/blob/master/VirtualCommando/src/main/java/me/martin/radev/game/virtualcommando/view/gui/screens/gamescreen/GameScreenMap.java   I will do that with not computing actually the square root of a number though this would not improve it a lot. I am not quite sure though how to do the other things you mentioned since I always produce on the image every frame and then I have to add the mask again.
  • 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!