How to Create a Videogame By: Connor McCann. Java Java is one of many programming languages Java is used to run web browsers and most PC video games I.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Q and A for Chapter 6 CS 104 Victor Norman. Return values Q: A function definition that returns a value (i.e., a non-void function) must have at least.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Week 9: Methods 1.  We have written lots of code so far  It has all been inside of the main() method  What about a big program?  The main() method.
Variables Pepper. Variable A variable –box –holds a certain type of value –value inside the box can change Example –A = 2B+1 –Slope = change in y / change.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
A tour around Java General introduction to aspects of the language (these will be covered in more detail later) After this tour you should have a general.
CSE 131 Computer Science 1 Module 1: (basics of Java)
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
Hello AP Computer Science!. What are some of the things that you have used computers for?
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Arrays (Part 1) Computer Science Erwin High School Fall 2014.
By Nicholas Policelli An Introduction to Java. Basic Program Structure public class ClassName { public static void main(String[] args) { program statements.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
Lecture 2: Classes and Objects, using Scanner and String.
CSE 131 Computer Science 1 Module 1: (basics of Java)
Sahar Mosleh California State University San MarcosPage 1 A for loop can contain multiple initialization actions separated with commas Caution must be.
By the end of this session you should be able to...
More arrays Primitive vs. reference parameters. Arrays as parameters to functions.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
Session Three Review & Conditional Control Flow. Java File Hierarchy Projects Packages Classes Methods.
An Introduction to Java – Part 1 Dylan Boltz. What is Java?  An object-oriented programming language  Developed and released by Sun in 1995  Designed.
Java development environment and Review of Java. Eclipse TM Intergrated Development Environment (IDE) Running Eclipse: Warning: Never check the “Use this.
1 University of Utah – School of Computing Computer Science 1021 "Applets and Applications"
Programming games HTML/JavaScript basics Functions, events, forms Classwork: [Show favorite sites.] Coin toss. Homework: GET WEB SPACE. Complete coin toss.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Hello Computer Science!. Below is an example of a Hello World program in JAVA. While it is only three lines of code, there are many things that are happening.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
Chapter 2 Input, Variables and Data Types. JAVA Input JAVA input is not straightforward and is different depending on the JAVA environment that you are.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
Aside: Running Supplied *.java Programs Just double clicking on a *.java file may not be too useful! 1.In Eclipse, create a project for this program or.
Week 9 - Wednesday.  What did we talk about last time?  2D arrays  Queen attacking pawn example  Started Game of Life.
An Introduction to Java – Part 1 Erin Hamalainen CS 265 Sec 001 October 20, 2010.
MIT AITI Lecture 2 The of Java In the following lectures you will learn the basic structures that make up the Java programming language: »Variables.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Chad’s C++ Tutorial Demo Outline. 1. What is C++? C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for.
Coding – Week 2 Functions, Arrays, and Objects. Functions  Functions are not a new concept – you’ve been using them already.  void setup() {} and void.
Eastside Robotics Alliance / Newport Robotics Group 1 T/Th, 6:30 – 8:30 PM Big Picture School Day 3 · 10/9/2014.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Basic coding… with TouchDevelop!!
Content Programming Overview The JVM A brief look at Structure
Learning to Program D is for Digital.
Welcome to Computer Science Jeopardy
Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Hector Cen Fall 2017
Engineering Innovation Center
BIT115: Introduction to Programming
Lesson 2: Building Blocks of Programming
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
LRobot Game.
An Introduction to Java – Part I, language basics
Organizing Memory in Java
Coding Concepts (Basics)
COM-152: Computer Programming Types, Variables, Operators Part 1 of 2
Java Programming Review 1
Tutorial 10: Programming with javascript
Variables Here we go.
IAT 800 Foundations of Computational Art and Design
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Variables and Constants
Intro to Programming (in JavaScript)
Presentation transcript:

How to Create a Videogame By: Connor McCann

Java Java is one of many programming languages Java is used to run web browsers and most PC video games I am definite that everyone in this room has at least one computer with Java running in their home

Eclipse is a programming software It is what I will be using in this presentation It can be used to program Java scripts as well as Android apps.

Getting Started When you start eclipse you will be required to open a file, to do this all you need to do is make a new file on your desk top, name it whatever you want. You will then need to select a series of settings, from those settings eclipse will start by making you a main ‘Class’. Classes are stored in packages

Classes In Java a ‘Class’ is a group of methods that do a specific task For example, a character in a video game is a class The main class could be named “main.java”

Methods Methods are used in ‘Classes” to do a specific function EXAMPLE: Make a character move EXAMPLE OF METHOD START: public void charjump(); A method must be called EXAMPLE CALLING A METHOD: charjump();

Variables, Floats and Booleans Variable are used to hold a value, such as an enemy ID Floats are used in some numbers, you may need to ‘cast’ a number as a float. To do this just put an ‘f’ after the number (i.e. 5.0f) Booleans are a type of variable that need a true or false response. One example of this is checking if the player is on the ground.

Declarations To use ‘Variables’, ‘Floats’, ‘Booleans’ or basically anything else, you will need to make declarations To make a declaration, go to the top line then hit enter twice EXAMPLE DECLARATION: “public int i;” “ i = x;” ‘i’ represents the integer, ‘x’ represents a solid number, the word ‘public’ means it can be used in any class and the word ‘int’ is short for integer. This statement declares an integer and sets its value.

Init Init is the most important method of making a video game because it initializes the game. Here is where you call anything you’ll need for the game to run, Timers, Health Checkers, Enemy AI’s, etc.

If Statements and For Loops If statements are used in a method to tell it to only use a chuck of code if something happens Example of IF statement If i !== 10 && i > 0 then{ –i++ –}–}. For Loops tell the game to do a chunk of code for an entire array (a group of numbers)

Draw. Draw is used to make lines, shapes or occasionally images appear on the game screen. Draw requires many specific ‘parameters’ to do its job. Parameters are used to tell a method additional things it will need. Draw is classified as a function

Math Math is a large part of programming and video games Math used to call many functions EXAMPLES Math.RANDOM Math.cos Math.sin

E X TRA TIPS Keep things simple when your going to test stuff (i.e. If you want to test a boss, make the way to it easy while you test, make it hard later) Avoid making too much work for yourself Keep the code organized Also code is extremely picky, If you even miss one semi-colon, you will get an: