Visit to download CodeAwesomeness.

Slides:



Advertisements
Similar presentations
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Advertisements

Computer Training for Elders.  We make some assumptions about who you are: ◦ You are interested in using a computer for a few basic tasks (to begin with)
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Introduction to Primitives. Overview Today we will discuss: –The eight primitive types, especially int and double –Declaring the types of variables –Operations.
Alice Variables Pepper. Set to Java look Edit / preferences restart.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Alice Learning to program: Part Two by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
Python. What is Python? A programming language we can use to communicate with the computer and solve problems We give the computer instructions that it.
Games and Simulations O-O Programming in Java The Walker School
CS0004: Introduction to Programming Events. Review  Event Procedure  A set of instructions to be executed when a certain event happens.  Many event-driven.
Animated Charting Using the Alice Bar Chart Template World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University December 2010.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Apply Sub Procedures/Methods and User Defined Functions
CS0004: Introduction to Programming Variables – Numbers.
05/09/ Introducing Visual Basic Sequence Programming.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Tutorial for Arrays and Lists By Ruthie Tucker. Description This presentation will cover the basics of using Arrays and Lists in an Alice world This presentation.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
1 Visual Basic for Applications (VBA) for Excel Prof. Yitzchak Rosenthal.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Python November 28, Unit 9+. Local and Global Variables There are two main types of variables in Python: local and global –The explanation of local and.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
The Fundamentals of Using Windows 95. Windows 95 ã operating system that performs every function necessary for the user to communicate and control computer.
IT253: Computer Organization Lecture 3: Memory and Bit Operations Tonga Institute of Higher Education.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
CS 320 Assignment 1 Rewriting the MISC Osystem class to support loading machine language programs at addresses other than 0 1.
Collecting Things Together - Lists 1. We’ve seen that Python can store things in memory and retrieve, using names. Sometime we want to store a bunch of.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Animating Objects in Groups: Using Arrays and Lists By Ruthie Tucker under the direction of Professor Susan Rodger Summer 2008.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Applications Development
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Game Maker – Getting Started What is Game Maker?.
1 Quiz Template: Using the ‘ask user’ functions By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
1 Printing in Python Every program needs to do some output This is usually to the screen (shell window) Later we’ll see graphics windows and external files.
Programming Fundamentals. Topics to be covered Today Recursion Inline Functions Scope and Storage Class A simple class Constructor Destructor.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Learn to code- JavaScript. Prt 1. TUTOR: DRKALMENIUS.
National Diploma Unit 4 Introduction to Software Development Procedures and Functions.
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
Chapter 4.  Variables – named memory location that stores a value.  Variables allows the use of meaningful names which makes the code easier to read.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
By Melissa Dalis Professor Susan Rodger Duke University June 2011
Pixels, Colors and Shapes
A Playful Introduction to Programming by Jason R. Briggs
Chapter 1: An Introduction to Visual Basic 2015
Intro to PHP & Variables
Learning to program with Logo
Lesson 2: Building Blocks of Programming
Introduction to Python
Visual Basic Programming Chapter Four Notes Working with Variables, Constants, Data Types, and Expressions GROUPBOX CONTROL The _____________________________________.
T. Jumana Abu Shmais – AOU - Riyadh
Go to =>
Tonga Institute of Higher Education
IPC144 Introduction to Programming Using C Week 4 – Lesson 2
Presentation transcript:

Visit to download CodeAwesomeness

The first step in building a CodeAwesomeness project is running the actual editor. Go to the “C:\Program Files\CodeAwesomeness” directory. Double Click on the application. The name may differ with different versions, but you should be able to tell, as there is only one application in the CodeAwesomeness folder.

A big part of learning programming is understanding your editor. The big textbox in the middle of the editor is where your code will go. The smaller textbox to the bottom right-hand corner tells you what you can do in the main coding box. Now, the last textbox above the second textbox is the textbox that holds the information about what you have in your “\bin” directory, which holds all the files you may need to use in your program, like pictures for you game.

Now is where you learn what your toolbar at the top does. The toolbar is where you can perform some actions. All the names of the buttons correspond to the actions the button performs. Say the button says “Print”, so the button will print out your code to see for later. If the button says “New”, then it means it will make a new file for you. Very simple.

Now for learning the code. Coding is like assembling a puzzle. If the piece you are trying to assemble doesn’t fit, you will wind up trying to jam in the piece that just won’t work. You need to piece your statements to put together in a way that will function properly. But to code, you need to learn the language. This is like trying to speak a language without knowing the vocabulary necessary. You would be walking blindly in the dark.

If you look at the textbox to the bottom right-hand corner, you will see a list of statements, functions and properties. The words between the lines represent the Library, which contains other statements to use. Anything under a library you can use. For example: Library: Aero, Library Function: Exp(). Now, in CA you would use the code like this: Library.Function(), or Aero.Exp() Remember this slider as we move to the next…

So, as we discussed in the last slide, you need a function to go with the library. In this slide, you will learn about Parameters. Parameters are basically instructions for the function to use to run. Look at this: Aero.Exp(param1, param2, param3, param4) Parameters are separated by commas. For this particular function, you need 4 parameters: Left, Right, Top, Bottom. Here is what the code would look like with the parameters as integer values. Aero.Exp(0, 0, 40, 0)

So what does this function do? This particular function expands the glass border of the window. So the left border would be set to 0 pixels, 0 pixels for the right, 40 pixels for the top, and 0 pixels for the bottom border. What is a function? You might ask. A function is a command telling the compiler to perform an action, with a set of parameters (if needed). A function is enclosed with parenthesis, which are used as indexes for the beginning and end of your parameters.

Now for properties. Properties are basically a sketch-up of a particular object, or item. Take for instance the “des.Title” property. This is a property that indicates the value of the title for the title bar of your window. When setting a property, you must set it to a primitive value, saying a string or number value. Here is an example: Des.Title = “Hello, World!” This sets the title to “Hello, World!”

Keywords are just things you can use in your code to define certain elements. Here is a list of all keywords: If, dim, for, while. All of these keywords indicate a certain job to be done. If you use the keyword “if”, then it will accomplish a certain job, when using a set of, for lack of a better word, “Parameters.”

The dim keyword is used to create variables. A variable is a string value, holding another value. Here is an example of the Dim keyword: Dim variable1 = Stringvalue1 This code above created a variable with the name of “variable1”, with the value of “Stringvalue1.” You can use variables as parameters for functions: Dim var1 = 40 aero.Exp(0, 0, var1, 0)

The for keyword is a loop. Take this code: Dim i = 1 For i To 10 Code… End For This code will loop from the starting variable, “i”, and loop until the ending value, 10. Whatever is inside the “For” and “End For” keywords will loop until the loop is over.

The If (condition) keyword is harder to explain. The if statement runs a certain code only if a certain statement returns true. Take this code: Dim var1=5 Dim var2=1 If {>} [var2] Then Code… End If Because the statement is true, the code inside the “If” and “End If” keywords will run. The operator for the conditions can be “, =, and <>”

The End() function is a function like any other, but its purpose is to end the program. No parameters are required. The End() is different from the rest because it does not have a library to sit in, so you can call that function like this: End() Without a library. Even though it does not have parameters, it still requires the parenthesis.

In previous slides I had mentioned variables, but never fully. A variable and its value is defined by the Dim keyword. A variable can be used multiple times throughout your code. As I had said before, variables can be used as parameters. They can also be used as values for properties. Because variables can only be created with dim, how do you get a new variable to equal another variable? Use VarDim(oldvar, newvar)

Now you have 2 “Dim” things down. New here is funcdim. Funcdim runs a Function and sets the value of a variable to the return value of the function. funcDim(variable, Function) But if the function used does not have a return value, then the value of the variable will be set to the last returned value of a variable. In later coding, you will be using funcDim a lot.

Now that you’ve learn funcDim, you might ask, “What if I need a variable to equal the return value of a property?” My answer is: Use propDim. PropDim uses the same syntax as funcDim, except instead of a variable as the second parameter, you use a property. propDim(variable, Property) Example of propDim put in use: propDim(title, des.Title) This will set the value of “title” to the title of the window.

Sometimes in programming you’ll need to use arrays. An array is just a variable holding information. Take this code in C: arrayexample [x][y]=value; If you were making a chess game, you could use the above code to get what piece is in what square, without using 64 individual variables. In CA, we use reDim. Example: reDim(variable, arraylength, index1, index2, index3) In the future, you’ll be able to use the C example for creating arrays, for more flexability. The next slide shows more on Arrays.

In most games, you’ll need to use arrays to make your code run faster, and more efficiently. Say you are making a Chess game. You need to make an array index for each square. Take this SB code: For (i == 1) To 8; For (j == 1) to 8; grid[i][j]=void; Next; This just creates an 8x8 array, where each square on the board is empty. Then you can set some squares to contain pieces.

Look at this chess game I made in VB: I needed to use arrays to hold the name and types of pieces in each square. For example, grid[6][1] is equal to “White Bishop”, and grid[3][7] is “Black Pawn.” These arrays help the program know if you can move the piece you want to the specified square or not.

eQ lets you set the value of a variable to a the solution of a complex equation. Look at this: eQ var1=mc 2 But of course to do this, you would need to set the values of m and c. dim c=Speed of Light dim m=Mass eQ energy=m(c^2) cLine.print(energy)

A primitive is either a string, a double or an integer. A primitive is basically any ANSI character, or combination of such characters. For example, is a primitive string. More on strings and integers in the next two slides. You can get characters and character codes with the Txt class.

A string in programming is a combination of characters. These characters can be any character from ANSI. ANSI stands for American National Standards Institute. When learning to do programming, strings are very useful. Look at this code in VB: dim newstring as string = “String Value” Primitives are not as useful as individual strings and integers, but they are useful in languages like CodeAwesomeness, where you need to be able to use a single variable as a string and integer.

Integers are numbers without a fractional part. So 1 is an integer, and 1.5 is not. In VB you would declare an integer like so: dim variable as integer = 4 Then you could use this integer in other places. But what if you wanted to make a complex calculator to multiply decimals? How would you do that with integers? The next slide answers that question.

A double is short for double-precision, which means that the number has twice the precision, or can have a fractional part. If you were to make a calculator, you’d want to use doubles instead of integers. In VB you’d declare a number as a double like so: dim variable as double = 4.5 In CodeAwesomeness there is no use for doubles, because primitives can be used in that place.

An event is used for running a certain code when a certain thing happens. In an event called “MouseDown”, a specified code runs when the mouse is clicked. Or in “Des.SizeChanged”, the code would run when the window size is changed. But you can’t use events in CA v0.3. In CA v0.3.5, you will be able to use events. Here is a VB code to handle events: Private Sub MouseMoved(sender as object, e a System.Windows.F orms. MouseEventArgs ‘Code… End Sub

Images play an important part in most programs. But in CodeAwesomeness, you need to use the Img class. To load an image into memory, use this code: funcdim(image, img.Load(source)) You can use these images in you code, and you can also use them with the PEdit class to edit your images.

Compiling you code is the last step to your programming code. To compile your code, just click the “Compile and Run” button at the top of the editor. If your project is saved, it will output a *.codexe file in your source directory. Double-Click on the *.codexe file to run it, and view your application.

You can also code in Notepad, or Notepad ++. Just type your code into the editor and save your file as either a *.txt or a *.cod file. Then drag the saved file onto the CaWN.exe application. This should run your application and compile the project, then create a *.codexe file in the directory of your saved source code file.

Cool! You’ve finally finished this slideshow! Not bad for 30 slides, huh? So now you can create your own games and programs in CodeAwesomeness, and you know a little bit of VB and C (from the examples). Feel free to give feedback on our website ( and ask for help in the forums. Thanks! -The CodeAwesomeness Team Slideshow Created by Mitchell M. K.