background preloader

The guide to implementing 2D platformers

The guide to implementing 2D platformers
Having previously been disappointed by the information available on the topic, this is my attempt at categorizing different ways to implement 2D platform games, list their strengths and weaknesses, and discuss some implementation details. The long-term goal is to make this an exhaustive and comprehensible guide to the implementation of 2D platform games. If you have any sort of feedback, correction, request, or addition – please leave it in the comments! Disclaimer: some of the information presented here comes from reverse engineering the behavior of the game, not from its code or programmers. It’s possible that they are not ACTUALLY implemented in this way, and merely behave in an equivalent way. Also note that tile sizes are for the game logic, graphical tiles might be of a different size. I can think of four major ways in which a platform game can be implemented. Type #1: Tile-based (pure) Character movement is limited to tiles, so you can never stand halfway between two tiles. Slopes

http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/

Math for Game Developers Video Series I've launched a new Youtube series, Math for Game Developers. Each week I'll be showing how to solve a new problem in game development using math, and I'll be building up a math toolkit that you can use to solve any game dev problem. 1. Moving a character with vectors: 2. More moving characters: » Floyd-Steinberg dithering in JavaScript There are many “smart” algorithms in 2D graphics and Floyd-Steinberg error diffusion is one of them. Attached demo demonstrates a dithering on webcam output (or Bucks Bunny video, when webcam is not available). Open demo in the new window What is the problem The problem is, that we have an image (table of pixels) in format, which uses lots of colors (hundreds, thousands, millions …) and we want to display it with less colors, and we already have both palettes. There might be many reasons for doing that.

Quantum Consciousness Orchestrated Objective Reduction of Quantum Coherence in Brain Microtubules: The "Orch OR" Model for Consciousness Stuart Hameroff and Roger Penrose Features of consciousness difficult to understand in terms of conventional neuroscience have evoked application of quantum theory, which describes the fundamental behavior of matter and energy. The Guide to Implementing 2D Platformers - Game Programming This article was written by Rodrigo Monteiro and originally published on his own blog at Higher-Order Fun and reprinted on our site (thanks to Rodrigo) in order to provide everyone with this great resource. Having previously been disappointed by the information available on the topic, this is my attempt at categorizing different ways to implement 2D platform games, list their strengths and weaknesses, and discuss some implementation details. The long-term goal is to make this an exhaustive and comprehensible guide to the implementation of 2D platform games. If you have any sort of feedback, correction, request, or addition – please leave it in the comments! Disclaimer: some of the information presented here comes from reverse engineering the behavior of the game, not from its code or programmers.

What does a game “producer” do, exactly? (exclusive) Editor’s Note: Reaction to our first exclusive TERA dev diary and massive TERA art exhibit was positive, and the game itself seems to be doing well now that launch woes have been stifled, so I’m happy to present the next entry from En Masse Entertainment Producer Chris Hager. If you have any specific games or aspects of game development you’d like to know more about, shout them out in the comments and I’ll see what I can do. Enjoy! ~Sebastian How to Create and Use Symlinks on a Mac In my recent post about pairing SSD and HDD storage inside a MacBook Pro, I used a little-known command line feature to redirect some of my user folders from the SSD to the hard drive. I wanted OS X to still refer to the default locations of ~/Documents, ~/Downloads and so on for these folders, but I wanted to use the storage space on the big drive for these kinds of files. Symbolic Links (symlinks) are a function of the UNIX underpinnings of OS X to create something like an alias, but at a low-level in the filesystem.

The Ancient Greeks' 6 Words for Love (And Why Knowing Them Can Change Your Li... Looking for an antidote to modern culture's emphasis on romantic love? Perhaps we can learn from the diverse forms of emotional attachment prized by the ancient Greeks. posted Dec 27, 2013 This article originally appeared in Sojourners. Today's coffee culture has an incredibly sophisticated vocabulary. A* Pathfinding for Beginners By Patrick Lester (Updated July 18, 2005) This article has been translated into Albanian, Chinese, Finnish, German, Greek, Korean, Polish, Portuguese, Romanian, Russian, Serbian, and Spanish. Other translations are welcome. See email address at the bottom of this article. The A* (pronounced A-star) algorithm can be complicated for beginners.

Why Crunch Modes Doesn't Work: Six Lessons Why Crunch Mode Doesn't Work: 6 Lessons There's a bottom-line reason most industries gave up crunch mode over 75 years ago: It's the single most expensive way there is to get the work done. by Evan Robinson Executive Summary When used long-term, Crunch Mode slows development and creates more bugs when compared with 40-hour weeks. PhoneGap Android Plugin to Extract ZipFile. Hello Folks, Its about after 2 months I thought of writing a post. So here is it. I was thinking to extract a .zip file from PhoneGap on android and I ended up implementing a plugin for it.

js - jQuery plugin for HTML5+JSON interactive tables and more Demo Processing... To get started, simply install jquery.dynatable.js (along with jQuery), and add the following in the document.ready or after the table: $('#my-table').dynatable(); How it works N Tutorial B - Broad-Phase Collision SECTION 3: Object Grid The grid structure described above can also double as a spatial database used to manage dynamic objects. Just as each cell contains information about the tile located in that cell, it can also contain information about each dynamic object currently located in the cell. Each cell contains a list of dynamic objects; as an object moves through the grid, we insert/remove it from each cell's list as appropriate. There are two approaches that can be taken when using a grid with dynamic objects: "normal" grid: each object is associated with all of the cells it touches.

Code inComplete - Binary Tree Bin Packing Algorithm I recently built a ruby gem for auto generating CSS Sprites. It’s simple and flexible, and can be used to generate sprites in either a horizontal or a vertical layout. This works great for most use cases, but has a couple of downsides: Very wide or tall images are not very human friendly, need to zoom and pan. Function.apply and Function.call in JavaScript In order to explain how the createDelegate function works in the last post, we have to understand JavaScript closures and Function.apply(). The apply() method is the easiest subject to tackle, so we'll start there and work up. Every function in JavaScript has a number of attached methods, including toString(), call(), and apply().

Related: