• 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.
  • entries
    19
  • comments
    46
  • views
    39417


11 Comments


Great article!!!

I personally use bounding box collision for most projects, and sometimes I mix in using an array to check a grid. I rarely use Pixel Perfect unless need be, but I have a great desire to make more classic games. :)

Keep up the great work!
1

Share this comment


Link to comment
Thanks!

I am doing this research on pixel-perfect collision for my last project, I want it to be as precise as possible, even if the player is using wide quad high def with 2560x1440!
This way I can insert even small projectiles and make them work well without hitting air or anything.
Just to make it more visually appealing, if you get me, as well as training myself while doing it!

Still, the pixel-perfect is just one step away from the bounding box!
It just forces me to optimize further!
I'll probably go back and use simple circular/box collision if the performance proves itself invincible! haha
1

Share this comment


Link to comment
Nice article. Long ago I did my own pixel perfect collision, using the 1-bit mask you mentioned before, but performing a bounding box 1st. This turned out to be a requirement for my shump; if any game type needs precise collision, it's shumps. Back then, I didn't know what spatial hashing was, but, it didn't seem to matter for my game as I never had that many objects/enemies.

As you probabl know, I've become a spokesman for 2d physics libraries to do my collisions and movements, but It's always good to have a good understanding of how it all works.
1

Share this comment


Link to comment
Yes, in this article I speak about the bounding boxes, explaining a little how to use them!
As you can see here, in my first paragraph of the bounding box section:
[quote]The bounding box check is both, the most easy and the most efficient way we have to reduce overhead on pixel-perfect collision games! Before you check if two sprites are colliding you check if they are near enough to have any chance of collision. If their bounding boxes aren't touching, there's no reason to check for pixel collision, since all pixels are necessarily inside their bounding boxes.[/quote]

I also go on a bit around simple spatial hashing, nothing fancy, just the old immaginary space boxes.

I'm actually reading a little on Box2D as well as Chipmunk, but I have no projects that needs more physics other than simple gravity, if you get what I mean. I'm somewhere near metal slug or megaman x series.
No doubt I'll be using physics on my next titles, thats for sure! Most probably Box2D.

Thanks for the input!
1

Share this comment


Link to comment
Nice article.

What is the reason that it is common to divide the playing are into 4? why isn't there any other number being commonly used?
1

Share this comment


Link to comment
Actually, 4 is used just as an example everywhere. Most games will probably use a grid with more sections!
Still, that's way too much game-dependant! This is the reason why we use 4, it's just an example, let's make it simple!
Just consider that if your game has not a real lot of entities to collide, 4 can be a good number of sections! (actually even 2 can do the trick...)

When designing your game collision detection system, consider the following:
1 - Grid Shape;
2 - Grid Size.

The final number of sections will be nothing more than a consequence of these.
At the Optimization part of the article I speak about different grids!
[quote]If you pay attention to our grid, it has only 4 sections, the sections will have lots of objects in them, what if we increased the number of sections to... let's say... 10? What if, instead of dividing in 4 cartesian-like quarters I divided in horizontal sections?[/quote]
1

Share this comment


Link to comment
Nice article.

Just one note. Isn't a "boolean matrix" just a very inefficiently implemented bit mask?
0

Share this comment


Link to comment
Yes, they're basically the same thing and both can be implemented in relatively efficient ways. The advantage of the matrix is that it is intuitive to implement, better for beginners as simplicity is welcome. Wont make much difference in most cases, since anyone who is willing to implement such thing instead of using Box2D or other library is building simple games... If not, then this person ain't a beginner anymore, knowing what has to be done and how.

As of our example here, we will make few bitmask collision tests per frame, since [i]player/bullet [/i]versus [i]ground [/i]shouldn't use it.
2

Share this comment


Link to comment
Nice article. While I'd thought to combine the pixel perfect CD with bounding boxes, it never occurred to me to separate screen regions. First few minutes on this site and I've already learned a new technique.
1

Share this comment


Link to comment
Thanks for your comment, Fractur65!
If you wish to go deeper, try some of the links at the bottom of the article, they have more in-depth information as well as techniques not explained here! It's really worth 5 min to take a fast look at each and see if they are interesting to you!
0

Share this comment


Link to comment
I skimmed them, and plan on reading more.. I'm always looking for more resources, so I was glad to see you included so many links at the end. This came at a time, I'm actually working on a small (very, I am still new to this) project that's going to have a lot of gunfire to check collisions for.
0

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now