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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:21:53+00:00 2026-05-23T15:21:53+00:00

So I’m using Unity to do this, but I’m not sure that matters. I

  • 0

So I’m using Unity to do this, but I’m not sure that matters.

I have enemies that are off the visible screen, and I’d like to have indicators on the side of the screen to denote where they are. That’s fine, but there’s a lot of enemies so I want to group them into blobs. As in, rather than showing 8 indicators on top of each other, I want 1 indicator with an (8) next to it.

So right now, my algorithm is:

  • minimum blog range is a constant that I set
  • loop through all enemies
    • check distance to all enemies already assigned to blobs, if within range, assign to blob
    • if not, check other non-assigned enemies, if any are within blob range, make a blob

I’m doing this every frame, and it feels inefficient. What can I do to improve this as well as save on processing between frames. As in, what could I do with the previous frame’s data to make this better (since the likelihood of the blob’s members changing is very low, but it’ll definitely have an updated position).

Or, should I just stop worrying about it and continue on, because it’s just vector math and it isn’t really going to cause problems for the engine.

  • 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-23T15:21:54+00:00Added an answer on May 23, 2026 at 3:21 pm

    You’re probably fine with whatever you have currently as far as processing power in concerned.

    There is an interesting approach to the problem of proximity grouping using genetic algoritms: http://www.cbu.edu/engineering/maesc/maesc03/FullPapers/d3-1-doc.pdf

    Also, this links here look promising: K-means algorithm variation with equal cluster size

    But honestly, I’m good enough at math to actually give a solid answer…

    • 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 have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
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've got a string that has curly quotes in it. I'd like to replace
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need a function that will clean a strings' special characters. I do NOT

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.