More rewards added for Patrons.

If you’re not supporting us on Patreon already, you should because we’ve added tons of rewards exclusive to Patrons. In that past month, we gave Patrons a FREE BOOK and an exclusive preview to our course Make a 2D Flappy Bird Game in Unity®: Code in C# & Make Art.

Rewards:

$1 or more per month: Join the forum.

Get access to our Mammoth Forum on Facebook, where you can meet fellow Mammoth Interactive students and talk to our Support team.

$5 or more per month: Get a follow.

We will follow you on Twitter and tweet you a thank you. In addition, you get all the rewards of the previous level. Our rewards are cumulative!

$10 or more per month: Get 1 course every month for free.

Get access to 1 Mammoth Interactive course per month. This course will be yours to keep forever! You also get to vote on topics for us to cover in future tutorials.

GET $10 REWARD

$19 or more per month: Get all courses for free.

Get access to Mammoth Interactive’s entire catalog of courses while you are subscribed. Get eBooks we attach to our Patron-only posts. See our entire collection of books here.

GET $19 REWARD

$500 or more per month: Get a tutorial on a topic of your choice.

Get one video of your choice made per month!

GET $500 REWARD

 

Sign up for our mailing list

Our giveaways are BACK. Win $200 and $20.

It’s the last week to enter our April giveaways. We will choose 5 winners at the end of the month to win cash. See below how to enter.

This giveaway is WORLDWIDE. You can enter and win in more than one category.

Win $200:

1. Get a Mammoth Unlimited Subscription for only 19 dollars. We have just a handful of Mammoth Unlimited Subscribers, so the odds are in your favor to win!

  • You get access to ALL Mammoth Interactive courses while you are subscribed.
2. AND Tweet: “I enrolled in @MammothCompany‘s Unlimited Subscription! http://bit.ly/2mJxcyq #Giveaway”

OR

1. Become our Patreon subscriber of at least the 19-dollar level. Your chances of winning are high! We currently have 3 Patreon subscribers.
  • As a Patreon, you get access to ALL Mammoth Interactive courses.

2. AND Tweet: “I’m a Patreon subscriber of @MammothCompanyhttp://bit.ly/2mJxcyq #Giveaway”

Win $20: 

  • Subscribe to Mammoth Interactive’s email list.
  • OR Tweet the following: “@MammothCompany is having a GIVEAWAY! Copy and paste this tweet to win $20. Learn #webdev, #appdev, #gamedev today.”
  • OR Like us on Facebook.
  • OR We’ve hidden the character 獁 somewhere on our site.
    • Find the character, and tweet @MammothCompany a screenshot.
    • Hint: Where inspiration lies, so does the one you seek. In our blog posts, take a peek.
Thank you for continuing to share and support our courses. You can enter in any or all 6 ways. We will choose winners every month until May 31, 2017, 11:59PM. Good luck!

Creating a C++ Script | Unreal Tutorial

Scripts are so important when it comes to making a game in Unreal. For an in-depth lesson on Unreal, consider enrolling in Mammoth Interactive’s Unreal course

If you want to add a player to your game, you need to write code to give the player its own behavior. Default modes contain logic from Unreal. To create a new mode with custom behavior, you need to write a script.

Go to C++ Classes > CoinCollector in the Content Browser. Right-click in the Content Browser. Select “New C++ Class”.

Select “Pawn” from the “Choose Parent Class” to extend a pawn. With the Pawn class, the mode to be able to receive input from the player. The player will be able to move the mode.

Press Next. Name the pawn “HeroController”. Our player to be a hero who collects coins. Press “Create Class”. Unreal will create the script. Note that it does take some time for Unreal to create or compile a script.

We will enable HeroController to move based on user input. When the code compiles, you can open Xcode to view the files of the script if you are on a Mac. If you do not own Xcode, you can download it from the App Store. Xcode is a free program that you can use to write code.

If you are using Windows, you can use Visual Studio to write your code. Visual Studio should already be on your computer.

The Files of a C++ Script

Two files will open with the script: HeroController.h and HeroController.cpp. These are two different files for a single class. .h files are header files. They are used to list variables and methods in a class.

.cpp files are implementation files. They are used to implement those methods and variables. HeroController.cpp contains the implementation of HeroController’s behavior.

We will begin coding in HeroController.h. Some default code is already in the file. class COINCOLLECTOR_API AHeroController : public creates the class. Then there are five public functions:

  • The ACoinController function is a constructor. ACoinController is called when the script loads (when the object is created).
  • BeginPlay is a function that is called when the game starts (after the constructor and internal processes complete). A function performs a method or operation. You can use functions to set the behavior of an object.
  • Tick is a function that is called every frame (every time the game is processed by your computer, smartphone, or console).
  • SetupPlayerInputComponent is a function that is called to configure the input. Whenever we want to make HeroController move left, right, top, or bottom, we need to register the input bindings in this function.

Note that typing // in front of a line turns the code into a comment, which is not read by the compiler. You can use comments to organize code.

To learn how to build 6 games in Unreal, enroll in our Unreal course.

How to Download Unity (for Free!) | Virtual Reality Tutorial

If you want to make a Virtual Reality (VR) game, Unity is the program for you. The Unity engine comes with built-in models, materials, and more, which you can use to make your own 2D or 3D games. To learn how to build 30 mini virtual reality games in Unity, check out our Unity 3D course!

Unity Personal is a FREE application that you can download from www.unity3d.com. Go to unity3d.com, and press the button “Get Unity now”, as in the following image.

You will be taken to a page with several versions of Unity that you can download. The Personal version is completely free, and you can publish games to the App Store with this version.

Click on the “Download Now” button in the “Personal” bar.

Then press “Download Installer”, which will download the helper file “UnityDownloaderAssistant”.

Open the “Unity Download Assistant” file when it is downloaded. Press “Continue” from the installation instructions. Read the terms of service, and press “Continue and Agree” if you agree with them.

Then you will see options for Unity components that you can download. Ensure that the top three items are selected (Unity, Documentation, and Standard Assets). You can select additional components to install extra files.

Press “Continue”. Once all the files have installed, you can open the Unity editor!

Unity is the number one platform for building VR games. You can build a variety of 2D and 3D games with this user-friendly program. To learn how to use Unity, check out our Unity 3D course, where we build 30 mini virtual reality games!

 

Classes vs IDs: CSS/HTML Crash Course (Free Tutorial)

Classes and IDs?! You may have heard of them before when referring to HTML and CSS.

If you are a beginner and want to learn the basics of coding, check out our FREE 30-minute intro course here: training.mammothinteractive.com/p/learn-to-code-in-30-minutes

Classes and IDs are SUPER useful because they allow us to target certain elements on a page. For instance, if you create an item, giving it a class or ID will be useful later on when you want to stylize the item, such as change its color or size.

Classes are used to give a group of items the same style. Identifiers (IDs) are more specific than classes and are also used to stylize.

To follow along with this tutorial, visit jsbin.com, which allows you to test your code in real time. In JS Bin, click on the HTML tab to open a blank HTML file.

Whenever you make a class, first make a div within the body tag:

  <div>
  </div>
 A div is a container. You can wrap a div around anything, and it is useful for styling everything within that container.

Give the div a class, and name it vegetables. It is good practice to name the class after its function or what it contains.

  <div class="vegetables">
  </div>
In the class, we will make an unordered list using the format shown in the next box of code. Give the list the items Carrots, Onions, and Broccoli.
  <div class="vegetables">
     <ul>
       <li>Carrots</li>
       <li>Onions</li>
       <li>Broccoli</li>
     </ul>
  </div>

If you wanted to make the list ordered, you would simply need to change ul to ol.

Next we will make another div containing fruits.

  <div class="fruits">
    <ul>
      <li>Apples</li>
      <li>Bananas</li>
      <li>Watermelon</li>
    </ul>
  </div>

Now we have two unordered lists each in a different div. We also have a class for each div. Let’s see what happens when we target these classes. Open the CSS tab. To target a specific class in CSS,m type the class name with a dot in front of it. For instance:

.vegetables {

}

Any styling in here will be applicable to the div vegetables. For example, to change the color of the text “Carrots Onions Broccoli” to blue, write:

.vegetables {
color: blue;
}

Likewise, we can change the font style to something like italic, and font size to 20 pixels.

.vegetables {
color: blue;
font-style: italic;
font-size: 20px;
}

There are times when you will want to be more specific. Let’s say you have a class but there is something within the class that you want to style differently from the rest. For instance, if you want to single out Broccoli, you can put an ID on it in HTML, as shown in the following code. An ID is meant to be used for one element only.

  <div class="vegetables">
     <ul>
       <li>Carrots</li>
       <li>Onions</li>
       <li id="least-favorite">Broccoli</li>
     </ul>
  </div>

To actually change the styling of this ID, you have to select the ID and apply styling on it in CSS. Selecting an ID is a bit different from selecting a class. The following code selects the ID least-favorite:

#least-favorite {
color: red;
}

IDs override classes because IDs are more specific. For this reason, you want to use IDs sparingly because they are harder to fix later on if you have a lot of code.

From here, why don’t we add a new list item in the vegetables div that is a link? The following box of code shows how to add links in HTML.

  <div class="vegetables">
     <ul>
       <li>Carrots</li>
       <li>Onions</li>
       <li id="least-favorite">Broccoli</li>
       <li><a href="#">Test link</a></li>
     </ul>
  </div>

In place of # you would put a link to a website.

Now in our vegetables list we have a new item: Test link. You can apply styling to this, but it is in its own tag. Thus, in CSS, you can target every a tag in the vegetables div like so:

.vegetables a {
text-decoration: none;
color: purple;
}

As you can see, you can select tags within classes. You can do the same with any other div or class.

Those are the basics of classes and IDs! A large part of learning to code is experimentation, so play around with creating more classes and IDs. For more FREE tutorials, check out our 30-minute beginners course on coding: training.mammothinteractive.com/p/learn-to-code-in-30-minutes