goal next 2d3 weeks
play

Goal:&next&2D3&weeks& ! - PDF document

Goal:&next&2D3&weeks& ! Create&a&pla@orm&game&(side&scrolling&game)& leveraging& Canvas&Tutorial& " HTML& 2D&Canvas& " HTML5&


  1. Goal:&next&2D3&weeks& ! Create&a&pla@orm&game&(side&scrolling&game)& leveraging& Canvas&Tutorial& " HTML& 2D&Canvas& " HTML5& (be&sure&to&follow&the&links)& " CSS,&and& " &JavaScript& ! Final&product&(aLer&2D3&Weeks)& From&Simple&HTML&to&2D&Pla@orm&Game& " Jumping&player&enOty& & " Scrolling&background& " Parallax& " GamificaOon&elements:&points,&Omer& Sub&goals:&&Shorter&Term& The&Basics&“HTML”&Pages& & ! We&will&start&from&the&very&beginning…& ! The&language&of&the&web,&& " A&browser&languages,&enables&browser&to&display& " Learn&HTML/&Some&JavaScript& webpages&according&to&specified&formats.& " StarOng&from&a&simple&html&page& • Fonts,&color,&tables,&paragraphs& • Basic&Document:& " Draw&on&a&canvas& – Heading& – Paragraph& " Animate& – Another&Paragraph& " A&markup&language&is&a&set&of&markup&tags& • The&tags&describes&the&document&content& " Simple&Shooter& • HTML&documents&contain&HTML&tags&and&plain&text& • HTML&documents&are&simply&called&web&pages& " Breakout&(Tuesday&next&week)& ! A&Simple&Example&of&&a&BASIC&HTML&document&…&next.& A&simple&and&basic&&page& Anatomy&of&a&web&page& <!DOCTYPE html> <!DOCTYPE html> <html> <html> <html> <html> <head> <head> <body> <body> <title>Page Title</title> <h1>This a Heading</h1> <h1>This a Heading</h1> </head> </head> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <body> <body> <p>This is another paragraph.</p> <p>This is another paragraph.</p> <h1>My Second Heading</h1> <h1>My Second Heading</h1> </body> </body> <p> My Third paragraph.</p> <p> My Third paragraph.</p> </html> </html> </body> </body> </html> </html> 0DmozillaDhtmlDskeletonDnoDcanvasD01.html& ! The&DOCTYPE&declaraOon&defines&the&document&type&to&be&HTML& ! Page&full&of&‘tags’& ! The&text&between&<html>&and&</html>&describes&an&HTML&document& " <tagname>)content)</tagname>) ! The&text&between&<head>&and&</head>& " HTML&tags&normally&come&in&pairs&like& <p>)This)is)a)paragraph)</p>) " &provides&informaOon&about&the&document&(preamble)& " The&first&tag&in&a&pair&is&the&start&tag,&the&second&tag&is&the&end&tag& ! The&text&between&<Otle>&and&</Otle>&provides&a&Otle&for&the&document& " The&end&tag&is&wri^en&like&the&start&tag,&but&with&a&slash&before&the&tag&name& " Some&browser&put&this&text&on&the&‘Otle&bar’& ! The&text&between&<body>&and&</body>&describes&the&visible&page&content& 0DmozillaDhtmlDskeletonDnoDcanvasD00.html& " The&text&between&<h1>&and&</h1>&describes&a&heading& " The&text&between&<p>&and&</p>&describes&paragraph&

  2. The&<!DOCTYPE>&DeclaraOon& Comments& ! &Comments&in&code,&use&a&& ! &Denote&which&language&you&use& " &<!DD&&&& " DOCTYPE&html&is&for&the& • 2&dashes& • tag&to&denote&the&beginning&of&a&comment,&a&comment& • Old&school&html,&and&the&newer&HTML5&& " DD>& " <!DOCTYPE&html>& • &concluded&or&'closed'&by&a&&DD>&tag,&see&above:& " &A&comment:& • <!DD&A&COMMENT&&&DD>& " Another&comment:& &<!DD&& &Another&COMMENT,& & & &that&spans&mulOple&lines& & &DD>& Example&Comment& HTML&more&inDdepth& ! &Some&great&tutorials&are&available,&one&of&my& favorites,&that&have&nice&WYSIWYG&interfaces:& <!DOCTYPE html> <!DOCTYPE html> <html lang <html lang="en"> ="en"> " h^p://www.w3schools.com/html/default.asp& <head> <head> <meta charset="utf-8" /> <meta charset="utf-8" /> <title>A tiny document</title> <title>A tiny document</title> ! &Need&a&good&editor:& </head> </head> " Simple:&& <body> <body> <h1>Main heading in my document</h1> <h1>Main heading in my document</h1> • vi,&notepad,&text&edit,&&emacs& " Professional:& <!-- COMMENT --> <!-- COMMENT --> <!-- Note that it is "h" + "1", not "h" + the letter "one" --> <!-- Note that it is "h" + "1", not "h" + the letter "one" --> • Dreamweaver&(expensive)& <p>Hey!!!! I am coding in (Hyper Text Markup Language)HTML.</p> <p>Hey!!!! I am coding in (Hyper Text Markup Language)HTML.</p> " We&will&use&simple&ones&–&and&&I&will&use&vi.& </body> </body> </html> </html> " Webstorm’s&jetbrain?&(will&try&to&see&if&I&can&get&a& educaOonal&license&for&this&one)& 0DmozillaDhtmlDskeletonDnoDcanvasDcomment.html& HTML5& What&is&a&<canvas>?& ! &A&container&for&hosOng&graphics.& ! &As&of&October&2014&this&is&the&new&HTML& standard:& " Can&render&Bitmap&images&(JavaScript)& ! &A&rectangular&area&on&an&HTML&page.& " Adds&syntacOc&features&to&HTML:& ! &Canvas&has&several&methods&for&drawing:& " new&<video>,&<audio>&and&the&< canvas>' elements& " Lines,&paths,&boxes,&circles,&text,&and&graphic&images.& • Handle&Graphical&and&mulOmedia&content&without&resorOng& to&plugDins,&and&new&APIs& " Defined&by&JavaScript&methods&(APIs)&for&drawing&the& " )<canvas>) is&for&graphics,&and&we&use&graphics&for& graphics&(lines,&paths,&boxes,&circles,&shapes).& animaOon,&and&gaming.& " JavaScript&API& – It&can&draw&graphics&using&scripOng&(usually&javascript)& ! &Also&for&text,&animaOon,&and&interacOon& ! &It&was&a&HTML5&before&October&2014?& ! …&and&games!& " Yes,&but&now&it&is&official,&and&it&is&standard.& h^p://en.wikipedia.org/wiki/HTML5&

Recommend


More recommend