• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

111 Neutral

About HendrixA4L

  • Rank
  1. So now here's a question about responding to collisions with multiple entities (if you aren't sick of me yet). Suppose I have multiple wall tiles lined up vertically, and a character to the left moving diagonally right and up towards the WALL2:   ..................[WALL1] ..................[WALL2] ....[char]..................   I would like to use the slide method, but here are my results:   This works on WALL2(the first to collide). I hit it from the left side, the AABBSwept function returns normx = -1, and the dot product causes a slide upwards.   However when I get to the level of the bottom of WALL1, there is a collision under WALL1, and to the left of WALL2, at the same time. And, since I am iterating through these walls (in general from top to bottom), WALL1 is processed first.   Since we collide with the bottom of WALL1, it returns normy = 1, and causes a slide to the right (as it should if there were no other walls).   Then when we process WALL2, we are already inside of it, meaning that we get a negative xEntry and yEntry time in AABBSwept, and therefore it registers no collision, so the character enters WALL2 even though it should collide.   I am not sure how to resolve this, but it seems like we need to somehow order the collisions , or accumulate all the changes into an x and y value that changes the character's position after all entities are processed. Would I need to process collisions in order from smallest collisionTime? that's about all I could come up with.   By the way, feel free to clear any of my previous posts if my long-winded questions are cluttering the page too much.   I appreciate all the help.
  2. Yeah it occurred to me that this only works with some form of initial check for a collision. I was thinking that I wanted to take things piece by piece. Make sure that the sweep worked, and then make everything more efficient with a broad phase check, but in this case I'll have to implement the broad phase first for collisions to work correctly at all.   It was just odd because I've seen a few articles on a similar approach to collision detection and response, and they all seem to have the same "flaw", but they never mention that a broad phase is actually required, just that it makes it more efficient. That's why I thought I might just be doing something stupid.   Thanks for putting my mind at ease. In my 2d tile based game, perfectly horizontal or vertical movement will be pretty common. I'll try to implement the broad phase in a couple days and see if I get that perfect collision response that I've been working at :P   Anyways I appreciate the help, and I would definitely like to see any code you come up with that may work more ideally. Keep me posted with any epiphany :)
  3. It seems you understand where I'm coming from, however, when I work out the logic step by step, That conditional statement is not satisfied. So I must be doing something stupid. So lets say my character is moving left to right, and intersects only the x-axis of the wall. Then: -----------------[ wall ]--- ---[ c ]-->[c_next]------- xEntry = some positive number between 0 and 1; yEntry = -INFINITY; xExit = some bigger positive than xEntry, still between 0 and 1; yExit = +INFINITY; entryTime = Max(xEntry, yEntry) = xEntry; exitTime = Min(xExit, yExit) = xExit; //This means that, looking at all the conditions, we see that: entryTime > exitTime;//First condition fails. exitTime >= entryTime xEntry < 0 && yEntry < 0;//Second condition fails.xEntry >= 0. xEntry > 1;//Third condition fails. xEntry is a valid positive number between 0 and 1 yEntry > 1;//Fourth condition fails. yEntry is -INF which is less than 1 as well. All conditions fail, the way I am seeing it, which means it goes to the else statement. What am I getting wrong here?
  4. Hi there. I have been trying to implement aabb collision detection for a couple days now. This is one of the nicest resources I've found. However, after a lot of testing and re-reading the code, here's something that just isn't making sense for me:   The Sweep function returns a collisionTime value between 0 and 1 even when only ONE axis ends up intersecting at any given time. Shouldn't it only return a non-1 value if there is a point when ALL axes intersect?   For instance, if I have a character sprite that is travelling sideways (only on the x axis), and there is a single square wall sprite, and my character passes under this wall, then there is only an intersection in the x-axis (since the wall is always above my character in the y-axis) so the two sprites never actually collide. However, this algorithm returns an collisionTime between 0 and 1 because of the x-axis intersection.   That means, if I use something like this from your examples:   box.x += box.vx * collisiontime; box.y += box.vy * collisiontime;    the character's movement is affected by this collision, even though it never actually collided.   I think there is some big hole in my understanding. The logic in the Sweep function all seems to make sense to me, but it seems like it returns a valid collisionTime value even when it shouldn't. What am I missing?   Thanks for a great article by the way!