Hexagonal drop targets

Want to talk about something that isn't covered by another category?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5384
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Hexagonal drop targets

Post by richmond62 » Thu Jan 09, 2020 11:04 am

Thinking a bit about this . . .
Attachments
Hive.jpg
Hive.jpg (8.03 KiB) Viewed 1869 times
Last edited by richmond62 on Thu Jan 09, 2020 7:45 pm, edited 1 time in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8418
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Heagonal drop targets

Post by FourthWorld » Thu Jan 09, 2020 4:30 pm

Use polygon objects, or a lot of math. But I think polygon objects would be simplest for hit-testing.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5384
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Hexagonal drop targets

Post by richmond62 » Thu Jan 09, 2020 7:46 pm

Polygon objects are always going to be better than blowing my brains with Mathematics. :D

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8418
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Hexagonal drop targets

Post by FourthWorld » Thu Jan 09, 2020 7:58 pm

It's effectively the same arithmetic, but done in the engine in compiled object code rather than via script. I've found that it takes a very large number of objects on a card to slow hit-testing below what would be needed if scripted instead.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Off-Topic”