Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4083100
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:16:14+00:00 2026-05-20T18:16:14+00:00

Mario plays multiple games. Normally, while playing in a game, when he jumps [underneath]

  • 0

Mario plays multiple games. Normally, while playing in a game, when he jumps [underneath] a question block, he gets a free surprise. When he encounters a Goomba or another dangerous hooligan, he simply jumps on its head. After coming to a different game, Mario jumps under a question box as usual and finds that nothing happens. Mario jumps on top of a Goomba and dies. Mario is very confused, what is wrong here?

This new game has collision detection (hence the death from the Goomba) but doesn’t know how to tell which side has been collided with. Assuming only one side can collide at a time, and that the left of Mario can only collide with the right side of an object (right->left; top->bottom; etc.).

How can I do collision testing that also returns which side of poor Mario collided (to ensure jumping [underneath] a box gives him a surprise but jumping [on] a box doesn’t give him anything).

Pseudo-code would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:16:15+00:00Added an answer on May 20, 2026 at 6:16 pm

    You could use current velocity, if your engine/game doesn’t have lag issues.

    For instance:

    • touching box: if vertical speed isn’t ‘positive’, no gift
    • touching foe: if vertical speed isn’t ‘negative’, death

    I’m using vertical axis as usual in geometry, up toward the top of the screen, not usual in screen space where pixels starts at the top, so up is going down.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know this to understand why some games like Mario is
I am wondering about how the developers of games like Mario Kart go about
I'm creating game mario like in win32 GDI . I've implemented the new loop
I make game Mario and I want when I use left key < ,
I would like to write some simple Mario-like game from scratch using language C.
How do sprites work? I've seen sprites from old school games like Super Mario
I have bought a book (Beginning Android Games) by Mario Zechner. On page 149,
I'm trying to make a basic (Mario style) game but my sprite(plumber) doesn't appear,
I want to create a simple Mario-like 2D game. Nothing too fancy, just a
I am playing around a bit with the PushButton Engine for game development in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.