Jump to content
  • Advertisement

AlexWalters22

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

762 Good

About AlexWalters22

  • Rank
    Newbie
  1. I just want to ask, are you a Wheel Of Time fan?
  2. Lazy Foo man. http://lazyfoo.net/tutorials/SDL/index.php       It goes through many of the things you will need to know about the basic game loop. Input handling, image loading and rendering, sound, basic collision detection, and some things that are more difficult to understand like frame-independent movement. It also goes over things that are included in common games like a game camera and background tiling. It gives you a full(ish) understanding of basic 2D games. It's also a native C library (which means native C++ too). So yeah, that's good.       Books probably won't help you too much until you understand the basic game loop.They tend to be somewhat unfocused in some places because when your an expert, you can forget what was difficult for a beginner. Also, I wouldn't worry about coming up with amazing solutions to problems(or any solution without research), or copying others code(as tonemgub said) as long as you try(really try) to understand it. Eventually you will get to a point where you do understand, and then you will really want to change copied code or rewrite poorly understood code (because you can do it better).I struggled with the frustration at not being able to come up with a solution on my own for a while before I realized I would just get there eventually with some perseverance and a touch of diligence.   I hope Lazy Foo helps you and if you have some specific questions I would love to answer them, send me an email or a PM on here, and I will get back to you! Much luck to you on your journey.
  3. Thanks for the feed back guys(Ravyne and EDI). FIrst of all, I will fix the 256x224 resolution to say SNES (woops). I understand that it is probably a bad idea in most situations to scale to fit the screen no matter what and it definitely produces scaling artifacts and distortion. I'll add a disclaimer at the top of this article identifying those drawbacks. For the most part, the reason that I created the article is that it was suprisingly tricky to figure out the rights steps to take to actually get rid of letter-boxing if one wanted to. It is a fairly simple (albeit crude) way of supporting any size thrown at it without letter-boxing it. It is definitely a temporary fix and not a long-term solution. I thought I would show how I did it after reading this:   http://comments.gmane.org/gmane.comp.lib.sdl/61628
  4. AlexWalters22

    Framework for first game

    If this is to be the first game you create on your own or ,especially, if it's your first game period, I would say that it's overly ambitious. Very few people actually want to let pong or Tic-Tac-Toe be the first game they make, but if your just starting that's exactly what I would reccommend. Trying to complete a large project when starting out is pretty discouraging, coming from trying to make a large game early on myself. If you are experienced in making games, however, forgive me for assuming . I would have to second Unity in that case.
  5. So, I have been trying to familiarize myself with the Separating Axis Theorem by doing a very basic collision test AABB vs. AABB. In this one I am only testing against the x and y axes. Now this code works, I tested it from every direction, but I don't know how. I messed up the naming or did some math wrong and it worked right, which is fine, except that I would like to know how to apply this to OBB vs. OBB and Triangle vs. OBB etc. Any help would be greatly appreciated. I will try and comment on things for clarification.   This function is much slower than it should be, but I created it to be very readable(Or so I thought)   //The functions returns an int because eventually I want it to return the penetration distance int BoundingBox::IsAABBColliding(BoundingBox * i_Box) //The i prefix is for distinguishing that it is an input variable {     // c1                c2     //  ----------------     // |                  |     // |                  |     // |                  |     //  ----------------     //c4                 c3     //     // c = corner     //The corners and centers of the rectangles     Vector2D c1A, c1B;     Vector2D c2A, c2B;     Vector2D c3A, c3B;     Vector2D c4A, c4B;     Vector2D centerA, centerB; //No reason to calculate these(until OBB)     //Center of first     centerA.X = xCenter, centerA.Y = yCenter;     //Center of second     centerB.X = i_Box->xCenter, centerB.Y = i_Box->yCenter;       //w is width, h is height     //Corners of first     c1A.X = x, c1A.Y = y;     c2A.X = x + w, c2A.Y = y;     c3A.X = x + w, c3A.Y = y + h;     c4A.X = x, c4A.Y = y + h;     //Corners of second     c1B.X = i_Box->x, c1B.Y = i_Box->y;     c2B.X = i_Box->x + i_Box->w, c2B.Y = i_Box->y;     c3B.X = i_Box->x + i_Box->w,  c3B.Y = i_Box->y + i_Box->h;     c4B.X = i_Box->x,  c4B.Y = i_Box->y + i_Box->h;     //Left normals of top and right     //These are the two axes(in this case) that I need to check against     Vector2D rightNormalA = c2A - c1A;     rightNormalA.Y *= -1;     float tempX = rightNormalA.X;     float tempY = rightNormalA.Y;     rightNormalA.X = tempY;     rightNormalA.Y = tempX;     Vector2D topNormalA = c3A - c2A;     topNormalA.Y *= -1;     //Do the left normal     tempX = topNormalA.X;     tempY = topNormalA.Y;     topNormalA.X = tempY;     topNormalA.Y = tempX;     //  ^     //  |     //  |     //  | P topNormalA     //  |     //  |     //  |               Q rightNormalA     //  |---------------------------------> //At this part I though I had them right at first. It only stopped the box when it was completely inside of it. So i messed around with the order of //the corners and it worked from every angle( I don't know why). Also the numbers represent which box the projection is for.   min = minimum max = maximum proj = projection     //The minimum and maximum projections of box 1     float q1_min_proj = Vector2D::DotProduct(c2A, rightNormalA); //x axis     float q1_max_proj = Vector2D::DotProduct(c3A, rightNormalA); //x axis     float p1_min_proj = Vector2D::DotProduct(c3A, topNormalA); //y axis     float p1_max_proj = Vector2D::DotProduct(c4A, topNormalA); //y axis     //The minimum and maximum projections of box 2     float q2_min_proj = Vector2D::DotProduct(c2B, rightNormalA); //x axis     float q2_max_proj = Vector2D::DotProduct(c3B, rightNormalA); //x axis     float p2_min_proj = Vector2D::DotProduct(c3B, topNormalA); //y axis     float p2_max_proj = Vector2D::DotProduct(c4B, topNormalA); //y axis     bool separate_p = p1_max_proj < p2_min_proj || p2_max_proj < p1_min_proj;     if(separate_p)     {         return 0;     }     bool separate_q = q1_max_proj < q2_min_proj || q2_max_proj < q1_min_proj;     if(separate_q)     {         return 0;     }     return 1; }
  6. AlexWalters22

    Game Engine Development and Design

    If you want to design a 3D game engine, I would reccommend getting the book Game Coding Complete 3rd or 4th edition. You can download the source code for the engines that he creates throughout the books here -> http://www.mcshaffry.com/GameCode/.
  7. AlexWalters22

    Struggling a little

    I always find that a whole lot of prior planning helps when creating a game, even one thought to be very simple. It gives you a clear destination and direction along with a more definite number of steps to get there.
  8. AlexWalters22

    Events help

    I have been working on a simple space shoot em up and I have been having some trouble with the movement of my ship. It moves fine when you use the directional keys except that when your first hit them the ship jumps then begins moving fluidly. Another question: whenever I have a direction key presssed down and then hit any other keys, then my ship ceases movement and no longer picks up the key being pressed. I would greatly appreciate help and thanks in advance. p.s. If you need more information don't be afraid to ask
  • 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!