background preloader

Programming

Facebook Twitter

SFML - Simple and Fast Multimedia Library. Introduction This tutorial is the first one you should read if you're using SFML with the Visual Studio IDE (Visual C++ compiler). It will explain how to configure your SFML projects. Installing SFML First, you must download the SFML SDK from the download page. You must download the package that matches your version of Visual C++. You can then unpack the SFML archive wherever you like. Creating and configuring a SFML project The first thing to do is to choose what kind of project to create: you must select a "Win32 application". Now we need to tell the compiler where to find the SFML headers (.hpp files), and the linker where to find the SFML libraries (.lib files).

In the project's properties, add: The path to the SFML headers (<sfml-install-path>/include) to C/C++ » General » Additional Include Directories The path to the SFML libraries (<sfml-install-path>/lib) to Linker » General » Additional Library Directories Your project is ready, let's now write some code to make sure that it works. I want to be a game developer... now what? With people looking to get into game development the same questions come up over and over, so I’ve opted to put my thoughts on the subject in one place and to compile a list of resources for new developers. Those questions? “I want to learn game programming, what language should I use?” “Should I use an engine, or create my own?” “What library/tools should I use"?” “Now what?” I will try to address all of these questions and more in the following post. For those of you that like skipping ahead to the last page in a novel, these links are for you!

… the C++ question. Let me get the 800lb gorilla out of the way first of all. Alright, back to the whole C++ question. Don’t get me wrong, I totally understand why you want to go with C++, I’m just as guilty. Again, these are just my opinions ( and those of the vast majority of people that went down this road themselves! Now, if you did in fact make the decision to go ahead with C++, for the love of all that is holy, DO NOT USE DevC++. Do something. Inverted Key Strokes | Programming, Computer Science, and Technology blog | Page 2. Megan Fox's Blog - Game Engines 101: The Entity/Component Model. The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.

The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company. There are many approaches to game engine design, and this is far from the best in all cases, but it is certainly the most common overall. Welcome to the wide world of component-based entities. First, let's address the way most people fresh out of Data Structures, CS 101, etc think of game objects: class Engine { int numberOfCylinders; .... } class Car : Public Engine { bool hasComfySeats; bool numSeats; ... } ... which is, in a word - bad. Let's take a peak at why. So we stop just short of hanging ourselves, back out, and realize that that route is unsupportable. Thus - enter components. Class Entity { void AttachComponent(ComponentType, argumentList, name) void DetachComponent(name) void UpdateComponents() void UpdateComponentType(ComponentType typeOfComponentToUpdate) class BaseComponent { Done.

DirectX Graphics and Gaming. DirectX Tutorial.com - Game Programming with DirectX. DirectX 11 Tutorials. Prep: The Graphics Pipeline. In this preparation tutorial I will give an brief overview of the graphics pipeline. A basic knowledge of the steps that a graphics card performs while rendering is essential for using and understanding modern OpenGL.

OpenGL is of course, a graphics rendering API. It provides functions for you as a programmer to generate primitives (triangles, points etc.) by specifying the vertices that make them. These vertices are then manipulated by the graphics card, and then the final shapes are rasterized with the eventual result being a chunk of pixel data in a buffer. This buffer, called the framebuffer, is what you see displayed on the screen. There are a few steps though between supplying the raw vertex data, and the framebuffer being displayed and this is called the rendering pipeline. Step 1. - Per-vertex Operations In this stage the vertices that are sent to OpenGL are normally transformed through the model-view-projection matrix into screen coordinates.

Step 2 - Clipping and culling. Opengl-tutorial.org | Tutorials for OpenGL 3.3 and later. Writing Game Code. Understanding Pac-Man Ghost Behavior. Posted on December 2, 2010 It only seems right for me to begin this blog with the topic that inspired me to start it in the first place. Not too long ago, I came across Jamey Pittman’s “Pac-Man Dossier”, which is a ridiculously-detailed explanation of the mechanics of Pac-Man. I found it absolutely fascinating, so this site is my attempt to discover and aggregate similarly-detailed information about other games (albeit in much smaller chunks).

However, as a bit of a tribute, I’m going to start with Pac-Man as well, specifically the ghost AI. It’s an interesting topic, and hopefully my explanation will be a bit more accessible than Jamey’s, due to focusing on only the information relevant to ghost behavior. About the Game “All the computer games available at the time were of the violent type - war games and space invader types. Pac-Man is one of the most iconic video games of all time, and most people (even non-gamers) have at least a passing familiarity with it.

The Ghost House Wrapping Up. Windows Phone 7 Application and Game Development by Rob Miles | Matthijs Hoekstra. 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. This article does not try to be the definitive work on the subject. Finally, this article is not program-specific. But we are getting ahead of ourselves. Introduction: The Search Area Let’s assume that we have someone who wants to get from point A to point B.

[Figure 1] The first thing you should notice is that we have divided our search area into a square grid. These center points are called “nodes”. Starting the Search Once we have simplified our search area into a manageable number of nodes, as we have done with the grid layout above, the next step is to conduct a search to find the shortest path. We begin the search by doing the following: where 1. Game/AI: Fixing Pathfinding Once and For All.

July 26, 2008 Fixing Pathfinding Once and For All I normally do everything I can to avoid saying things that could be interpreted as a criticism of other games or developers in the industry. But in this case, I had to make a bit of an exception. I need to talk about some problems we face with pathfinding. In order to prove that these problems still exist, I felt the need to make this video ... which will hopefully be taken in the humorous and lighthearted spirit in which it was intended All of these clips were recorded over the last week with the latest, most-recently-patched version of each game. As you can see, we're still a long way from having robust pathfinding across the board ... and it's even a problem in some million-unit-selling, AAA-quality titles. It's not necessarily a universal problem. But there are still too many games that do pathfinding the same way that games did in the 1990s.

(Note: The only reason you see lots of PC role-playing games here just comes down to convenience.