Unity3D Game Development Course

Building video games can be just as much fun as playing them. And this in-depth Unity 3D course for beginners will show you how to get started as a game developer. You’ll learn how to install Unity, program game physics, animate your characters, code your enemy AI, and more. (7 hour YouTube course): https://www.freecodecamp.org/news/game-development-for-beginners-unity-course/

Open source alternative to Unity and Unreal

unity-game-maker

There has been controversy around Unity’s changes to their eula and how it affects independent developers. Improbable – a vc backed developer of a massive online multiplayer game back end solution  – lost their Unity license for a short time, which in turn affected hundreds, maybe thousands, of independent game developers, or at least caused a lot of anguish and confusion.

With a closed source game engine you always face the chance of the rules being changed on you after you have invested years of development.

Is there a legitimate open source alternative to Unity or Unreal? Here are some candidates – I’ll be experimenting/evaluating several over the next month or so and will post feedback.

GodotEngine

Godot provides a huge set of common tools, so you can just focus on making your game without reinventing the wheel.

Godot is completely free and open-source under the very permissive MIT license. No strings attached, no royalties, nothing. Your game is yours, down to the last line of engine code.

Urho3D

A free lightweight, cross-platform 2D and 3D game engine implemented in C++ and released under the MIT license. Greatly inspired by OGRE and Horde3D.

Torque 3d

3D is a easy-to-use game creation platform. Architected from the ground up for maximum flexibility and performance across a wide range of hardware and built upon…

 

 

React Native for Mobile – Initial Impressions

nativesmall

I’ve always done mobile development in the device native language (Objective-C/Swift for iOS, and Java for Android)

Recently I worked on a project that needed to be deployed on Android, iOS and eventually the web, using the same code base if possible. After reviewing the options I decided to use React Native.

React Native lets you build mobile apps using only JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components. It is the library used to build Facebook, Instagram, and many other applications.

The project was originally a native Android app – used by TED for handling attendees checking in to individual sessions during a conference. It makes multiple API calls to the server back-end, does NFC scanning, needs local data storage, and must work offline as well as online.

I’ll post more further down the road about working in React Native so for now I’ll list some initial pros and cons…

Pros

Performance – better and faster json parsing, cleaner program flow, screen redraw update appears faster than native if state is used properly

Multi-platform – same code base for Android and iOS, can also develop for web using React Native for Web.

Open source – strongy supported by facebook, code available on github, 1,700 contributors, 68,000 stars

Cons

Javascript – the language still makes me nervous, I like a strongly typed language – recommend using typescript or flow to lower your risk.

Debugging – debugging tools aren’t as mature as I would like, using Chrome and a lot of console.log calls – which is definitely old school.

Tools – no integrated tools, I use a mixture of the command line, Chrome, and Sublime Text as my editor.

<>

Further reading

How to Get Started with React Native

The Basics of React Native

An iOS Developer’s Journey Into React Native

Building the F8 App

Learning to Program

I get asked quite often for good sites to learn programming or web site development, here are a few resources I recommend.

freeCodeCamp – the best place to learn html, javscript and the rest of technologies necessary for front end web development, they are also working on a full stack developer course as well – can’t recommend these guys enough – a great intro to web technologies

Google has a list of resources and a guide intended for Computer Science students seeking an internship or university grad role at Google but it is useful for anyone who is interested in a software development career.

CS for All is an open book by professors at Harvey Mudd College which teaches the fundamentals of computer science using Python. It’s an accessible read and perfect for programming beginners.

If you’ve never programmed before check out the Getting Started page on Learn To Code with Me by Laurence Bradford. She’s done an incredible job of breaking down the steps beginners should take when they’re uncertain about where to begin.

This short 5 minute video explains why it’s better to think of projects you’d like to build and problems you want to solve with programming. Start working on those projects and problems rather than jumping into a specific language that’s recommended to you by a friend.

 

 

 

Vuforia / MergeVR Integration

This post outlines the steps required to integrate Vuforia for Digital Eyeware with the MergeVR SDK in Unity. The result of this integration will be an Augmented Reality demo app that can be run in the MergeVR headset on your Android device. It will recognize an image marker and display a 3d object on top of that marker, and allow the user to trigger a virtual button on the object – then enter in VR mode and move around the VR scene using the MergeVR headset capactive input buttons.

https://developer.qualcomm.com/software/vuforia-augmented-reality-sdk

http://mergevr.com/

 

Requirements

Android mobile device

Unity3d – version 4.6.*

Vuforia – Download the core Vuforia unity package – vuforia-unity-5-0-5 (you must be a registered Vuforia developer before the download) and the eyeware samples vuforia-samples-eyewear-unity-5-0-5

MergeVR – download latest Merge SDK Unity package- MergeVR_version_v062

 

Steps

 

  • Create a new empty Unity Project (4.6.*)
  • Import the Merge SDK Unity package (MergeVR_version_v062.unitypackage)
  • Import the Vuforia core Unity package (vuforia-unity-5-0-5.unitypackage)
  • Import the Vuforia Digital Eyeware sample AR/VR package from the vuforia-samples-eyewear-unity-5-0-5.zip file (arvr-5-0-5.unitypackage)
  • In the Scenes folder find the Scene ‘Vuforia-3-AR-VR’ – Duplicate it (Edit->Duplicate) and rename the new scene ‘DemoVRAR’
  • Open ‘DemoVRAR’ scene.

 

 

 

 

  • Stop running the scene (if you haven’t already)

 

  • Find the MergeVR -> Prefabs folder. Drag the MergeCameraController and MergeSDK prefabs into the scene Hierarchy.

 

  • Expand the MergeCameraController tree.

 

  • Click on ARCamera under UserHead and view the Inspector Pane. Check (enable) the ‘Bind Alternate Camera’ property.

 

  • Drag the MergeCameralController root transform to the ARCamera property ‘Central Anchor Point’. Drag MergeCameraRight to ‘Right Camera’ (Vuforia will pop up a box saying ‘add vuforia components’ – click for both right and left cameras), then drag the MergeCameraLeft to ‘Left Camera’

 

  • On ARCamera property ‘Viewer’ select ‘Other Viewer’ and enter 1 for Viewer ID.

 

  • Save the Scene – now go ahead and build and run this scene on Android – you should now have a working AR app that can recognize the image stones marker and display the 3d mountain object. If you focus your gaze on the virtual ‘VR’ button for 2 seconds the app will transition you inside the full VR scene where you can look around, to exit the VR scene look straight down and focus on the ‘AR’ button for 2 seconds.

 

  • We now have a working AR/VR app – we need to make a few modifications to this scene to get it to run best in the MergeVR headset and to let us use the capactive touch buttons on the MergeVR headset to interact with the VR world.

 

  • The MergeVR headset needs the camera on the right side to work in AR mode with the Android, since the generic Vuforia demo doesn’t support this we have to make a few modifications to the MergeVR code to handle the change.

 

  • To move the viewport to the correct position when camera is on the right. Open the ‘MergeScreenManager.cs’ script in MergeVR->Scripts. In the function ‘SetViewPortResolutionAndPostion’ replace this line

 

viewportYpos = viewportBottom;

 

with

 

viewportYpos = viewportBottom+(Screen.height-viewportHeight);

 

and in the ‘MergeCameraController.cs’ script in MergeVR->Scripts comment out the following lines in the function AndroidGyroTracking

 

/*

if (Input.deviceOrientation==DeviceOrientation.LandscapeRight || Input.deviceOrientation==DeviceOrientation.LandscapeLeft)

currentOrientation=Input.deviceOrientation; //only change on either full landscape

 

if (currentOrientation==DeviceOrientation.LandscapeRight) {

androidGyroRotation = new Quaternion (-Y, X, Z, -W);

androidGyroRotation *= Quaternion.Euler(180f,180f,0);

}

else

*/

 

leaving

 

androidGyroRotation = new Quaternion (-Y, X, Z, -W); //default

 

  • Now build and run the app – the viewports will be aligned correctly and the VR scene will be working as well.

 

  • Now we need to add interaction with the VR scene (movement in this example) using the MergeVR capactive touch buttons on the headset.

 

  • Add new script called MergeEyeCustom to the MergeCameraController game object in your scene

 

using UnityEngine;

using System.Collections;

 

public class MergeEyeCustom : MonoBehaviour {

 

public float speed = 1.5f;

public float jumpSpeed = 10.0f;

public float gravity = 10.0f;

public bool allowJump = false;

 

Vector3 moveDirection = Vector3.zero;

float ydirection = 0f;

float xdirection = 0f;

 

// Use this for initialization

void Start () {

 

}

 

// Update is called once per frame

void Update () {

 

if (Merge.MSDK.isControllerConnected ()) {

ydirection = Merge.MSDK.getController ().GetAxis (“Vertical”);

xdirection = Merge.MSDK.getController ().GetAxis (“Horizontal”);

} else {

//Use arrow keys in editor – or touch capactive buttons if present in MergeVR headset

if (Input.GetKey (KeyCode.UpArrow) || Merge.MergeInput.GetInput(1))

ydirection = -1;

else if (Input.GetKey (KeyCode.DownArrow) || (!allowJump && Merge.MergeInput.GetInput(0)))

ydirection = 1;

else

ydirection = 0;

 

if (Input.GetKey (KeyCode.RightArrow))

xdirection = 1;

else if (Input.GetKey (KeyCode.LeftArrow))

xdirection = -1;

else

xdirection = 0;

}

 

moveDirection = new Vector3 (transform.forward.x * ydirection*speed, 0f, transform.forward.z * ydirection*speed);

moveDirection += new Vector3 (transform.right.x * xdirection*speed, 0f, transform.right.z * xdirection*speed);

 

 

transform.position+=moveDirection* Time.deltaTime;

 

}

}

 

  • Now you can use the left and right MergeVR headset buttons to move around the scene once you are in VR mode.

 

  • As an exercise you can do the following to polish the example.

 

remove or modify one of the gaze cursors

 

optimize rendering performance

 

add a rigid body or first person controller for more realistic collisions the VR scene

iOS Projects We’re Working On

Here are some of our recent iOS projects…

* YourTeacher.com – We continue to be the iOS app development arm for yourteacher.com. They have over thirty titles in the Apple App store – majority of which have 4.5+ average ratings with literally hundreds of thousands of downloads per app.

Algebra, ASVAB, or Math are some examples of the work we’ve done for them.

* Just Picture It – created in partnership with the Mason Software Company. It evolves a mobile photo sharing into a word game with friends and family. In a turn-based game you can play in single and multiplayer mode.

Just Picture It uses the Parse.com api extensively for user authentication, push notifications, and storage of games and messages.

TorchShips Launch

Just launched the TorchShips site with the first post – Inspiration and why ‘Real’ Space Combat.

TorchShips is a 3-D tactical space combat game based on real physics with procedurally generated single and multi-player missions. It will be initially released for Windows & Mac, with iOS version to follow.

TorchShips is also on facebook and twitter.

If you’re interested in the game or just want to support us please link to the site, like via Facebook,  and/or follow the twitter feed. We’re gearing up for a kickstarter project as well that should start within a week.

Thanks

Initial Impressions of Unity3D

After evaluating 3d engines for iOS development I’ve decided we’re going to go with Unity3D.

I would prefer a native Objective-C engine but the ability to deliver for multiple platforms is very attractive (Unity can deploy to Android, iOS, Mac, Linux, XBox 360, and the Wii).

Unity development so far has been straight forward – scripts can be in c# or javascript – I’ve created several 3d scenes, used the extensive resources from the forum and Unity Answers to create a ship that uses realistic physics to move in orbit. The Unity Asset store has thousands of additional resources for Unity3D dev. Initially I’m using atmospheric planets and vectrosity for line drawing.

Unity3d scene

We play tested the game as turn based and real time multi-player – I was initially planning on a turn based approach using Apple’s Game Center for iOS but the game plays much better in real time. We evaluated several multi-player network solutions and are going to go with Photon Cloud  – very well integrated with Unity, a great price, and should be able to scale.