Foundation Game Design with HTML5 and JavaScript [electronic resource] /
van der Spuy, Rex.author.
Foundation Game Design with HTML5 and JavaScript teaches you everything you need to know about how to make video games. If you’ve never done any programming before and don’t know where to start, this book will show you how to make games from start to finish. You’ll learn all the latest programming technologies (HTML5, CSS, and JavaScript) to create your games. All written in a fun and friendly style with open-ended projects that encourage you to build your own original games. Foundation Game Design with HTML5 and JavaScript starts by showing you how you can use basic programing to create logic games, adventure games, and create interactive game graphics. Design a game character, learn to control it with the keyboard, mouse, or touch screen interface, and then learn how to use collision detection to build an interactive game world. You’ll learn to make maze games, platform jumping games, and fast paced action games that cover all the popular genres of 2D gaming. Create intelligent enemies, use realistic physics, sound effects and music, and learn how to animate game characters. Whether you're creating games for the web or mobile devices, everything you need to get started on a career as a game designer is right here. Focused and friendly introduction to making games with HTML5. Essential programming and graphic design techniques for building games, with each chapter gently building on the skills of preceding chapters. Detailed case studies demonstrating techniques that can be used for making games in a wide variety of genres.
Description based upon print version of record.
Title Page; Copyright Page; Contents at a Glance; Table of Contents; About the Author; About the Technical Reviewer; About the Cover Image Artist; Acknowledgments; Introduction; Chapter 1 Learning HTML and CSS; What you need; A computer; Programming software; Graphic design software (optional); What kinds of games can I make?; How hard is it?; Learning HTML; Tags; Structuring HTML documents; A basic web page; Using an attribute to set the document language; Adding a page title; Page headings; Paragraph text; Italic and bold text; Making lists; Adding links
Linking to something on the same pagePrefetching pages; Adding images; Making comments; Character encoding; More about HTML; Make it prettier with CSS; Font styles; Font family; Embedding custom fonts; Font sizes; Font colors; More about colors; Bold, italic, and underline font styles; List styles; Highlighting links; Borders, padding, height, and width; Cascading styles; Using  elements; Using an id; Using a class; Using an id and class together; Loading background images into HTML elements; Positioning elements with CSS; Inline and block elements; Floating elements
Adding margins to space the elementsClearing floating elements; More about centering elements; Absolute positioning; More about block sizes: The box model; Organizing your files; Separating HTML and CSS code; Organizing code and media; More about the video and audio elements; Learning more about HTML and CSS; Summary; Chapter 2 Learning JavaScript; Setting up; Displaying messages in the console; What should you do if your program doesn't work?; Variables; Working with numbers; Working with strings; Working with true or false variables; Decision making; Checking more conditions
Using a switch statementUsing && and ||; Using functions; Functions with multiple arguments; The calculator function; Functions that return values; Function expressions; Controlling HTML and CSS; Creating new text in an HTML element; Changing CSS with JavaScript; Creating and removing HTML elements; Removing HTML elements; Clicking on buttons; Removing an event listener; Counting; Detecting keyboard key presses; Entering and displaying text; Other cursor properties; Organizing your JavaScript code; Linking the JavaScript program to the HTML document; Using the program.js file
A quick guide to debugging codeSummary; Chapter 3 Your First Games; A basic number-guessing game; Initializing variables; Using functions to modularize the program; Forcing strings to become numbers; A little more about parseInt; Displaying the game state; Counting guesses; Tying up strings; Winning and losing; If statements and Boolean variables; HTML code within strings; Modular programming with functions; Polishing up; Allowing only numbers to be entered; Using the Enter key to input numbers; Improving the user interface; Adding focus to the input field
Disabling the input field, button, and the Enter key
Includes index.
Foundation Game Design with HTML5 and JavaScript teaches you everything you need to know about how to make video games. If you’ve never done any programming before and don’t know where to start, this book will show you how to make games from start to finish. You’ll learn all the latest programming technologies (HTML5, CSS, and JavaScript) to create your games. All written in a fun and friendly style with open-ended projects that encourage you to build your own original games. Foundation Game Design with HTML5 and JavaScript starts by showing you how you can use basic programing to create logic games, adventure games, and create interactive game graphics. Design a game character, learn to control it with the keyboard, mouse, or touch screen interface, and then learn how to use collision detection to build an interactive game world. You’ll learn to make maze games, platform jumping games, and fast paced action games that cover all the popular genres of 2D gaming. Create intelligent enemies, use realistic physics, sound effects and music, and learn how to animate game characters. Whether you're creating games for the web or mobile devices, everything you need to get started on a career as a game designer is right here. Focused and friendly introduction to making games with HTML5. Essential programming and graphic design techniques for building games, with each chapter gently building on the skills of preceding chapters. Detailed case studies demonstrating techniques that can be used for making games in a wide variety of genres.
Computer games—Programming.
Software engineering.
Game Development.
Software Engineering/Programming and Operating Systems.