Detecting collisions in LÖVE games

Conclusion

Animations, game physics, collision detection, and player input handling should give you all the tools you need to create your own game. All you need now is an idea and a bunch of talent to make it a reality.

Have fun!

Infos

  1. LÖVE 2D: https://love2d.org
  2. Lua: https://www.lua.org/
  3. "A LÖVE animation primer," by Paul Brown, Linux Magazine, issue 234, May 2020, pg. 88: https://www.linux-magazine.com/Issues/2020/234/I-3-Animation
  4. "Implementing physics in a LÖVE game," by Paul Brown, Linux Magazine, issue 235, June 2020, pg. 90: https://www.linux-magazine.com/Issues/2020/235/Gravity
  5. draw: https://love2d.org/wiki/love.graphics.draw
  6. Repository for the code in this article: https://gitlab.com/linux-magazine/237/-/tree/master/
  7. Contact objects: https://love2d.org/wiki/Contact
  8. Body fixtures: https://love2d.org/wiki/Fixture
  9. body:applyForce: https://love2d.org/wiki/Body:applyForce
  10. body:applyLinearImpulse: https://love2d.org/wiki/Body:applyLinearImpulse
  11. Input callbacks: https://love2d-community.github.io/love-api/

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Gravity

    Video game animation is not simply a matter of making your characters move – you also have to consider the physics of the world in which they move.

  • I <3 Animation

    LÖVE is an extension of the Lua language, designed to make developing games easy. In this tutorial, we'll explore this framework by creating some animated sprites.

  • Tutorials – OpenSCAD

    OpenSCAD lets you use simple scripts to build 3D bodies from primitive shapes that you can then send to your 3D printer. It also lets you create custom shapes for pieces and objects. In this article, we look at two ways to do just that.

  • True Love … and Microsoft Love
  • Perl: OpenOffice Label Merge

    OpenOffice offers a selection of preconfigured formats for users who need to print their own self-adhesive labels. Perl feeds the address data to the document.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News