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 7939097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:59:47+00:00 2026-06-03T22:59:47+00:00

I’m writing a basic game. I want a cursor image with an actual proper

  • 0

I’m writing a basic game.

I want a cursor image with an actual proper outline for collision detection. This is NOT for the mouse– I want little cursors flying around in my game, and I don’t want their bounding box to be a rectangle.

But I’m new to Allegro, and graphical programming. My first idea was to use al_draw_polygon to create a standard cursor look-a-like, but then I realized I have absolutely no idea how to figure out what vertices to feed it. Is there a better way of doing this? Also, what is the standard method for figuring out the coordinates of vertices relative to one another when drawing a polygon? Surely you don’t draw up a graph on paper and calculate it out every time?

The other way I thought of was to load an image of a mouse, but then it’d be rectangular. How do I do this properly?

Note: C++. Figure that was a given, but just in case.

  • 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-06-03T22:59:49+00:00Added an answer on June 3, 2026 at 10:59 pm

    You are asking both how to draw the cursors and how to do collision detection. While related, those are two separate topics.

    If you are just starting off, then I would recommend loading 32-bit RGBA PNG files for the cursors. The alpha channel will allow you to draw non-rectangular images. You can also rotate and/or scale the images.

    Then you have to worry about collision detection. That really has nothing to do with Allegro. You could use any 2D physics library or just look up formulas on how to check if a line collides with a triangle, etc. It’s easiest to just start by approximating a box around the vital area of the object. You can always build more advanced collision detection later.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.