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 trying to create a 2D platformer (Mario-type) game and I am some
Target string: Come to the castle [Mario], I've baked you [a cake] I want
I'm perplexed. At CodeRage today, Marco Cantu said that CharInSet was slow and I
The following can be done by step by step, somewhat clumsy way, but I
I'm getting the weirdest problem using XCache and PHP 5.3.2 there is a class
I'd like to use a variable like $GET[name] that always outputs a MySQL-safe version
I'm trying to create a mosaic type script in Javascript and PHP, which makes
In Xcode/cocos2d/box2d I have methods in an .m file called Level1.m, and another in
I am trying to understand the MARIE assembly language. I don't quite understand skipcond

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.