Games5 - Creating a 2D "platform" game Get the...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Creating a 2D "platform" game Get the allsrc/ch05src code Friday, October 28, 2011
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Creating a tile based map Make the map image out of smaller images Each cell contains an image or nothing Tile based maps tend to make it easy to tell what is solid and what is not by knowing what the image is Friday, October 28, 2011
Background image of page 2
TileMap.java contains a tile map key data structures: private Image[ ][ ] tiles = new Image[width][height]; private LinkedList sprites = new LinkedList( ); private Sprite player; routines that getTile , addSprite (to the map) removeSprite (from the map), and that get an iterator over all of the sprites Containers are crucial to this Friday, October 28, 2011
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Adding tiles to the map Many tile based games have map editors that allow you to create maps from tiles Could make lots and lots of calls to the addTile routine Could make a general tile editor Can make a quick and dirty tile editor # Map file for tile-based game # (Lines that start with '#' are comments)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2012 for the course ECE 462 taught by Professor Samuelmidkiff during the Fall '11 term at Purdue University-West Lafayette.

Page1 / 8

Games5 - Creating a 2D "platform" game Get the...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online