DOC PREVIEW
Duke CPS 004 - Java for Video Games

This preview shows page 1-2-24-25 out of 25 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computer Science 4: Java for Video GamesIntroductionAdministrative MaterialWhat you will learn in this courseWhat you won’t learn in this courseWho should take this course ?Who should not take this courseStructure of the CourseIntroduction to Java Downloading Source CodeIntroduction to Java Using EclipseStarting EclipseMaking a projectImporting files into a projectExecuting source codeEditing source codeCompiling source codeExecuting the modified codeSaving projectSlide 19Web Page DevelopmentWebpage PlacementCreating DirectoriesNetscape/Mozilla ComposerSlide 24First AssignmentCompSci 41.1Computer Science 4:Java for Video GamesJam JenkinsD305 [email protected] (Dee) RammD226 [email protected]/education/courses/fall05/cps004/drTACompSci 41.2IntroductionAdministrative materialIntroduction to JavaWebpage developmentFirst assignment (due Wednesday)CompSci 41.3Administrative MaterialCourse WebpageWhat you will learn?Is this course right for you?Structure of the courseCompSci 41.4What you will learn in this courseTwo primary goals are to teachBasic programmingBasic computer science conceptsTo explore these topics we’ll studyVideo game designAlgorithms used in video gamesCompSci 41.5What you won’t learn in this courseThe same amount and type of programming as in CompSci 6 for majorsEnough about Java or video games to market your own gamesProgramming concepts that will only be useful using our video games packageCompSci 41.6Who should take this course ?Students with very little or no background in computer programmingStudents who want to learn something about computer programming and might want to take additional coursesProspective majors who feel they are not ready for CompSci 6Students who want to learn something new, interesting, and fun, that might actually be usefulCompSci 41.7Who should not take this courseComputer Science Majors who already know how to program (in any language)Computer ProgrammersStudents afraid of technology who want to get QS credit with as little pain a possible and who could never imagine taking another computer course (take CompSci 1 instead: it’s a survey course with more general knowledge)CompSci 41.8Structure of the CourseHomeworks 50%WeeklyTypically done in pairsBuild toward projectTests 30%2 Each 15% (no final: final period required for project presentations)Project 20%Used in place of finalDone in pairsCompSci 41.9Introduction to JavaDownloading Source CodeOpen course website:http://www.cs.duke.edu/education/courses/fall05/cps004/drClick on Code at the upper rightRight click on pong.jarSelect Save Link Target AsSave to Desktop(confirm that pong.jar is on the Desktop)CompSci 41.10Introduction to JavaUsing EclipseStarting EclipseMaking a projectImporting files into a projectEditing source codeCompiling source codeExecuting source codeSaving projectCompSci 41.11Starting EclipseDouble Click on Math Apps on the DesktopDouble Click on eclipse.exeCompSci 41.12Making a projectFile->New->ProjectJava->Java ProjectClick on NextFor Project Name type SampleClick on FinishSwitch to Java Perspective? YesCompSci 41.13Importing files into a projectFile->ImportZip fileClick on NextFrom zip file Click on BrowseClick on DesktopClick pong.jarOpenFor Into folder Click on Browse and select SampleokFinishCompSci 41.14Executing source codeClick on + by SampleClick on + by pongClick on Pong.javaRun->Run as->Java ApplicationPlay the gameUsing the mouseUsing the keys ‘i’ and ‘m’(click on red square near bottom right to end)CompSci 41.15Editing source codeDouble Click on PongLoop.javaGo to line 69 where it saysposition1.y-=2; (you’ll see 69:23 in the lower right hand corner as you move the cursor in the code)Change it to sayposition1.y-=8;Click on the disk icon to save (or File->Save)CompSci 41.16Compiling source codeAlways be sure to save any changes before compiling (done in the previous step)(compile is done automatically when you save)CompSci 41.17Executing the modified codeClick on Pong.javaRun->Run as->Java Application(or click on icon with white triangle in green circle)(this will repeat the last Run->Run as->Java Application)What changed?CompSci 41.18Saving projectDuring class projects are saved on the desktopBefore leaving the lab be sure to save your project to your acpub accountCompSci 41.19Saving projectClick on SampleFile->ExportJar fileClick on NextClick on Export java source files and resourcesFor Select the export destinationBrowseICC229 (My Computer)Select P driveCreate and/or change into cps4 folderUse filename mypong.jarClick on FinishCompSci 41.20Web Page DevelopmentWhere files should be placedHow to create and use directories (folders)Using Netscape ComposerCompSci 41.21Webpage PlacementYour webpage is located in P:\public_htmlYour individual course webpage will be located in P:\public_html\cps4Your personal webpage is viewable from http://www.duke.edu/~yourloginYour course webpage is viewable fromhttp://www.duke.edu/~yourlogin/cps4CompSci 41.22Creating DirectoriesDouble Click on My Computer (ICC229)Double Click on P drive (could also be indicated by your login)Double Click on public_htmlFile->New->FolderType in cps4 and EnterCompSci 41.23Netscape/Mozilla ComposerOpen up Netscape/Mozilla/FirefoxWindow->ComposerType Hello in the editorFile->Save asEnter Hello as the title for the pageSelect P:\public_htmlSave as Hello.html (assuming you don’t already have one in your own webpage)CompSci 41.24Netscape/Mozilla ComposerIn Netscape/IE/Firefox, go tohttp://www.duke.edu/~yourlogin/hello.htmlIf you don’t already have a webpage prior, rename Hello.html to index.html and go tohttp://www.duke.edu/~yourlogin/index.html is searched for automatically if no file name is givenExperiment on your own time with Composer to make more webpages and add linksCompSci 41.25First AssignmentVisit the course website and complete the first assignment due on


View Full Document

Duke CPS 004 - Java for Video Games

Documents in this Course
Lecture

Lecture

18 pages

Chapter 7

Chapter 7

18 pages

Chapter 9

Chapter 9

15 pages

Java 1

Java 1

24 pages

Java 3

Java 3

11 pages

Lecture

Lecture

10 pages

Chapter 4

Chapter 4

28 pages

Chap 2

Chap 2

16 pages

Graphics

Graphics

20 pages

Lecture

Lecture

12 pages

HTML

HTML

16 pages

Java 1

Java 1

6 pages

Chapter 4

Chapter 4

16 pages

The Plan

The Plan

25 pages

Lecture

Lecture

16 pages

Chapter 6

Chapter 6

21 pages

Lecture

Lecture

18 pages

Lecture

Lecture

23 pages

Lecture

Lecture

16 pages

Lecture

Lecture

19 pages

Lecture

Lecture

12 pages

Lecture

Lecture

5 pages

Lecture

Lecture

26 pages

Lecture

Lecture

16 pages

Chapter 7

Chapter 7

23 pages

Lecture

Lecture

21 pages

Lecture

Lecture

4 pages

Lecture

Lecture

4 pages

Lecture

Lecture

8 pages

Lecture

Lecture

4 pages

Lecture

Lecture

10 pages

Chapter 4

Chapter 4

32 pages

Java

Java

4 pages

CompSci 4

CompSci 4

18 pages

Lecture

Lecture

26 pages

CompSci 4

CompSci 4

12 pages

HTML

HTML

17 pages

Lecture

Lecture

16 pages

Chapter 5

Chapter 5

22 pages

Lecture

Lecture

4 pages

Chapter 4

Chapter 4

10 pages

Chapter 2

Chapter 2

15 pages

Chapter 8

Chapter 8

14 pages

Lecture

Lecture

15 pages

Load more
Download Java for Video Games
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Java for Video Games and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Java for Video Games 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?