Tutorial: 2.5D Perspective in Graphics 2.0

Graphics 2.0 Demo Contest Winners

NOTE: This tutorial has been replaced by the 2.5D — Perspective and Depth guide.

Share this post....Share on Facebook0Share on Google+3Tweet about this on TwitterShare on LinkedIn0

Brent Sorrentino serves as a full-time Developer Evangelist for Corona Labs, assisting developers in the forums, maintaining documentation/guides, and creating samples which highlight core features of Corona SDK.

This entry has 9 replies

  1. Mo says:

    FANTASTIC tutorial Brent.

    1- Could you talk a little bit about skybox/skydome mode? Would this mode allow us to make sky /starfield effect where the player seems to be inside a dome looking up at the sky (or stars) in a game for instance? If yes, any snipets we could use?

    2- I will assume 2.5D will allow us at the minimum to make like “Clash of Clans” type game where there are 3D looking terrain (not really 3D) and where you can place buildings on so on. In that case as simple 2D image of a terrain could deform to look like a 3D terrain?

    In any event THANK YOU. That seems simple enough!


    • David Rangel says:

      Mo – I’ll let others answer the question about how to use this for 3D like terrain. But you may also want to look at Throne Wars (https://itunes.apple.com/us/app/throne-wars/id586974383?mt=8). It’s made in Corona, with the current graphics engine (not the new engine with the functionality shown in this tutorial) and has terrain and a layout similar to Clash of Clans.


    • Brent says:

      Hi Mo,
      Yes, this would allow you to render a skybox/skydome. If you read the Wiki on this (link is in the tutorial, and here: http://en.wikipedia.org/wiki/2.5D#Skyboxes_.26_skydomes), you can see what this basically does. As for snippets, I don’t have any yet, but keep an eye out in the Graphics 2.0 forum… perhaps somebody will tackle a basic demo of this soon. Remember that you can basically use “meshes” to apply textures to a series of side-by-side objects, then adjust the points of neighboring objects to make it look like the surface bends inward slightly. I may experiment with a quick demo on this after I get some other tutorials completed.

  2. Vasant says:

    Thanks for the new features in Graphics 2.0

    For those of us not in 3D design, can you include some predefined effect library that we can just use with minimal tweaking? similar to storyboard effects..object curl (maybe for specified corner or sides), flip etc
    Any other standard cool effects found in 3D games?
    example: Define a cube effect where you specify 6 images for each face, size of the cube and then Corona or the library function applies the correct 2.5D effects and renders a cube that can be turned in 3D (with whatever limitations).
    another one: sunlight is reflected off a balloon and as it goes away/goes higher the reflection point moves to mimic a real outdoor balloon.
    Something like this would open up 3D effects for corona developers without calculating intricate coordinates and trying multiple effects.
    or just simply going around a multi-faced object (a building, terrain etc)

    Maybe somebody in community has a better idea on how to build something like this?

    I know you gave the full customization power but sometimes easier to start with predefined effects.


  3. Mo says:

    @David: fantastic looking game! I guess you can just use 3D looking terrain and 3D assets (houses…) for this type of game. I did not know you could do this type of games with Corona. I will search for any blog the developer may have wrote about his/her game. Cool looking game!

    @Brent. Thanks so much for sharing that link. So I am really look for is sky dome since I am trying to simulate a sky. Thanks for the info too. If you get a chance that will super but I know you are super busy doing these type of great tututorials so please no rush.

    Cool stuff :)


  4. Igor says:

    Thx for the tutorial!
    What you do to fold the image?

  5. Teodor says:

    I used this tutorial to create a card game that swipes the 5 cards in 3d! works fine on some devices but on a galaxy tab2 my app crashes with no error message when it has to swipe the cards! My cards are made with snapshots and when i tried the same project with display.newRect() instead of the cards work fine even on the galaxy tab2. I get the same issue when i substitute the rectangle with some card images!!!
    Does anybody has any idea why?
    I also tried the sample project on the Galaxy Tab2 and it works

  6. Marcos says:

    Dear sirs,

    Could you, please, show me how to develop a page curl effect (book turn page), with Graphics 2.0 ?

    Thank you!

Leave a reply

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>