Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Shaun Kelly
Shaun Kelly
5,648 Points

I am wanting to create game apps for android, programming in Java but I need guidance?

I have been using Android Studio and from the looks of it you can only create simple apps such as Fun Fact apps, Blog Readers etc. I have been told that I can import things such as tools, assets and stuff into Android Studio for creating games from something called LibGDX, is this true?.

I'm trying to do research into this because I really don't understand how it works and what to do etc. Can somebody please answer my question and hopefully give me more information about this. I am also open to suggestions. What i'm trying to achieve, is to be able to create and code game apps using assets, gravity, colliders etc but I want to use Java first then in the future I can learn other programming languages still for games.

7 Answers

Hello again Shaun,

It's true that you can create great things usung Android Studio with imported tools. The things you are looking for like simulated gravity and object collisions can be found in some game engines. I recommend trying unity.

http://unity3d.com/unity/multiplatform/mobile

Simulating physics is hard and most game developers trust engines like unity and unreal engine with big teams of experts.

Exactly.

Shaun Kelly
Shaun Kelly
5,648 Points

Can you explain to me what a game engine is ? and also how to use them ?

A game engine is sort of like a framework. It's a collection of functions that you can use insted of creating them yourself. Imagine if you have a door in the game. To open it you can use ready function something like door.Open(). Or gravity.on() to..well turn gravity on. Bear in mind that these are example functions and will be with different names and arguments in different engines.

Most game engines come with suit for visual development. When you download unity you will get both the game engine and the visual development tool. This tool allows you to edit both 3d and 2d objects and add functions to them.

If you are going to model the game by yourself its best to use 3d modeling software like blender or 3ds max and then import them to unity and add functions to them.

Ill give an example:

You have to make a simple game where the player has to go to a cross on the floor and he will hear a sound.

  1. You model the visuals in software like blender. Build the walls and so on.
  2. Then import the models into unity.
  3. Then create a function that checks if the player is on the cross.
  4. If he is, use a method for sound.

Of course this is too simple to model in blender and you can use the included visual tool in unity. But dedicated 3d modeling software are usually better.

I know this is quite a lot of information. So feel free to ask any questions.

A game engine is sort of like a framework. It's a collection of functions that you can use insted of creating them yourself. Imagine if you have a door in the game. To open it you can use ready function something like door.Open(). Or gravity.on() to..well turn gravity on. Bear in mind that these are example functions and will be with different names and arguments in different engines.

Most game engines come with suit for visual development. When you download unity you will get both the game engine and the visual development tool. This tool allows you to edit both 3d and 2d objects and add functions to them.

If you are going to model the game by yourself its best to use 3d modeling software like blender or 3ds max and then import them to unity and add functions to them.

Ill give an example:

You have to make a simple game where the player has to go to a cross on the floor and he will hear a sound.

  1. You model the visuals in software like blender. Build the walls and so on.
  2. Then import the models into unity.
  3. Then create a function that checks if the player is on the cross.
  4. If he is, use a method for sound.

Of course this is too simple to model in blender and you can use the included visual tool in unity. But dedicated 3d modeling software are usually better.

I know this is quite a lot of information. So feel free to ask any questions.

Shaun Kelly
Shaun Kelly
5,648 Points

Okay cool so is a library on a software such as Android studio, a pack of tools to use and create assets and colliders etc into a game?

Shaun Kelly
Shaun Kelly
5,648 Points

How do I import a library from Unity into Android studio? I need step by step instructions or anywhere where it can tell me ?