Search Unity

Brainstorming

Discussion in 'Scripting' started by gegebel, Nov 17, 2017.

  1. gegebel

    gegebel

    Joined:
    Jan 29, 2014
    Posts:
    469
    I try, since a few days, to create a working concept for surveying resources(metal, mineral...) on a terrain.
    As it is a sci-fi project, I don't want physical objects to represent resource nodes.

    My idea was to have a map under the ground / invisible to players and raycast against it. The raycast info would give me the type of resource I found and depending on the rgb value, find how rich a node it is.

    For example: 255 red = metal 100% / 200 red = metal 80% and so on

    Of course, it's just a concept and would be open to any idea going in this or any other direction.
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Is this a 2d game? If the ground has no real depth, yeah that sounds like a compact manner to do it with. Heck I wouldn't even restrict myself to 3 channels. Instead have various greyscale maps for each resources, and measure the greyscale value (the same 0->255... or higher bitdepth if you go with a higher bitdepth greyscale map) for each one.

    If the map is to be 3d though... you might have issues with it. You could consider using RGB maps for each resource, and use the R channel for the qty, and the other channels to describe depth.

    ...

    I don't know enough about your game though to really consider other options in a realistic manner. Your post is rather vague in that regard. How about expanding on the general concept of the game, as opposed to how to accomplish it, and maybe we could "brainstorm" on implementations with you.
     
  3. gegebel

    gegebel

    Joined:
    Jan 29, 2014
    Posts:
    469
    Sure thing.
    It's a 3D Game. Sci-fi with lots of technology. it's mostly a crafting game. Which is why I want a more advanced survey system.

    The idea is that the player can choose which resources he wants to search and depending on its level, expand the area being searched. I would like it to be a sort of hot / cold game system. The tool would tell the player in which direction to move to get a better place to actually sample resources.

    You could find a similar system in the game Star Wars Galaxies, which you can see
    . For lack of a better explanation.