1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

how to recreate the pseudo 3d seen in the game dig it

Discussion in 'Programming' started by JML, Aug 13, 2019.

  1. JML

    JML Wabbajackalope

    Joined:
    Jun 22, 2016
    Posts:
    351
    inside of the game dig it they are making use of some sort of of technique to create a false 3d

    https://apps.apple.com/us/app/dig-it/id1453411110

    does anyone know where i can begin learning about this? initially i thought it was a shadow but the angle of the shadow was rotated 180, it could also be a simple offset where you have a grid adjustment.

    how could i begin learning how this is done?

    thank you
     
  2. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    2,012
    Could be as simple as just two images. When the upper gets a piece cut off, the same is done to the lower with some offset towards center of screen. Or in a more expensive process, multiple copies of the top layer piled over, each with slightly different zoom. It also could be a real 3D effect where the top layer is used to bookend a shape, but that sounds unnecessarily heavy for an effect that can be cheaply simulated in 2D.
     
  3. JML

    JML Wabbajackalope

    Joined:
    Jun 22, 2016
    Posts:
    351
    @NightFrost

    yes making a true 3d would be unneeded, i could do it with vectors but it would not be ideal.

    on the offset of images, how can you make sure that only the part of the lower image that is overlaying the upper one is visibile (so for instance if you had two overlay circles, for one of the circles one the part inside the other circle would be drawn.

    do you know if their is anyway to do this? i know it is possible but im not sure how.
     
  4. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,143
    An image overlay seemed like the answer at first, but I kept looking at images of the game and a couple things struck me that made this more challenging than I thought it would be.

    1) The depth of the ground is relative to the optical center, which is itself apparently a large circle. So the farther from this circle, the greater the depth. At least, that's what it seemed to me.

    2) Some holes have depth at the top, others have depth at the bottom, and others still have depth at both top and bottom. This follows from #1 above. This wouldn't be possible with an overlay (or underlay) in this case.

    My first hunch was vectors, but I agree it seems a bit excessive.
     
  5. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    2,012
    I tested this out and opened my favourite graphics tool. I created an 800x300 rectangle and punched some holes into it. Then I made a copy, dragged the layer under the original and shrunk to 96% size.

    cheese_test.jpg

    This gives a good approximation, but as immediately can be seen the problem are the edges and the concave corners because there's no 3D effect. To get that impression of a solid block, I guess you'd need to do some extra draw shenanigans or go for 3D shape.

    Layers or just draw order. To get the effect in my image, you'd just draw at 96% (or thereabouts) and at 100%, either in that order or onto different layers.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice