Skip to content

Feature request: ability to hit test built in mouse pointer #95

@programmervsworld

Description

@programmervsworld

Building a mouse based game in SuperBasic for the December game jam I found myself frustrated that there was no real use for the built in mouse pointer. We can turn it on by poking it (poke $D6E0,1), and the documentation says to treat it "like its sprites 65" but there's really no way to hit test with it. This leads developers to have to create a sprite pointer of their own and move around instead so that the hit test command can be registered.

With the 2x core having the ability to do 128 sprites I'm not sure what the implementation would look like. But it seems like we could have a hit command that specifically checks if the mouse pointer is touching a sprite? Something like mousehit(spriteNo) or something?

I feel like this would unlock more UI capabilities and or mature game implementations having that native support in basic.

Note: It's worth mentioning the only way to turn it on and move it to this day is through peeks and pokes in SB. I feel like we are missing out on a nice feature by exposing mdelta and mouse commands but adding an on/off command , position setter, and hit testing for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions