Skip to 0 minutes and 4 seconds[VIDEO GAME MUSIC PLAYING]
Skip to 0 minutes and 12 secondsAs you can see, I've already downloaded the code that we're going to use in this course. The code is some code that I created many moons ago, many years ago when Android was very young, and it's a code that will make the game run really. It's quite a complex code. It provides all the background for a game. But what it also does is it provides us a platform for which we can create our own games, and that's what we are going to learn to code from in this course. OK. So let's get it into Android Studio. First of all, as you'll notice, this is actually a .ZIP file, so we have to unZIP it. On Windows, that's quite easy.
Skip to 0 minutes and 52 secondsWe double-click it, and then we could just press Extract All Files. Here, I like to go in and select a good place for doing so, and I'll go in and put it onto the Desktop.
Skip to 1 minute and 7 secondsC:, Desktop, and I'll just extract it here. The Desktop is maybe not my preferred place to put things that I'm coding on, but it makes it easier to refer to when we are working in this course. So you could put it wherever you'd like, but I'll just put it here so it's easier for you to see what I'm doing.
Skip to 1 minute and 31 secondsI'll probably be choosing here because it takes some time. And it's finished. So we go in, and let's look a little bit on what we have here. So you see, there's two folders inside this workspace. The MOOC folder is actually the project folder. This is where the code is. If you click it, you can see there's a lot of gobbledygook in here. These are all the different file that Android Studio will use to create our project. There's also all the source code. We'll get through that when we are inside the Android Studio. Lots of things here.
Skip to 2 minutes and 5 secondsMany things that I don't even understand because it's generated by Android studio, but they are necessary-- all of them-- for it to run as a project. If you go out again, you'll see there's another folder here-- TheGame Versions folder. In here, you see we have several different versions of the code that we are providing. This is code that you can use to get back to previous versions. So if you are working or something and you get stuck, you'll be able to go in here and copy and paste the code and get back so that you know that you have fresh code that works.
Skip to 2 minutes and 41 secondsYou will also be able to go in, of course, and see what we will be working on in the future. So you will actually go in in Version 6 and look at the full game that we're going to create in this course. So this is for your convenience, really. Good. Let's get started, and I'll just start up Android Studio here in Windows. It's quite easy, Android Studio. And we are starting up, and we are just loading up first. And we'll get the Welcome screen. Here we are. This is our Welcome screen. In the Welcome screen, we should open an existing Android Studio project. So we click with the Open an existing Android Studio project, so open the project.
Skip to 3 minutes and 21 secondsAnd we have to go in and find the workspace. So we go in, and it was on the Desktop. So I have to go into Users. This is my username, and then the Desktop here. And then we go in, and we have the Android Studio here. And we open that because the one we want to open is that MOOC folder, the project folder. So let's open that. Here, I highlight it, and then I click OK. And now, it will load. This will take some time. And as you can see, first of all, you might get a few error message. And this one is just saying that this was actually created on a Mac machine, so the path is wrong.
Skip to 4 minutes and 4 secondsThat's OK. You just say OK because then Android Studio will change the setting so it fits with the setting that you have on your machine. This was the software development kit actually from Android-- that it was in the wrong position. And now, it's setting that up. You'll notice that it's not instantly there. It's not like a normal programme where you just open it, and we are ready. There's a lot of processes in the background that is running around and setting things up at the moment. And therefore, we can't just start immediately working when we have opened it because we need to make sure that everything has loaded. You can see down here, for instance, it says the GradleBuild is running.
Skip to 4 minutes and 50 secondsYou can see the running around here, and that's because it's-- yeah. It's syncing-- there's a syncing in progress, and all this has to be set up before we can start working. So you have to have some patience and sit and maybe find yourself a coffee or a tea or whatever you choose to drink, and give it a little bit of time. Once it's finished, you'll notice that down here it's not running or, up here, the yellow is gone. There we are. It's now gone. That was good timing. And now, we should be ready. Now, I can see there's another task that has started down here. Now. we are ready. You'll now notice that we have an app folder.
Skip to 5 minutes and 39 secondsThis is the app that I've created based on the code-- or that we have created based on the code that I gave you. In here, we have lots of files. We get to what they mean later on. This just a start and to show you everything. But if things are looking like this, if you have these folders and they look like they do here, then you're very likely to have a successful start of the Android Studio.
Setting up the game framework and the IDE
Setting up your game framework
Now that you have successfully installed your IDE, you’ll need to download the game framework, which is the code that’ll form the skeleton of the game. By exploring and editing this framework you’ll learn about some of the elements that make up a program and how you can use them to write your own code. Download the game framework and save it on your computer.
Java does not always work reliably with unusual character sets. See course FAQ here for more details.
Setting up your IDE
The IDE is your ‘workbench’ where you’ll create, modify, test and run the game code. In the video, Karsten will guide you through setting up your IDE so you can try your hand at running some code. There’s also a downloadable guide for this Step, which is a supplement to the video. Watch the video first to see how it works, and then print or keep the guide open while you do it yourself.
Please note: The video was made with an older version of the IDE, so while things are mostly the same there are some small differences to how the user interface looks.
Don’t forget you can visit our Begin Programming FAQs for a rich set of common problems and possible solutions.
© University of Reading