Contrast crosshair

Post Reply
User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Contrast crosshair

by Sergey » Post

I would like to see contrast crosshair in future releases of MT.
On dark background it is light.
On light background it is dark.
On grey background it is (no, not grey) light.... contrast anyway.

I thought something is broken and now I don't have a crosshair. It turns out I was pointing to the sun — white crosshair on white background.

I think it will not be so hard to implement.

User avatar
kaadmy
Member
Posts: 706
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

Re: Contrast crosshair

by kaadmy » Post

Minecraft has a per-pixel shader to change the crosshair color to the opposite of what's behind it, it's actually morehelpful than you'd think.
Never paint white stripes on roads near Zebra crossings.

Pixture

User avatar
paramat
Developer
Posts: 3626
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Contrast crosshair

by paramat » Post

The crosshair can be customised by using a crosshair texture in a texture pack, see https://github.com/minetest/minetest/bl ... ks.txt#L60

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Contrast crosshair

by Sergey » Post

paramat wrote:The crosshair can be customised by using a crosshair texture in a texture pack, see https://github.com/minetest/minetest/bl ... ks.txt#L60
What dimensions of texture should be? 8x8? 16x16?

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

Re: Contrast crosshair

by kaeza » Post

It may be any size. It's rendered 1:1 on the screen.

Image
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

Re: Contrast crosshair

by kaeza » Post

Something like this should work fairly well:

1x:
Image
10x:
Image

Image
Image
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Contrast crosshair

by Sergey » Post

I tried many different crosshair textures. And found the best (at least for me).

Scheme:

Image
Texture has 21px × 21px size. Grey color is transparent area.

Texture:
(download and try it)

Image

Screenshots:
(click for full view):

Image Image
Attachments
crosshair7.png
Crosshair for Minetest
(115 Bytes) Not downloaded yet
crosshair7-big.png
(742 Bytes) Downloaded 1 time
Last edited by Sergey on Sun Feb 19, 2017 15:30, edited 11 times in total.

User avatar
Krock
Developer
Posts: 4508
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Contrast crosshair

by Krock » Post

Inspired from the Moorhuhn shooter games with semitransparent pixels:
Image

EDIT: It would also be possible to use the cursor as crosshair, to prank friends.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: Contrast crosshair

by ABJ » Post

I would personally prefer a crosshair with contrasting middle and outlines. Would be so goddamn confusing to find in a shady-lighty background.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest