In this release, I added graphing and support for syncing to a specific depot directory. On larger repositories the graph UI will probably hang for a few seconds during generation. Just be patient. I’m in the process of setting of the source code for release in Google Code.
E3 is next week, finally returning in its old form. The hype, previews, rumors, buzz, and predictions have been building all week. I’m really looking forward to seeing what comes out of it.
It would be interesting to see Apple enter the ring with a game console, as some have predicted. Would they announce it at E3 or at WWDC which is the following week? An Apple console would probably target the same market segment as the Wii, with the same simplicity and user experience that Apple products are known for. All in all? Unlikely.
Speaking of Apple, the iPhone App Store has reached a weird point in it’s evolution. Average prices are dropping fast, yet the consumer psychology behind spending 99 cents on an app is a lot different than the psychology behind spending the same amount of money or more on a drink or magazine.
Many developers have also complained that the iPhone App approval process could be better, saying it’s slow and rejection feedback is vague. This satire piece tells the story from the Apple side of things.
One final link in the Apple department, Carmack has been working on Doom for iPhone. I wish he’d stop veering off on side projects and give us Rage and id Tech 5 already!
From the engineering department, Intel talks about dealing with Technical Debt. As others have discussed, sometimes it is necessary to sacrifice quality in order to meet short term deadlines. But make sure your hacks don’t go unfixed for too long.
Every once in a while, I think it’s a good idea to remind yourself of what other developers consider best practices. You might not agree with all of them, but constantly working on methods of self improvement can never hurt.
The World of Goo guys released a game prototyping framework. Apparently it lacks documention, which would probably be very important to the type of people that want to use it. But I guess something is better than nothing. Maybe someone else will document it for them?
More and more small developers are funding development by selling early access to their game. I think this is a great idea since it also provides early feedback from the people who care most about your game. Give your users what they want! (And get free QA at the same time.)
You can now download and tryout Perforce Changelist Search for yourself. Be sure to check out the demo video if you haven’t already. Keep in mind that the initial sync may take a few minutes, depending on the size of your repository, so please be patient. I am happy to hear any feedback, questions, comments, feature requests, and bug reports, so please comment below or email me at eddie@eddiescholtz.com.
Several months ago, I found myself in a situation where I wanted to search Perforce changelist descriptions. After exploring the UI, talking to coworkers, and asking the internet, I came to the conclusion that it simply wasn’t possible using P4V or P4Win. There are ways to do this using the command line (run p4 changes and redirect the output to a text file, then use grep) or p4sql, but neither solution is simple and elegant. This turned out to be one of those little things that most people brush off but for some reason I couldn’t forget about it. After all, if you’re working with good, disciplined developers, the changelist description is usually the juiciest part of a commit. It should contain a brief description of the feature the developer added, the bug she fixed, or the content she changed. If you’re like me, software annoyances such as this one occasionally turn into pet programming projects. After a month or two, this is what I ended up with:
(I recommend watching the HD version and exanding it to fullscreen so you can actually see what’s going on. Turn up your volume for my voice-over.)
In short, the program allows you to sync all of the changes in a Perforce repository and search them locally. Just for fun, you can also view graphs of changes over time. I wrote it in Python, using wxPython for the user interface. Changes are stored in an sqlite database which makes searching fairly easy. The graphing is done using matplotlib and to bundle everything into a .exe I used py2exe. (Note: I wasn’t able to cleanly pack the required matplotlib modules into the executable. If you have experience with this and can offer advice, please share.) Finally, to interface with Perforce I’m using P4Python. Although developers seem to have their fair share of complaints about P4V and P4Win, Perforce certainly does a great job of providing API’s for several languages (C/C++, Perl, Python, Ruby). And from what I’ve heard, many companies use the API’s to integrate their tools with perforce or add a layer on top of Perforce with custom behavior. However, it doesn’t make sense for everyone to be writing the same custom tools (especially for things like version control). If Perforce were to add a good plugin architecture, that allowed you to insert features in the UI as first-class citizens, common tools could be written once and shared. This would especially help small and medium sized companies that might not have their own tools teams.
Update (5/8/09): Perforce Changelist Search 0.1 has been released.
During summer 2007, I worked on a small physics demo. Below is a video of it - be sure to turn on your speakers for the voice over explaining what is going on. A HD version can be found here.
The demo was developed using C++, opengl, and ODE. It was originally inspired by LittleBigPlanet, which itself started with a demo presented to Sony. (Their animations were a bit better…)
Pathfinding in games usually boils down to answering the question: “What is the shortest route from point A to point B?” In most games, however, this simple question is complicated by the addition of other constraints, such as the need to avoid moving objects or maintain formation. In this post, I describe a technique used to tackle the most basic question: “Does any path exist from point A to point B?”
An Example
Let’s consider the case of a two-dimensional real-time strategy game (RTS). Starcraft is an example of one such game. In a 2D RTS, the map is generally subdivided into square cells. These cells (also called tiles) are assigned different textures, so they look like grass, trees, sand, mountains, water, etc. For basic pathfinding, however, the only important cell property is whether it is walkable or non-walkable. Below is a simple map in which the white cells are walkable and the black cells are non-walkable. Consider the black cells to be walls. Let’s also assume that a character on the map can only move in four directions: up, down, left, and right.
One way to determine if it’s possible to move from one cell to another is to assign each connected region a unique color before the game begins. Then, the only necessary step is to compare the colors of A and B. If the colors match, a path exists. Otherwise, no path exists.
The Steps
To color the initial map, we perform a raster scan. In the example below, we start at the top left cell and move across the row. At the end of the row, we continue to the leftmost cell of the row below it. Whenever an uncolored, walkable cell is reached, we perform the flood fill operation using a unique color.
In most games, walls can either be built or destroyed. When a wall is built, a connected region may be split into two or more regions. In order to recolor the map it is necessary to examine each of the four neighbors and flood fill them with a new, unique color. When a wall is destroyed, it is possible that two or more distinct regions become connected. In this case, we use a single color to flood fill the previously distinct regions.
It is important to note that common pathfinding algorithms such as A* approach their worst case run time when a path does not exist. Using this technique will prevent the worst case scenario, at the cost of using additional memory. The technique can also be used to implement features such as: highlighting the region that a selected unit is in or changing the mouse cursor to an X when it is over a cell the selected unit cannot find a path to.
The same methods can be used on any type of graph, not just a grid based one. If you are using walk meshes or waypoints, the same techniques can still be applied.
Demo - Uses processing.js and will only run on some modern browsers. I believe these include Firefox 3, Webkit Nightly, and Opera 9.5.