Basic Game Math Part 1 – Coordinate Spaces

In Game Programming you often have to deal with objects that move across screen from position to position in a world that either looks flat as a cartoon or has depth like the real world. As a game programmer that means you’ll have to come to terms with things like positions, dimensions, movement, speed, velocity, […]

image_pdfimage_print

Bitmapfill based tile scrolling

This post shows a more elaborate prototype of a bitmap fill based tile scrolling approach in ActionScript 3 using Tiled and the parser from Pixelpracht to parse the maps. The graphics are from the original Gods game on this page. Some features demoed: bitmapfill based fluid scrolling without a backing store (saves a lot of time) […]

image_pdfimage_print

Hexagon tile grids

A small demo of how you interact with a tilebased grid. Documented source code included and the math behind it is fairly basic. Basically it builds a grid from code, rotates for 5 seconds every 5 seconds and highlights the tile your mouse is over. I couldn’t find a good example online so here it […]

image_pdfimage_print

BSP Dungeon generation

Just a short post to demo a map generation mechanism. Full source included, but no absolutely no support. Feel free to play around with it. The dungeon generator is very crude, I put it together in a couple of hours yesterday, and it has no concept of walls, walkable tiles etc, just pointers to graphic […]

image_pdfimage_print

Part VII – Panorama hotspot interaction, light up on mouse over

With respect to the previous post (part VI), only a few minor changes were required to the demo we had so far. Basically making the hotspot light up is implemented by drawing on the plane’s material. That’s all there is to it. I’ve implemented this idea in the interactive material class. Lots of room for […]

image_pdfimage_print

Part VI – Panorama hotspot interaction

How you define your hotspots is up to you. For example you could write a tool which allows you to edit and generate a CubicPanorama. For a project for the dutch police academy I’m currently working on at TriMM, I am writing such an editor in Flex. Here is a screenshot of the work in […]

image_pdfimage_print

Part V – Mouse to Plane coordinates, second step to implementing panorama hotspots

In the previous post, we implemented a vector pointing at the cube plane under your mouse. In this post we will look at deriving the local x,y coordinate within that plane, and with it the local x,y coordinate of the pixel within the plane’s texture under your mouse. (Although for hotspots, any local coordinate system […]

image_pdfimage_print

Part IV – Plane detection, a first step to implementing panorama hotspots

In order to be able to detect hotspots under the mouse, the first thing we need to do is find some way to detect which plane the mouse is currently over and what the local x,y coordinates of the mousecursor are in the local space of that plane. Instead of providing all the theoretical background […]

image_pdfimage_print

Part III – Externalizing the panorama assets

There is an issue with distributing source code for your demo’s. Besides demonstrating what you want to demonstrate, you give people a look at how you program. But the focus is not how I program, it’s demonstrating the concepts of creating interactive panorama’s with hotspots that light up. This means I have to find some […]

image_pdfimage_print

Part II – Improved Panorama

In the previous panorama post I mentioned a number of issues that would have to be fixed. For this demo I used another image from http://www.flickr.com/photos/heiwa4126/, who has a set of amazing images, so it’s really worth to go there and take a look (the other images in the flickr equirectangular group are very good […]

image_pdfimage_print