0

Learning Lua

Posted by Dr. Burton on July 1, 2016 in Corona, Lumberyard, Mobile, Tutorials |

The Lua scripting language has been rapidly gaining in popularity over the last several years.  It is now the core of many popular tools including (but not limited to) Corona SDK, Amazon LumberyardAutodesk Stingray, and WoW.

As I have been preparing for my classes, I recognized that a series of tutorials in the Lua scripting language would be beneficial.

For experienced programmers, a great resource for learning Lua is the official guide Programming in Lua. There are also some great resources on the Lua.org

I will be using the ZeroBrane IDE for all of my Lua examples.

Lua receives extensive treatment in my Corona SDK books.  You can check them out on my website, Amazon, or Apple iTunes.

Here are the tutorials in order:

Part 1: Provides some background on Lua, introduces the ZeroBrane IDE and covers the obligatory “Hello World”

Part 2: Using print and comments with troubleshooting tips!

Part 3: Variables – Learn about the types of variables and taking full advantage in Lua

Part 4: Strings- How to work with strings variables in Lua.

Part 5: Math & Math Library – Lua has a lot of great math tool available.  A quick overview of how to use the math library.

Part 6: Functions – how to use functions in Lua

Part 7: Scope – Variable scope can be tricky! A quick introduction to scope in Lua

Part 8: String Library – just like math, strings have a great set of tools built into Lua

Part 9: If-then: Using if-then in the Lua scripting language

Part 10: Using loops in Lua

Part 11: File Input & Output: Lua has an easy to use IO system!

Part 12: Tables – an introduction to data structures in Lua

Part 13: Generic For Loops – also known as ipairs and pairs!

Part 14:  Closure – No, this has nothing to do with relationships! A closure is an anonymous function… very handy!!

Part 15: OS Library – a whole host of functions such as date, time, clock, etc.

Part 16: Modules – working with modules – libraries of code to make your app development faster and easier.

 

0

8 Game Engines for your Next Project

Posted by Dr. Burton on March 27, 2016 in Corona, Game Development, Lumberyard, Mobile, Unity3D |

So you want to make that killer game ?!  If you want to jump into making the game, then you don’t want to spend time writing the engine (rendering, physics, sound, etc).  Here are a few top picks in game engines:


Cocos2D

Cocos2D is an open source (free) engine (LGPL MIT license) available for developing on the iPhone or Android.  Several popular games have been published with Cocos2D.  More information is available on their site: http://www.cocos2d-iphone.org/ or http://code.google.com/p/cocos2d-android/.  I have had several students develop with Cocos2D, but none have published a game yet.  Cocos2D is only available for the iPhone or Android.
Cost: free, MIT license
Dev. Platform: Mac (iPhone/Android) or Windows (only Android?)


Corona SDK
by Corona Labs
If you’re interested in developing 2D games or graphic software for multiple platforms, Corona provides a smart choice.  With Corona, you develop your application using lua, and Corona exports the proper code to be compiled by the proper environment.   You can easily make games or apps for both iOS and Android.  Corona supports iPhone/iPad and Android development.  http://www.coronalabs.com  We like Corona so much, we wrote several books: burtonsmediagroup.com/books/coronasdk
Cost:  Free.
Dev. Platform: Mac, Win

iTorque by Garage Games
I have been a torque developer for many years (back in the days of TGE).  I used Torque to develop the environment for my dissertation research, and taught the engine for several years at Missouri State University.  So I was very pleased to learn that GG now offers a Torque 2D for the iPhone.  Torque 2D is based upon TGB, and allows a simple port to the iPhone (assuming they don’t get caught-up in Apple’s new OS 4 language, which by the talk on their site, they don’t expect any problems).  iTorque is $750 149 for indie developers (first $100,000).  It currently only supports 2D, but a 3D version is in development. http://www.garagegames.com
Cost: $750 99
Dev. Platform: Linux/Mac/Windows

Lumberyard by Amazon
It’s not often that we get new players that create a major game engine.  Lumberyard is based upon the Cry Engine, but has been modified to streamline multiplayer.  The engine is free, but if you are going to have server you must use Amazon Web Services (that’s how they are pay for the development).  The installation is somewhat painful, but once you get it installed, wow!  Best part is scripting is in Lua, so we can leverage our Corona experience.  https://aws.amazon.com/lumberyard
Cost: Free
Dev Platform: Windows (Mac is promised for the future)
Supports VR?  Yes

Marmalade by IdeaWorks3D
Marmalade is very popular with a lot of developers and has some big name apps under it’s umbrella.  Coding is C++, but does support HTML 5 hybrid.  For game development, it utilizes Cocos2D and Box2D. It supports a broad array of devices. Trial period is short (only 30 days).
http://www.madewithmarmalade.com
Cost: $149 for iOS/Android; $499 for iOS/Android/Blackberry/WP8
Dev. Platform: Mac/Windows

ShiVa by Stonetrip
ShiVa is a 3D game development platform for developing for Linux, Mac, Windows or mobile devices such as the Android, iPhone,  iPad, and Windows Phone.  ShiVa uses a player to run the game developed on the appropriate platform.  There is a Personal Learning Edition available for free to develop for Windows or Mac.  It will run on Windows or a Mac with Parallels (i.e.  A Mac that has Windows installed through Parallels). Scripting is done in Lua.  Stonetrip is working on a solution to the whole iOS4 issue that could keep deployment happening to the new iPhone/iPads that will put everything into compliant C/C++ code and make Apple happy.
http://www.stonetrip.com/
Cost: €169
Dev. Platform: Windows (or Mac with Parallels).


Unity 
by Unity
Unity is becoming an increasingly popular engine for both the desktop and now the iPhone.  Some of my students have successfully published games and iPhone apps using the Unity3D engine (before they took my classes!).  What makes Unity attractive, especially for the student is that it is free to get started (desktop version). Scripting is in JavaScript/C#.
Following a popular licensing scheme for game engines, you do not have to purchase the pro version ($1500) until you have over $100,000 revenue in a year (VERY attractive to those who are getting started).   Again, if your company makes over $100,000, you are expected to purchase the pro version of the Unity engine for $1500. 
http://unity3d.com/

Cost: Free for basic, $1500 per pro lic., required if your organization makes over $100K (including colleges & universities).
Dev. Platform: Mac or Windows
Supports VR? Yes

UNREAL/UDK by Epic Games
Epic Games has made the UDK (Unreal Developers Kit) a lot more attractive to Indie developers.  UDK is now available free of charge for developing your game.  When you are ready to publish you pay $99 license fee.  Like Unity3D, your first sales are yours too keep: $50,000.  After $50,000, you are required to pay a 25% royalty on all profits.
http://www.udk.com
Cost: Free-ish; 25% royalty after first $50K in sales
Dev. Platform: Windows
Supports VR? Yes


What direction am I going (Updated Spring 2016)?

I have given this a LOT of thought.  I’m regularly asked by my students and others which engine(s) I am using.  For 2D development, I have decided to go with Corona SDK.  I like the platform and being able to develop for multiple mobile & desktop systems at the same time (I liked it so much, that I wrote the book).

For 3D, I have been working in VR/AR for the last several years, so we were back to Unity even though Unity is NOT supportive of higher education in their pricing model any longer.  That all changed with the release of Lumberyard.  All projects going forward will be in Amazon Lumberyard.  We were already using AWS for our server so Lumberyard is a significantly cost savings for our ongoing development.

For 3D I am leaning toward Unity3D or ShiVA.  I say that with some hesitation as I have invested a lot of time in java Monkey Engine (jME) and love to develop in Java.  That being said, Unity is very appealing as is ShiVa with its Lua scripting. With easy deployment to Windows, Mac, and Linux plus web browser, they look very attractive for my next research project (of course, jME has many of these features as well, even Android support in the next version.. thus my difficult decision).  My final 3D decision will be made once/if the iPhone OS 4 issue is resolved.

Update (2011): I have made the decision to go with the Unity3D engine for 3D development.  Thanks to an aggressive program for educational use, knowing some of the people who work at Unity, and recent advances in the engine, the scales were firmly tipped in Unity’s direction.

Note: I have included current (2010) pricing on each of these engines.  This is in addition to your developers license for the Apple iPhone ($99/year) or Google Android ($25/year).
Yes, there are other engines available (oolong, SIOS, Edgelib to name a few), but I have decided to focus on the engines I’m most familiar with.  If you would like to provide me with information on other engines, I will be happy to include it in my review.

Update: I have added the ShiVa engine to the list as well as mentioning the development environment that you will need (for those who are strictly developing on a Mac or Windows).

Update: I have updated pricing to 2016 numbers.

Tags: , , , , , , , , , ,

0

New Books Coming Soon!!

Posted by Dr. Burton on March 27, 2016 in Cloud Computing, Corona, Education, Game Development, Lumberyard, Mobile |

We have been working on several new textbooks here a Burtons Media Group.

More Corona Application Development (tentative title) is an intermediate level textbook, picking up where Learning Mobile Application Development With Corona & Beginning Mobile App Development with Corona left off.
We will dive deeper into databases (both local and network), In-App-Purchases, Corona Ad Plugin, and desktop development considerations.

 

Cloud Computing with Corona SDK (tentative title) is an intermediate to advanced level textbook covering Corona Cloud, Coronium, and RESTful client server communications.  Topics include push notification, working with Mongo, analytics, and multiplayer games.

Corona Enterprise (tentative title) is an advanced technical book where we will examine the differences between Corona Enterprise and Corona SDK.  We will also examine building plugins for Corona.

 

Game Development Fundamentals: Lumberyard & Blender (tentative title) is a new series on developing games using Amazon Lumberyard & Blender.  We will explore the Lumberyard 3D game engine and how to develop immersive game environments using open source or free tools.

 

Is there a particular book that you are most interested it?

0

The Cloud, 3D Worlds, and beyond!

Posted by Dr. Burton on December 31, 2014 in Uncategorized |

There are many exciting projects in the works here at Burtons Media Group.
We have been spending a lot of time in the cloud lately.
There are several books, apps, and games in development that are dependent on a strong backend service to handle the multi-player/multi-user aspects.  We have settled on Coronium.io and Coronium.GS for handling this important aspect.  You can expect to see tutorials and books on implementing cloud solutions in the very near future.
We are also working on some projects that require a 3D engine.  Originally we were leaning toward Unity 3D, but for a variety of reasons we have begun shifting toward HTML5 engines.  We are currently evaluating several tool sets.  We’ll post the direction that we settle on and of course post learning resources as we begin developing.

We continue to update our Corona and Unity eBooks and eTextbooks several times a year.  Be sure to update your copy by clicking on the Books tab above then selecting Book-Update.

0

Corona Graphics 2.0: Composite.reflect

Posted by Dr. Burton on June 30, 2014 in Corona, Mobile |

While I have made an effort to document all of the composite, effects, and generators for Graphics 2.0 in my Corona books (see the Books tab above), there were a few that do not have a direct translation to a similar effect in Photoshop or other graphic editing tool.  Thus, I thought I would take this opportunity to provide a little bit of guidance for these effects.

In this post we will look at the composite.reflect effect.  To clearly see what was happening, I created a simple graphic to show the impact of light, dark, and grayed areas when the texture is applied to an image.
My base image is the book cover for Learning Mobile Application & Game Development with Corona.  The texture image is a simple png file that goes from red, to green, to blue, to grey.

LMGADCtexture2

 

 

 

 

The output of reflect is similar to using a colored light on an object.  The end product will show the color saturated with the texture color.

output

 

 

 

 

 

The Code Example

local object = display.newRect( 100, 100,600, 600)
object.x = display.contentCenterX
object.y = display.contentCenterY
-- Set up the composite paint (distinct images)
local compositePaint = {
    type="composite",
    paint1={ type="image", filename="LMGADC.png" },  -- bottom image
    paint2={ type="image", filename="texture2.png" }     -- top image
    }

-- Apply the composite paint as the object's fill
object.fill = compositePaint

-- Set a composite blend as the fill effect
object.fill.effect = "composite.reflect"
									

For more details about various composites, effects, and generators, check out Learning Mobile Application & Game Development with Corona!

 

 

 

 

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