0

Corona SDK Graphics 2.0: Going 2.5D

Posted by Dr. Burton on November 24, 2013 in Corona, Education, Game Development, Mobile |

I can’t tell you how excited I was when I learned that Corona would support 2.5D or Isometric game development.  Now that the new graphics engine is available, I figured I would jump into it and start making games!

Of course there is a learning curve to making games.  The first thing I wanted to know was how to make a circle appear as if it were 2.5D.  Easier said than done.  For my first attempt I wanted to simulate an attack radius.  Sounds simple, right? Well after a night of coding, I had learned a great deal, which I have summarized in this 11 minutes tutorial!

Please note that all of the changes to the object are done to the objects path parameter, not the object itself. We are just changing it’s appearance, not the actual object.

 
[tubepress video=”ASSFP9ZzmZk”]
 

display.setStatusBar(display.HiddenStatusBar)

--Initially I tried vector based graphics.  Circles don't work since they do not have a path parameter (or corners).  Rectangles work fine.
--local circle = display.newCircle(display.contentCenterX, display.contentCenterY, 100)
--local square = display.newRect(display.contentCenterX, display.contentCenterY, 200, 200)

--So we moved on to bitmap, which work great!
local circle = display.newImage("circle.png")
circle.x = display.contentCenterX
circle.y = display.contentCenterY
circle.alpha = .8
circle:scale(2,2)
w= circle.width*.33
h=circle.height*.33
transition.to( circle.path, { time=2000, x1=w, y1=h,  x2 =-w, y2 = -h, x3=w, y3=-h, x4=-w, y4=h } )
									


 

Tags: , , ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2010-2018 Burtons Media Group All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.