Programming 2D scrolling games

From GDWiki

Jump to: navigation, search

Programming 2D scrolling games is a book writen by John "Krylar" Logsdon, for PureBasic. It is meant to be a complete introduction to game programming (and programming in general).

[edit] Official Description

"Programming 2D Scrolling Games" is a comprehensive guide to creating 2D scrolling games with PureBasic development language. An accompanying CD contains a demo version of PureBasic, as well as all the example programs referenced througout the book, which can be loaded directly into the PureBasic IDE, and compiled and run with ease. Aimed at beginners and advanced users alike, "Programming 2D Scrolling Games" starts with the roots of game development, and continues to explore the ins-and-outs of the PureBasic development language, and even takes you through the entire development process of a futuristic side-scroller!

[edit] Complete Table of Contents

  1. PureBasic
      1. Welcome to PureBasic
      2. What is PureBasic and who is this Book for?
      3. Why Learn PureBasic?
      4. What Will I Need to Run PureBasic?
      5. The Major Sections of this Book
      6. Conventions Used in this Book
      7. What's on the CD?
    1. Fundamentals of programming
      1. What is a Program?
      2. Object Code
      3. Bits and Bytes
      4. Screen Resolutions and Bit-Depth
      5. Speed Impact of Higher Resolutions and Bit-Depths
      6. DirectX, Peripheral Cards and Drivers
      7. Creative and Technical Design Documents
      8. Good Coding Style and Commenting
      9. A Place to Work
    2. Getting started with PureBasic
      1. The PureBasic IDE Main Screen
      2. What Every PureBasic Program Must Contain
      3. The PureBasic Debugger
      4. The Good Old "Hello, World!" Program
    3. The basics of PureBasic
      1. Variables, What are they?
      2. Defining Variables
      3. Commenting Your Code
      4. Simple Arithmetic
      5. Cartesian Coordinates
    4. Program Control Statements
      1. If... Then... Else... EndIf
      2. Nested IF Statements
      3. ElseIf Statement
      4. And and Or Statements
      5. The SELECT Statement
      6. Loop Basics
      7. For…Next Loops
      8. While…Wend Loops
      9. Repeat…Until/Forever
    5. Understanding/Using arrays
      1. What Arrays Look Like
      2. Initializing an Array (the DIM command)
      3. Multidimensional Arrays
      4. Re-dimensioning Arrays
      5. Loading Data Values into an Array
      6. Variable Length Data Statements
    6. Understanding/Using structures
      1. Arrays of Structures
      2. Arrays within Structures
      3. Array of Types
      4. Basic Structure Lists
      5. Advanced Structure Operations – Extending Structures
      6. Advanced Structure Operations – Pointers
      7. Other Structure Commands
    7. Working with memory
      1. Creating and Freeing Memory Buffers
      2. Poke and Peek
      3. Resizing Allocated Memory
      4. Copying Memory Buffers
      5. Comparing Memory
      6. String-Specific Commands
    8. Procedures and libraries
      1. Declaring a Procedure
      2. Passing Arguments and Returning Results
      3. Including Files
      4. Libraries
    9. Working with files
      1. Creating a File
      2. Writing to a File
      3. Reading from a File
      4. Moving Around Inside of Files
      5. A Quick Binary Example
      6. Miscellaneous File Commands
  2. PB Game Tools
    1. Colors and drawing primitives
      1. Getting and Setting Colors
      2. Dealing with Pixels
      3. Drawing Lines
      4. Rectangles
      5. Circles and Ellipses
    2. Working with sprites
      1. Basic Loading and Displaying of Sprites
      2. Rotating an Image to Make Multiple Frames
      3. Grabbing Images from Memory
      4. Writing Directly to a Sprite
    3. Handling animation
      1. Page Flip Animation
      2. Animating Images
      3. Animation Timing
    4. Collision Detection
      1. Bounding Box Collisions
      2. Pixel-Perfect Collision Detection
    5. Handling input
      1. Using the Keyboard
      2. Using the Mouse
      3. Displaying a Custom Mouse Cursor
      4. Using the Joystick
    6. Sounds and music
      1. Loading Sounds
      2. Manipulating Sounds
      3. Multiple Sounds Playing Simultaneously
      4. Loading Sounds into Memory
      5. Overlaying Multiple Sounds
      6. Playing Music
      7. Music Modules
    7. Timers
      1. Frames per Second (FPS) Tracking
      2. The Rolling Timer
      3. Locking in at Real Time
  3. Migz Callo: Lazer Blazer
    1. Game design
      1. Background Story
      2. Game Features
      3. Art Asset List
      4. Sound Asset List
      5. Music Asset List
      6. Map Asset List
      7. Technical List
    2. Z-ordering
      1. What is Z-Ordering?
      2. Why Use Z-Ordering?
      3. How to Implement Z-Ordering
    3. Loading map files
      1. Loading Tiles
      2. Text-Based Map File Format
      3. Loading Map Dimensions
      4. Loading the Map Data
      5. Binary-Based Map Files
      6. Loading Binary Maps
      7. Saving Binary Maps
      8. Showing a Loaded Map
    4. Moving sprites on scrolling maps
      1. Player hits a wall
      2. Screen and World Coordinates
      3. Scrolling a Map (Theory)
      4. Edge-Independent Scrolling
      5. Scrolling Code
      6. More on Coordinate Systems
      7. Screen Vs. World
      8. Robots, HealthPaks, and Lasers…oh my!
    5. Simple AI
      1. Robots Doing Stuff
      2. Robots Firing
      3. Migz Gets Bored
      4. Migz Falls Asleep
    6. Putting it all together
      1. The main loop
      2. Making a level for Migz
      3. Placing robots and healthpaks
      4. Code for starting a level
      5. Conclusion

[edit] External Links

Krylar's Kreations. from share-it!

Categories