Matrix based game: path finding

Hi,
I'm writing a simple PacMan clone, in which the monsters form some kind of neural network. When a monster spots PacMan, it sends PacMan's coordinates to the other monsters, which then move to that location. When there is no target set, the monsters alway return to their home base, where the current location of PacMan is alway available.
Anyway, I want to let the monsters move the shortest path from their current location to the target location. Suppose I have the following simple map (matrix bases):
1,1,1,1,1,1,1,1,1,1
1,0,0,0,0,0,0,0,0,1
1,0,1,1,1,0,1,1,B,1
1,0,1,0,0,0,0,1,*,1
1,0,1,1,1,1,*,*,*,1
1,*,*,*,1,0,*,1,0,1
1,A,1,*,*,*,*,1,0,1
1,0,1,1,0,1,1,1,0,1
1,0,0,0,0,0,0,0,0,1
1,1,1,1,1,1,1,1,1,1
The path (drawn by *) is the shortest path from A to B. Which algorithm should be used to solve this problem? How should it be implemented?
Thanks,
Jeroen

Treat your matrix as a graph and use a shortest path
algorithm such as dijkstra's algorithm.I looked it up, and i really liked that algorithm.
good thing you came along, because I needed to do a little pathfinding of my one for a game.
and jeroen, I hope you remember all those lessons from programming 2C.
they could come in handy now. ;)
robert.

Similar Messages

  • Path finding based on an image

    I know its possible to create a path finding algorithm based on an image... That is, if the color map is blue then there is water, if it is brown then there is land. So detection of land and water is not the problem.
    What I want to know is, is there an easy way to set up a path finder aside having a for loop try all the possibilities? The loop should follow logical paths rather than iterate through each turn...

    I'd try an image processing forum. This forum is typically for Java-specific issues and there might not be that many people who've done this here. Sorry I couldn't help. Have you read some image processing books?

  • Solution: A-Star Path Finding Algorithm (games)

    Hello everyone. I have developed several A-Star implementations for games, if you come across anyone with questions relating to path finding, please direct them to [email protected]

    I'll also be directing several rich Nigerians who need your help, too, if that is OK.

  • Path Finder in a 2D Grid Map With Different Terrain Types

         I have been thinking for a while on path finding game algoritms and I can up with one idea witch I want to publish. The goal of my project is when I have a 2 dimensional grid map where squares can have different movement cost, like in Civilization II, to find the shortest way from one point in the map to another. I've used the Breathed First Search Engine. If you are not familiar to this search engine it is better to read about it first because I am not fcusing on it and I assume that you now how it works. You can read about it at the book "Practical Artificial Intelligence Programming in Java" writen by Mark Watson, witch is freely distributed at www.markwatson.com.
         Actually the idea of this 2D grid path finder is to use a third dimension witch have a size equal to the highest movement cost among all terrain types. This helps solving the problem with the different movement cost of the squates. By adding this abstract third dimension it is posible to use the Breadth First Search Engine.
         I this example the movementcost of a terrain type is always the same, no matter from witch square to with are you going (like in Civilization II but I haven't included roads or railroads). For example if you want to go from one square A to another square B with movement cost X (A and B are attached) you must go "up stairs" in the third dimension X - 1 times and then move to square B. But when you step on square B you are again at the lowest floor. So if you want to come back to the previous square A and it have movement cost Y first you must go floor Y and then jump in square A. And now you are again at the lowest floor at square A. When you move from one square to another you go always at the lowest floor. This is the way I handle with different movement costs.
         When you find the path to the goal point it is in 3 dimensions. So you must just project it in the 2D map and that's all you have the shortest path.
         I am sure this is not the best way to code this search engine but this is just the first scratch with no optimisation and so on. If I make a 100x100 randomly generated map it takes on my configuration(400Mhz Pentium II CPU with ASUS P2B MotherBoard on 100 MHz and 256 MB SD RAM on 133 MHz but because of my MB on 100MHz) around 1000 miliseconds (1000 miliseconds = 1 second) to find the shortest path from (1, 1) to (100, 100) witch is pretty good compare to the goTo function in Civilization II witch does not finds the shortest path at all and have made hundrets of gamers angry. This is amazing that nowadays there are so many games with bad path finding.
         This project includes:
    1. The PathFinder class witch does the jub.
    2. The Map class witch has a generator for a random map in it.
    3. The class TerrainType, every square on the map is based on this class.
    4. The class TerrainTypes witch is the set of all terrain types used in the map.
    5. The class PathFinderTest witch just test the path finder.
    To test this project put all files in one directory and run PathFinderTest.java.
    Map.java:
    import java.util.Vector;
    import java.util.Random;
    //This class just creates a random map and keeps it. I will not comment on this.
    class Map {
      //here is kept the information about the terrain types placed in the map. Where
      //every terrain type has a specific movement cost.
      private int[][] terrain;
      public TerrainTypes terrainTypes;
      private int landMass;
      private int width;
      private int height;
      private int highestMovementCost;
      public Map(int aWidth, int aHeight) {
        width = aWidth;
        height = aHeight;
        terrainTypes = new TerrainTypes();
        highestMovementCost = terrainTypes.getHighestMovementCost();
        terrain = new int[width][height];
        landMass = 0;
        generateRandomMap();
      public void clearGoalAndStartLocFromWater(int sx, int sy, int gx, int gy) {
        terrain[gx][gy] = 0;
        terrain[sx][sy] = 0;
      private void expandWater() {
        int waterConstant = 40;
        int waterExpansion = 2;
        int[][] moreWater = new int[width][height];
        Random randomizer = new Random();
        for (int t = 0; waterExpansion > t; t++) {
          for (int i = 0; i < width; i++) {
            for (int j = 0; j < height; j++) {
              if (i + 1 >= 0 && j >= 0 && i + 1 < width && j < height) {
                if (terrain[i + 1][j] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i + 1][j] = 1;
              if (i + 1 >= 0 && j - 1 >= 0 && i + 1 < width && j - 1 < height) {
                if (terrain[i + 1][j - 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i + 1][j - 1] = 1;
              if (i >= 0 && j - 1 >= 0 && i < width && j - 1 < height) {
                if (terrain[i][j - 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i][j - 1] = 1;
              if (i - 1 >= 0 && j - 1 >= 0 && i - 1 < width && j - 1 < height) {
                if (terrain[i - 1][j - 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i - 1][j - 1] = 1;
              if (i - 1 >= 0 && j >= 0 && i - 1 < width && j < height) {
                if (terrain[i - 1][j] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i - 1][j] = 1;
              if (i - 1 >= 0 && j + 1 >= 0 && i - 1 < width && j + 1 < height) {
                if (terrain[i - 1][j + 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i - 1][j + 1] = 1;
              if (i >= 0 && j + 1 >= 0 && i < width && j + 1 < height) {
                if (terrain[i][j + 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i][j + 1] = 1;
              if (i + 1 >= 0 && j + 1 >= 0 && i + 1 < width && j + 1 < height) {
                if (terrain[i + 1][j + 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i + 1][j + 1] = 1;
        for (int i = 0; i < width; i++) {
          for (int j = 0; j < height; j++) {
            if (moreWater[i][j] == 1) {
              terrain[i][j] = 4;
      private void generateRandomMap() {
        Random randomizer = new Random();
        for (int i = 0; i < width; i++) {
          for (int j = 0; j < height; j++) {
            if (randomizer.nextInt(3) == 1)
              terrain[i][j] = 0;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 1;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 3;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 2;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 2;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 1;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 3;
            else
              terrain[i][j] = randomizer.nextInt(5);
        expandWater();
        for (int i = 0; i < width; i++) {
          for (int j = 0; j < height; j++) {
            if (terrain[i][j] != 0)
              landMass++;
      public int getMapHeight() {
        return height;
      public int getMapWidth() {
        return width;
      public int getSquareID(int x, int y) {
        return terrain[x][y];
      public int getSquareMovementCost(int x, int y) {
        return terrainTypes.getMovementCost(terrain[x][y]);
    }PathFinder.java:
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.util.Vector;
    public class PathFinder {
      private BufferedReader consoleReader = new BufferedReader(new InputStreamReader(System.in));
      //The array t3D[][] represents the 2D square map where t3D.leght = map width
      //and t3D[x].lenght = map width (-1 < x < t3D.leght). The third dimension
      //is refered to the square's movement cost, witch is definite by terrain.
      //The fourth dimension will be with lenght = 3. When running the search engine
      //(expanding the explored squares) this 3 values will keep the position of
      //the previous square in 3 dimension, witch are width, height and the maximum
      //movement cost among all squares.
      private int[][][][] squares3DReference;
      //Keeps information witch squares are visited.
      private boolean[][][] visitedSquares;
      private Map map;
      //this is the queue used in the Breathed First Seatch.
      private Vector queue3D;
      //Here is saved the shortest path
      private Vector path2D;
      private int highestMovementCost;
      public PathFinder(Map aMap) {
        map = aMap;
        queue3D = new Vector();
        path2D = new Vector();
        squares3DReference = new int[map.getMapWidth()][map.getMapHeight()][][];
        visitedSquares = new boolean[map.getMapWidth()][map.getMapHeight()][];
        highestMovementCost = map.terrainTypes.getHighestMovementCost();
        buildAbstract3DTerrain();
      private void buildAbstract3DTerrain() {
        for (int x = 0; x < map.getMapWidth(); x++) {
          for (int y = 0; y <map.getMapHeight(); y++) {
            int movementCost = map.terrainTypes.getMovementCost(map.getSquareID(x, y));
            if ( movementCost > 0) {
              visitedSquares[x][y] = new boolean[highestMovementCost];
              squares3DReference[x][y] = new int[highestMovementCost][3];
              for (int z = 0; z < highestMovementCost; z++) {
                for (int t = 0; t < 3; t++) {
                  squares3DReference[x][y][z][t] = -1;
      private boolean isMoveValid(int x, int y, int z, int x2, int y2, int z2) {
        if ( x < 0 || y < 0 || z < 0 || x2 < 0 || y2 < 0 || z2 < 0 || x >= map.getMapWidth() || y >= map.getMapHeight() || z >= highestMovementCost ||  x2 >= map.getMapWidth() || y2 >= map.getMapHeight() || z2 >= highestMovementCost)
          return false;
        if (map.terrainTypes.getMovementCost(map.getSquareID(x2, y2)) < 1)
          return false;
        if (visitedSquares[x2][y2][z2])
          return false;
        if (x == x2 && y == y2)
          return true;
        else {
          if (z == map.terrainTypes.getMovementCost(map.getSquareID(x2, y2)) - 1)
            return true;
          else
            return false;
      private void clearPreviousSearchData() {
        queue3D.clear();
        path2D.clear();
        for (int x = 0; x < map.getMapWidth(); x++) {
          for (int y = 0; y < map.getMapHeight(); y++) {
            if (squares3DReference[x][y] != null) {
              for (int z = 0; z < highestMovementCost; z++) {
                visitedSquares[x][y][z] = false;
                for (int t = 0; t < 3; t++) {
                  squares3DReference[x][y][z][t] = -1;
      private Vector copyPath2D() {
        Vector path = new Vector();
        for (int i = 0; i < path2D.size(); i++) {
          path.add(path2D.get(i));
        return path;
      public Vector findPath(int sX, int sY, int gX, int gY) {
        int head = 0;
        int tail = 0;
        int x = sX;
        int y = sY;
        int z = 0;
        visitedSquares[x][y][z] = true;
        mainLoop: {
          while (tail <= head) {
            int[][] moves = getPosibleMoves(x, y, z);
            for (int i = 0; i < 9; i++) {
              if (moves[i] != null) {
                squares3DReference[moves[0]][moves[i][1]][moves[i][2]][0] = x;
    squares3DReference[moves[i][0]][moves[i][1]][moves[i][2]][1] = y;
    squares3DReference[moves[i][0]][moves[i][1]][moves[i][2]][2] = z;
    queue3D.add(moves[i]);
    if (moves[i][0] == gX && moves[i][1] == gY) {
    break mainLoop;
    visitedSquares[moves[i][0]][moves[i][1]][moves[i][2]] = true;
    head++;
    if (queue3D.size() == 0 || queue3D.size() == tail)
    break mainLoop;
    int[] nextInQueue = ((int[]) queue3D.get(tail));
    x = nextInQueue[0];
    y = nextInQueue[1];
    z = nextInQueue[2];
    tail++;
    if (squares3DReference[gX][gY][0][0] == -1) {
    clearPreviousSearchData();
    return path2D;
    fillpath2D(sX, sY, gX, gY);
    Vector path = copyPath2D();
    clearPreviousSearchData();
    return path;
    private int[][] getPosibleMoves(int x, int y, int z) {
    int[][] moves = new int[9][3];
    if (isMoveValid(x, y, z, x + 1, y, 0)) {
    moves[0][0] = x + 1;
    moves[0][1] = y;
    moves[0][2] = 0;
    else
    moves[0] = null;
    if (isMoveValid(x, y, z, x + 1, y - 1, 0)) {
    moves[1][0] = x + 1;
    moves[1][1] = y - 1;
    moves[1][2] = 0;
    else
    moves[1] = null;
    if (isMoveValid(x, y, z, x, y - 1, 0)) {
    moves[2][0] = x;
    moves[2][1] = y - 1;
    moves[2][2] = 0;
    else
    moves[2] = null;
    if (isMoveValid(x, y, z, x - 1, y - 1, 0)) {
    moves[3][0] = x - 1;
    moves[3][1] = y - 1;
    moves[3][2] = 0;
    else
    moves[3] = null;
    if (isMoveValid(x, y, z, x - 1, y, 0)) {
    moves[4][0] = x - 1;
    moves[4][1] = y;
    moves[4][2] = 0;
    else
    moves[4] = null;
    if (isMoveValid(x, y, z, x - 1, y + 1, 0)) {
    moves[5][0] = x - 1;
    moves[5][1] = y + 1;
    moves[5][2] = 0;
    else
    moves[5] = null;
    if (isMoveValid(x, y, z, x, y + 1, 0)) {
    moves[6][0] = x;
    moves[6][1] = y + 1;
    moves[6][2] = 0;
    else
    moves[6] = null;
    if (isMoveValid(x, y, z, x + 1, y + 1, 0)) {
    moves[7][0] = x + 1;
    moves[7][1] = y + 1;
    moves[7][2] = 0;
    else
    moves[7] = null;
    if (isMoveValid(x, y, z, x, y, z + 1)) {
    moves[8][0] = x;
    moves[8][1] = y;
    moves[8][2] = z + 1;
    else
    moves[8] = null;
    return moves;
    private void fillpath2D(int sX, int sY, int gX, int gY) {
    int[] gLoc = {gX, gY};
    path2D.add(gLoc);
    int x = gX;
    int y = gY;
    int z = 0;
    while (x != sX || y != sY) {
    int x2 = squares3DReference[x][y][z][0];
    int y2 = squares3DReference[x][y][z][1];
    int z2 = squares3DReference[x][y][z][2];
    x = x2;
    y = y2;
    z = z2;
    if (z == 0) {
    int[] loc = {x, y};
    path2D.insertElementAt(loc, 0);
    PathFinderTest.java
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.util.Vector;
    public class PathFinderTest {
      static BufferedReader consoleReader = new BufferedReader(new InputStreamReader(System.in));
      static Map map;
      static int startX;
      static int startY;
      static int goalX;
      static int goalY;
      public static void main(String[] args) throws Exception {
        System.out.print("Enter map size.\nx = ");
        int width = Integer.parseInt(consoleReader.readLine());
        System.out.print("y = ");
        int height = Integer.parseInt(consoleReader.readLine());
        System.out.print("Enter strting location.\nx = ");
        startX = Integer.parseInt(consoleReader.readLine()) - 1;
        System.out.print("y = ");
        startY = Integer.parseInt(consoleReader.readLine()) - 1;
        System.out.print("Enter goal location.\nx = ");
        goalX = Integer.parseInt(consoleReader.readLine()) - 1;
        System.out.print("y = ");
        goalY = Integer.parseInt(consoleReader.readLine()) - 1;
        if (goalX < 0 || goalY < 0 || startX < 0 || startY < 0 || goalX >= width || goalY >= height || startX >= width || startY >= height) {
          System.out.println("Invalid parameters found. Program will exit");
          System.exit(0);
        map = new Map(width, height);
        map.clearGoalAndStartLocFromWater(startX, startY, goalX, goalY);
        printSolution(new Vector());
        PathFinder pathFinder = new PathFinder(map);
        long before = System.currentTimeMillis();
        Vector path = pathFinder.findPath(startX, startY, goalX, goalY);
        long after = System.currentTimeMillis();
        long time = after - before;
        printSolution(path);
        if (path.size() == 0)
          System.out.println("No path found.");
        else
          System.out.println("Path found.");
        System.out.println("Finding the path took " + time + " milliseconds");
      static void printSolution(Vector path) {
        boolean[][] pathOnMap = new boolean[map.getMapWidth()][map.getMapHeight()];
        for (int i = 0; path.size() > i; i++) {
          int[] move = (int[]) path.get(i);
          pathOnMap[move[0]][move[1]] = true;
        for (int y = 0; y < map.getMapHeight(); y++) {
          for (int x = 0; x < map.getMapWidth(); x++) {
            System.out.print(" ");
            if (pathOnMap[x][y] == false)
              System.out.print(" ");
            else
              System.out.print("0");
            if (x == startX && y == startY)
              System.out.print("S");
            else if (x == goalX && y == goalY)
              System.out.print("G");
            else
              System.out.print(map.terrainTypes.getNameFirstLetter(map.getSquareID(x, y)));
          System.out.println();
        System.out.println();
    }TerrainType.java:
    public class TerrainType {
      private int movementCost;
      private String name;
      TerrainType(int aMovementCost, String aName) {
        movementCost = aMovementCost;
        name = aName;
      public int getMovementCost() {
        return movementCost;
      public String getName() {
        return name;
      public String getNameFirstLetter() {
        return name.substring(0, 1).toUpperCase();
    }TerrainTypes.java:
    import java.util.Vector;
    public class TerrainTypes {
      //Here are saved the terrain types with the map has. ElementAt 'i' in
      //setOfTypes is represented by the number in Map.terrain[x][y] witch is
      //equal to i, were x, y are random integer as soon as they do not
      //throw ArrayIndexOutOfBoundsException. Actually this is a coding to know
      //a specific square in the map to witch terrain type is refered in setOfTypes.
      private Vector setOfTypes;
      public TerrainTypes() {
        setOfTypes = new Vector();
        setOfTypes.add(new TerrainType(1, "Plains"));
        setOfTypes.add(new TerrainType(2, "Forst"));
        setOfTypes.add(new TerrainType(3, "Jungle"));
        setOfTypes.add(new TerrainType(4, "Mountain"));
        setOfTypes.add(new TerrainType(-1, "X"));
      public int getMovementCost(int i) {
        return ((TerrainType) setOfTypes.get(i)).getMovementCost();
      public String getName(int i) {
        return ((TerrainType) setOfTypes.get(i)).getName();
      public String getNameFirstLetter(int i) {
        return ((TerrainType) setOfTypes.get(i)).getNameFirstLetter();
      public int getHighestMovementCost() {
        int max = 1;
        for (int i = 0; setOfTypes.size() > i; i++) {
          int movementCost = ((TerrainType) setOfTypes.get(i)).getMovementCost();
          if ( movementCost > 0) {
            if (max < movementCost)
              max = movementCost;
        return max;
    }I hope this program will be helpful.
    Sogartar

    Why is such a smart guy like you not using A*
    It is a general known algorithm which will find the
    optimal solution in a finite search-space (within a minimal time).
    The calculation time for the A* algorithm is influenced by two parameters:
    1 - cumulative cost
    2 - minimal expected additional cost
    The calculation of these two costs has a great influence on the
    solution.
    I think the actual problems most games experience with shortest path calculatoin are
    1 - very little time to spent calculating the shortest path
    The quickest solution might be the best for the game
    If your solution takes 1 second for the calculation of a path for one element on the board (100x100)
    What would it take for the game to calculate the path for all elements controlled by the computer ??
    If the computer controls two players which each have 50 elements to control, it would take forever...
    Don't even consider the usage of a larger board (200x200 would take 4 seconds/element when
    algorithm has complexity O(n))
    2 - low priority.
    Users tend to forgive a bad shortest path-algorithm most of the time,
    but not a bad display, bad pictures,...
    This is why most shortest-path algorithms within games were
    developed as a depth first search,
    within some earlier games this was even developed as
    a rule which went straight to the endlocation and
    takes a right/left turn when blocked by water/wall/...
    So the actual steps you should take are:
    1 - develop a normal breath-first search (to get going)
    2 - develop a normal depth-first search (to compare speed and solution with)
    3 - develop a normal dijkstra algorithm (sometimes called A)
    4 - develop a best first algorithm (called A*)
    5 - develop other AI-algorithms building upon A* (tabu-search, limited memory A*,...)
    6 - develop some other AI-algorithms (Genetic Algorithms, Simulated Annealing,...)
    7 - compare and tweak/change all search-algorithms for
    7 - a - size of maps (small versus huge)
    7 - b - optimality of the solution
    7 - c - actual usage for your game
    8 - !!! very important !!!
    Share the developed path algorithms along with remarks about speed, map-size,...
    with the rest of us. I would be very interested in such library.
    kind regards,

  • Floyds Algorithm for path finding

    I'm currently trying to figure out which path finding algorithm to use in my game. It seems most people prefer A* and I don't quite get it.
    I must be missing something because as I see it Floyds Algorithm is superior in many respects.
    1) You are guaranteed to get an optimal rout.
    2) It's all precomputed, so you just have to look up the rout in a matrix.
    What am I missing ?
    Kim

    A* is guaranteed to find the shortest path, as long as the function you use for the heuristic is an underestimate of the actual distance. For example, say you have a square grid where some tiles are blocked by obstacles while others aren't; then you can use the Euclidean distance (sqrt(deltaX^2 + deltaY^2)) between two tiles as your heuristic, since real paths will be as long as that, and A* will find the shortest path. Even if you use an overestimate for a heuristic, A* will find some path if a path exists; it will find it faster in fact, but it won't necessarily be the best path. Often people use overestimates on purpose in practice because this saves a lot of time and still finds pretty good paths.
    Floyd's algorithm has a worse running-time than A* because A* can get "hints" of which direction to go towards while Floyd's essentially checks all possibilities. It's true that you can use it to obtain the all-pairs shortest-paths matrix however, in which case it is certainly faster than using A* on every pair of points to find the path between them (since the heuristic only gives distance to one goal). The problem is that in most games the world changes at run-time however - for example someone builds a building or chops down a tree, or someone blocks a door, or there are people in the AI object's way. Also, sometimes you try to find the path that is not shortest but also "safest" in some way - increase costs of tiles where you've seen a lot of enemy activity for example in order to avoid them, and this information changes at runtime. Recalculating the all-pairs shortest-paths matrix gets expensive then, especially in the case of moving obstacles like human players. If you have a game where the obstacles are fixed however and the map size isn't so big that an N^3 algorithm (Floyd) wouldn't do it, then do precalculate the paths.

  • Help on path finding

    Hello everyone!
    Help me please!
    Have you ever played games like Baldur's gate or Diablo or classic adventure games (like Monkey island)?
    What I'm saying is:
    I'm trying to implement a way to move my character, on a 2D space, to the point I clicked on.
    If there is no obstacle between the start and the finish points, I can make it work pretty easily (I just let the charachter walk the straight line connecting the points).
    The problem is when I introduce obstacles.
    I'm trying to implement the A* algorithm for the path finding process.
    Since the character and the obstacles lay on a 2D plane not divided into tiles or any sort of sub-division, it is quite hard to calculate a path.
    What I thought of doing is:
    when I click on a destination point, I create a 2D grid surrounding the character, at its actual position, and the destination point.
    The intersections between the horizontal and the vertical lines of this grid, will be the possible nodes of the path to the destination. (I hope it's clear).
    The A* will calculate the best path among these nodes, considering whether a node is reachable (i.e. not overlapping an obstacle) or not.
    I still haven't implemented it, so it's just an idea, and I don't even know if it works!
    Is it possible there is no other way of doing that?
    How do the games I mentioned above work?
    My problem is finding a way to determine the possible nodes (2D points on the 2D plane) for the A* algorithm to work on.
    Please help, I'm stuck.
    Any suggestion?
    Thank you!
    P.S: If you need me to make it more clear, I'll give it a try!

    So far as I've tested it they haven't gotten stuck.
    The best way I can think of to do it is with the Line2D.Double class.
    - I draw a line between me and the enemy
    - create two lines that are equal to that first line
    - rotate the first line, from the enemy, to the left
    - rotate the first line, from the enemy, to the right
    - if both still intersect the obstacle, I rotate the two again
    - if one of them no longer intersects the obstacle, that new line becomes my path
    Once the clear path is found, I can use the endpoint of that line as the destination, rather than saying that MY coordinates are the destination. It takes a lot of math figuring so it gets messy written out, but in words it's very clean :)
    For simplicity you could try:
    - if he hits an obstacle do the following:
    - draw a line between the entity and the center of the obstacle
    - if you're on the left side of that line, make him turn left 90 degrees
    - if you're on the right side, turn right 90 degrees
    Based on how you're creating your obstacles you could think further how you want to do it, like tell them to move in that direction a set distance, that sort of thing.
    Or you could give them set paths to follow, that's another solution, and just have them be able to aim at you freely to fire, provided that's how they attack.

  • Every time I launch a Source-based game, it crashes on startup. This happens with both "Team fortress 2" and "Tactical intervention". This began to happen recently (they used to work fine), but unfortunately I can't remember what I did in the meantime...

    Every time I launch a Source - based game, it crashes on startup. This happens with both "Team fortress 2" and "Tactical intervention". This began to happen recently (they used to work fine), but as I recall I've just installed Crossover... can anyone help me?
    The bug report from "Tactical intervention" follows:
    Process:         tacint_osx [3304]
    Path:            /Users/USER/Library/Application Support/Steam/*/tacint_osx
    Identifier:      tacint_osx
    Version:         ???
    Code Type:       X86 (Native)
    Parent Process:  bash [3301]
    User ID:         501
    Date/Time:       2013-08-30 13:44:00.342 +0200
    OS Version:      Mac OS X 10.8.4 (12E55)
    Report Version:  10
    Interval Since Last Report:          120536 sec
    Crashes Since Last Report:           2
    Per-App Crashes Since Last Report:   2
    Anonymous UUID:                      A8FD5912-2699-8EB1-69E9-9CE46F77DF51
    Crashed Thread:  0  MainThrd  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
    VM Regions Near 0:
    --> __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- SM=NUL  /Users/USER/Library/Application Support/Steam/*
        __TEXT                 0000000000001000-0000000000002000 [    4K] r-x/rwx SM=COW  /Users/USER/Library/Application Support/Steam/*
    Thread 0 Crashed:: MainThrd  Dispatch queue: com.apple.main-thread
    0   engine.dylib                            0x09a3ee7f Sys_Error_Internal(bool, char const*, char*) + 383
    1   engine.dylib                            0x09a3eee3 Sys_Error(char const*, ...) + 35
    2   engine.dylib                            0x09e56a3d CEngineConsoleLoggingListener::Log(LoggingContext_t const*, char const*) + 749
    3   libtier0.dylib                          0x0003928b CLoggingSystem::LogDirect(int, LoggingSeverity_t, Color, char const*) + 235
    4   libtier0.dylib                          0x00038dfc Error + 236
    5   client.dylib                            0x1923f9d6 BaseModUI::TIMainMenuContainer::Resp_Login(fixapi2::eFixLoginResult, int, int) + 118
    6   launcher.dylib                          0x005413d9 fixapi2_impl::CFixClientAPI::CommonPacket_Login(fixapi2_impl::CFixClientSocket* , fixapi2_impl::CFixClientPacket*) + 521
    7   launcher.dylib                          0x00536a57 fixapi2_impl::CFixClientAPI::Do_ReadPacket(fixapi2::IFixPacket*) + 423
    8   launcher.dylib                          0x00539e31 fixapi2_impl::CFixClientAPI::Do_MainFrame() + 833
    9   client.dylib                            0x18d3819c IGameSystem::UpdateAllSystems(float) + 108
    10  client.dylib                            0x18e99bb2 CHLClient::HudUpdate(bool) + 130
    11  engine.dylib                            0x09bd98e6 ClientDLL_Update() + 54
    12  engine.dylib                            0x09d29e92 _Host_RunFrame(float) + 2722
    13  engine.dylib                            0x09d45819 CHostState::State_Run(float) + 281
    14  engine.dylib                            0x09d46400 CHostState::FrameUpdate(float) + 592
    15  engine.dylib                            0x09d464c5 HostState_Frame(float) + 37
    16  engine.dylib                            0x09e5c246 CEngine::Frame() + 710
    17  engine.dylib                            0x09e59556 CEngineAPI::MainLoop() + 214
    18  engine.dylib                            0x09e5973a CModAppSystemGroup::Main() + 234
    19  engine.dylib                            0x09ebf7b8 CAppSystemGroup::Run() + 88
    20  engine.dylib                            0x09e59ecd CEngineAPI::RunListenServer() + 125
    21  launcher.dylib                          0x005199c8 CAppSystemGroup::Run() + 88
    22  launcher.dylib                          0x005199c8 CAppSystemGroup::Run() + 88
    23  launcher.dylib                          0x00521a92 MainFunctionThread(void*) + 82
    24  launcher.dylib                          0x005220bc ValveCocoaMain + 140
    25  launcher.dylib                          0x0050f441 LauncherMain + 897
    26  tacint_osx                              0x00001d26 start + 54
    Thread 1:: Dispatch queue: com.apple.libdispatch-manager
    0   libsystem_kernel.dylib                  0x930a39ae kevent + 10
    1   libdispatch.dylib                       0x96f13c71 _dispatch_mgr_invoke + 993
    2   libdispatch.dylib                       0x96f137a9 _dispatch_mgr_thread + 53
    Thread 2:
    0   libsystem_kernel.dylib                  0x930a30ee __workq_kernreturn + 10
    1   libsystem_c.dylib                       0x972660ac _pthread_workq_return + 45
    2   libsystem_c.dylib                       0x97265e79 _pthread_wqthread + 448
    3   libsystem_c.dylib                       0x9724dd2a start_wqthread + 30
    Thread 3:
    0   libsystem_kernel.dylib                  0x930a30ee __workq_kernreturn + 10
    1   libsystem_c.dylib                       0x972660ac _pthread_workq_return + 45
    2   libsystem_c.dylib                       0x97265e79 _pthread_wqthread + 448
    3   libsystem_c.dylib                       0x9724dd2a start_wqthread + 30
    Thread 4:: IOPollingHelperThread
    0   libsystem_kernel.dylib                  0x930a39ae kevent + 10
    1   steamclient.dylib                       0x060889c5 OSXHelpers::CIOPollingHelper::RealRun() + 249
    2   libtier0_s.dylib                        0x00704f3d CatchAndWriteContext_t::Invoke() + 159
    3   libtier0_s.dylib                        0x00704ac8 CatchAndWriteMiniDumpExForVoidPtrFn + 86
    4   libtier0_s.dylib                        0x00704af2 CatchAndWriteMiniDumpForVoidPtrFn + 37
    5   steamclient.dylib                       0x060888bb OSXHelpers::CIOPollingHelper::Run() + 41
    6   libtier0_s.dylib                        0x00709314 SteamThreadTools::CThread::ThreadExceptionWrapper(void*) + 16
    7   libtier0_s.dylib                        0x00704f3d CatchAndWriteContext_t::Invoke() + 159
    8   libtier0_s.dylib                        0x00704ac8 CatchAndWriteMiniDumpExForVoidPtrFn + 86
    9   libtier0_s.dylib                        0x00704af2 CatchAndWriteMiniDumpForVoidPtrFn + 37
    10  libtier0_s.dylib                        0x0070928c SteamThreadTools::CThread::ThreadProc(void*) + 196
    11  libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    12  libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 5:
    0   libsystem_kernel.dylib                  0x930a30ee __workq_kernreturn + 10
    1   libsystem_c.dylib                       0x972660ac _pthread_workq_return + 45
    2   libsystem_c.dylib                       0x97265e79 _pthread_wqthread + 448
    3   libsystem_c.dylib                       0x9724dd2a start_wqthread + 30
    Thread 6:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 7:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 8:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 9:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 10:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 11:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 12:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 13:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 14:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 15:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 16:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   libvstdlib.dylib                        0x00092857 CJobThread::Run() + 295
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 17:: AQClient
    0   libsystem_kernel.dylib                  0x930a07d2 mach_msg_trap + 10
    1   libsystem_kernel.dylib                  0x9309fcb0 mach_msg + 68
    2   com.apple.CoreFoundation                0x9472af79 __CFRunLoopServiceMachPort + 185
    3   com.apple.CoreFoundation                0x9473095f __CFRunLoopRun + 1247
    4   com.apple.CoreFoundation                0x9473001a CFRunLoopRunSpecific + 378
    5   com.apple.CoreFoundation                0x9472fe8b CFRunLoopRunInMode + 123
    6   com.apple.audio.toolbox.AudioToolbox          0x90096a81 GenericRunLoopThread::Entry(void*) + 209
    7   com.apple.audio.toolbox.AudioToolbox          0x900969ac CAPThread::Entry(CAPThread*) + 196
    8   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    9   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 18:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee0e0 pthread_cond_timedwait$UNIX2003 + 70
    3   libtier0.dylib                          0x00049733 CThreadSyncObject::Wait(unsigned int) + 307
    4   libtier0.dylib                          0x000497c8 CThreadEvent::Wait(unsigned int) + 24
    5   engine.dylib                            0x09db1029 CQueuedPacketSender::Run() + 121
    6   libtier0.dylib                          0x0004acc4 CThread::ThreadProc(void*) + 212
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 19:
    0   libsystem_kernel.dylib                  0x930a28e2 __psynch_cvwait + 10
    1   libsystem_c.dylib                       0x97268280 _pthread_cond_wait + 833
    2   libsystem_c.dylib                       0x972ee095 pthread_cond_wait$UNIX2003 + 71
    3   com.apple.audio.toolbox.AudioToolbox          0x900a69c1 CAGuard::Wait() + 113
    4   com.apple.audio.toolbox.AudioToolbox          0x900a5619 AQConverterManager::AQConverterThread::Run() + 271
    5   com.apple.audio.toolbox.AudioToolbox          0x900a54a2 AQConverterManager::AQConverterThread::ConverterThreadEntry(void*) + 22
    6   com.apple.audio.toolbox.AudioToolbox          0x900969ac CAPThread::Entry(CAPThread*) + 196
    7   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    8   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 20:: com.apple.audio.IOThread.client
    0   libsystem_kernel.dylib                  0x930a07d2 mach_msg_trap + 10
    1   libsystem_kernel.dylib                  0x9309fcb0 mach_msg + 68
    2   com.apple.audio.CoreAudio               0x96c6eeba HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 138
    3   com.apple.audio.CoreAudio               0x96c6952e HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 70
    4   com.apple.audio.CoreAudio               0x96c67bcd HALC_ProxyIOContext::IOWorkLoop() + 1287
    5   com.apple.audio.CoreAudio               0x96c67617 HALC_ProxyIOContext::IOThreadEntry(void*) + 145
    6   com.apple.audio.CoreAudio               0x96c71b61 ___ZN19HALC_ProxyIOContextC2Emj_block_invoke_0 + 20
    7   com.apple.audio.CoreAudio               0x96c6753d HALB_IOThread::Entry(void*) + 71
    8   libsystem_c.dylib                       0x972635b7 _pthread_start + 344
    9   libsystem_c.dylib                       0x9724dd4e thread_start + 34
    Thread 21:
    0   libsystem_kernel.dylib                  0x930a30ee __workq_kernreturn + 10
    1   libsystem_c.dylib                       0x972660ac _pthread_workq_return + 45
    2   libsystem_c.dylib                       0x97265e79 _pthread_wqthread + 448
    3   libsystem_c.dylib                       0x9724dd2a start_wqthread + 30
    Thread 0 crashed with X86 Thread State (32-bit):
      eax: 0xdeadbeef  ebx: 0x09a3ed17  ecx: 0xbfffdb84  edx: 0x00002500
      edi: 0xaca3b174  esi: 0xbfffdbfc  ebp: 0xbfffe018  esp: 0xbfffdbd0
       ss: 0x00000023  efl: 0x00210282  eip: 0x09a3ee7f   cs: 0x0000001b
       ds: 0x00000023   es: 0x00000023   fs: 0x00000000   gs: 0x0000000f
      cr2: 0x00000000
    Logical CPU: 2
    Binary Images:
        0x1000 -     0x1fff +tacint_osx (???) <61864F59-8A71-C466-4887-AC7CCB0C9B9D> /Users/USER/Library/Application Support/Steam/*/tacint_osx
        0x4000 -    0x1dff3 +gameoverlayrenderer.dylib (1) <C6AD9D84-0A5D-3598-9C2D-81FF881D168A> /Applications/Steam.app/Contents/MacOS/osx32/gameoverlayrenderer.dylib
       0x34000 -    0x34ffb +steamloader.dylib (0) <04FED4D9-EA7B-3389-8885-307D47EC1AF1> /Applications/Steam.app/Contents/MacOS/osx32/steamloader.dylib
       0x37000 -    0x58ff3 +libtier0.dylib (1) <BD2C9B41-54BD-8C53-640F-6351B707BA58> /Users/USER/Library/Application Support/Steam/*/libtier0.dylib
       0x73000 -    0xbaff7 +libvstdlib.dylib (1) <B56FA152-7E46-2B14-7485-C8C2AAFA642D> /Users/USER/Library/Application Support/Steam/*/libvstdlib.dylib
      0x274000 -   0x279ff7 +libsteam_api.dylib (1) <0F0B01B6-ECB2-3F57-8911-197F6ED26E75> /Users/USER/Library/Application Support/Steam/*/libsteam_api.dylib
      0x2e3000 -   0x2eafff +com.googlecode.google-breakpad (1.0) <52A4C312-E82C-3FD2-AD6B-71E07E934FA9> /Applications/Steam.app/Contents/MacOS/Frameworks/Breakpad.framework/Versions/A /Breakpad
      0x500000 -   0x5b1ff7 +launcher.dylib (1) <64725D45-057F-E805-DA12-7063086B5E38> /Users/USER/Library/Application Support/Steam/*/launcher.dylib
      0x700000 -   0x714ff3 +libtier0_s.dylib (1) <AC4B93C4-802E-3E63-9E48-7280B9AC66EA> /Applications/Steam.app/Contents/MacOS/osx32/libtier0_s.dylib
      0x732000 -   0x751ffb +libvstdlib_s.dylib (1) <94C6E88E-0EAB-379B-B79C-A506A2F4158A> /Applications/Steam.app/Contents/MacOS/osx32/libvstdlib_s.dylib
      0x77a000 -   0x7a5ff7  com.apple.audio.OpenAL (1.6 - 1.6) <CDE1BC7D-871D-3BE7-A6DE-96F6806BB7E1> /System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL
      0x7b5000 -   0x7c0fff +crashhandler.dylib (1) <4C339284-0393-32BE-9D3B-CE01C33C09EE> /Applications/Steam.app/Contents/MacOS/osx32/crashhandler.dylib
      0x7d7000 -   0x7e6fff +breakpadUtilities.dylib (1) <705ACFD7-8CF0-3AB6-9F66-AF306AF3286F> /Applications/Steam.app/Contents/MacOS/Frameworks/Breakpad.framework/Versions/A /Resources/breakpadUtilities.dylib
      0x7ef000 -   0x7f4fff  com.apple.audio.AppleHDAHALPlugIn (2.3.7 - 2.3.7fc4) <903097A8-3922-3BF8-8B82-8BD1D831F6E7> /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bun dle/Contents/MacOS/AppleHDAHALPlugIn
    0x14e1000 -  0x14eeff3  com.apple.Librarian (1.1 - 1) <68F8F983-5F16-3BA5-BDA7-1A5451CC02BB> /System/Library/PrivateFrameworks/Librarian.framework/Versions/A/Librarian
    0x2400000 -  0x24a8fff +filesystem_stdio.dylib (1) <35589B63-D93F-A355-B940-E450EB840B19> /Users/USER/Library/Application Support/Steam/*/filesystem_stdio.dylib
    0x253f000 -  0x256efe3 +inputsystem.dylib (1) <C99B6AFC-9FB8-1DE2-1E48-ADEB2F7DB867> /Users/USER/Library/Application Support/Steam/*/inputsystem.dylib
    0x27a8000 -  0x27abffd  com.apple.ForceFeedback (1.0.6 - 1.0.6) <0DF7BE00-63E3-3A7B-8427-32EB741FE6C9> /System/Library/Frameworks/ForceFeedback.framework/Versions/A/ForceFeedback
    0x27b0000 -  0x27e3fef +valve_avi.dylib (1) <E10D4C35-E92A-B1F3-0CCC-57E0E3E70EA2> /Users/USER/Library/Application Support/Steam/*/valve_avi.dylib
    0x3c00000 -  0x3e8cff7 +libsteam.dylib (1) <489E1F11-B16B-31AB-A7A8-7730CAE82AD7> /Applications/Steam.app/Contents/MacOS/osx32/libsteam.dylib
    0x3f9b000 -  0x3fe2fe7 +soundemittersystem.dylib (1) <33779D9B-6F68-B82C-DEDE-91BE3528752F> /Users/USER/Library/Application Support/Steam/*/soundemittersystem.dylib
    0x5a25000 -  0x64caf8f +steamclient.dylib (1) <DCD12DE2-488E-3C76-B78C-FD1198871B17> /Applications/Steam.app/Contents/MacOS/osx32/steamclient.dylib
    0x6fbd000 -  0x6fc1fff  com.apple.IOAccelerator (74.5.1 - 74.5.1) <CB7CDE62-DAEC-35AF-8ADB-3271AA2DF921> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelera tor
    0x6fc8000 -  0x6fd2fff  libGPUSupportMercury.dylib (8.9.2) <302EC167-66A3-3E12-8416-F03F50CA96D9> /System/Library/PrivateFrameworks/GPUSupport.framework/Versions/A/Libraries/lib GPUSupportMercury.dylib
    0x6fda000 -  0x6fe2ffd  libcldcpuengine.dylib (2.2.16) <0BE2D018-66CC-3F69-B8F1-7A81EEEE09F4> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libcldcpuengin e.dylib
    0x99f2000 -  0xa213ff7 +engine.dylib (1) <EEB845B5-80D0-9E9B-9851-9A28E28250A7> /Users/USER/Library/Application Support/Steam/*/engine.dylib
    0xad57000 -  0xaf36fef +vphysics.dylib (1) <2143AF98-C929-355A-DBDD-E09A49EFDA61> /Users/USER/Library/Application Support/Steam/*/vphysics.dylib
    0xafd8000 -  0xb134fef +materialsystem.dylib (1) <B2C7E2F4-335A-619A-2A6A-A09FF4D8A0E1> /Users/USER/Library/Application Support/Steam/*/materialsystem.dylib
    0xc1f7000 -  0xc27ffef +datacache.dylib (1) <FCA0D47C-5663-126D-5BC8-49B13A2F4353> /Users/USER/Library/Application Support/Steam/*/datacache.dylib
    0xc2b7000 -  0xc399fe7 +studiorender.dylib (1) <C41117CD-3778-7AE8-D233-E04340BD74AE> /Users/USER/Library/Application Support/Steam/*/studiorender.dylib
    0xc78f000 -  0xc870fff +vscript.dylib (1) <F4CEE888-6C8B-FF33-381A-8093DE544E34> /Users/USER/Library/Application Support/Steam/*/vscript.dylib
    0xc8ae000 -  0xcab5fe3 +vguimatsurface.dylib (1) <61705565-6993-CB41-2457-AFAAFB1A0047> /Users/USER/Library/Application Support/Steam/*/vguimatsurface.dylib
    0xcc1a000 -  0xcc79fff +vgui2.dylib (1) <BEC9DF22-3873-3559-5CDE-A217016CF834> /Users/USER/Library/Application Support/Steam/*/vgui2.dylib
    0xdc97000 -  0xddeafe7 +shaderapidx9.dylib (1) <CF7CC900-F51D-A8F5-CA15-9783302D2E58> /Users/USER/Library/Application Support/Steam/*/shaderapidx9.dylib
    0xde81000 -  0xdec1ff3 +localize.dylib (1) <50D65CFA-AB29-CD38-89C5-76CA025AED68> /Users/USER/Library/Application Support/Steam/*/localize.dylib
    0xded7000 -  0xe06bffa  GLEngine (8.9.2) <73F967E8-16C2-3FB2-8C04-293EB038952D> /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
    0xe0a2000 -  0xe223fff  libGLProgrammability.dylib (8.9.2) <B7AFCCD1-7FA5-3071-9F11-5161FFA2076C> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgramma bility.dylib
    0xe255000 -  0xe6a2ff3  com.apple.driver.AppleIntelHD4000GraphicsGLDriver (8.12.47 - 8.1.2) <5B46A344-20F2-3C75-9D42-D13092E6BB81> /System/Library/Extensions/AppleIntelHD4000GraphicsGLDriver.bundle/Contents/Mac OS/AppleIntelHD4000GraphicsGLDriver
    0xf3ff000 -  0xf42aff7  GLRendererFloat (8.9.2) <96FF25EA-1BC3-3FBA-85B6-08CC9F1D2077> /System/Library/Frameworks/OpenGL.framework/Resources/GLRendererFloat.bundle/GL RendererFloat
    0x10e00000 - 0x10e41ff7 +stdshader_dbg.dylib (1) <887F679E-D82F-3EDE-187E-B32B7612D91F> /Users/USER/Library/Application Support/Steam/*/stdshader_dbg.dylib
    0x11900000 - 0x119f8feb +stdshader_dx9.dylib (1) <FE0463BF-5F1E-DF57-3068-77DFDBCB9A5B> /Users/USER/Library/Application Support/Steam/*/stdshader_dx9.dylib
    0x17aa0000 - 0x17abfff7 +scenefilecache.dylib (1) <718E9E85-2938-9B68-06A4-2B02E12B121C> /Users/USER/Library/Application Support/Steam/*/scenefilecache.dylib
    0x18c22000 - 0x19a73ffb +client.dylib (1) <88EA4F01-3151-6E37-5D79-FDFFD84DEADF> /Users/USER/Library/Application Support/Steam/*/client.dylib
    0x1a5f5000 - 0x1b296fe7 +server.dylib (1) <B08CF5F2-E3DD-7638-BAEE-9376A50823F6> /Users/USER/Library/Application Support/Steam/*/server.dylib
    0x70000000 - 0x7015eff7  com.apple.audio.units.Components (1.9 - 1.9) <F2B2712A-3203-3875-B1FF-768E92AE0D42> /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio
    0x8fe18000 - 0x8fe4ae57  dyld (210.2.3) <23DBDBB1-1D21-342C-AC2A-0E55F27E6A1F> /usr/lib/dyld
    0x90007000 - 0x9005eff3  com.apple.HIServices (1.20 - 417) <561A770B-8523-3D09-A763-11F872779A4C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices
    0x9005f000 - 0x90090fff  com.apple.DictionaryServices (1.2 - 184.4) <CCB46C81-57C6-3F45-B77C-4D29E4CD6BA6> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Diction aryServices.framework/Versions/A/DictionaryServices
    0x90091000 - 0x901eaffb  com.apple.audio.toolbox.AudioToolbox (1.9 - 1.9) <8BF022FC-C38A-34AA-8469-D98294094659> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
    0x901eb000 - 0x901f5fff  libsystem_notify.dylib (98.5) <7EEE9475-18F8-3099-B0ED-23A3E528ABE0> /usr/lib/system/libsystem_notify.dylib
    0x901f6000 - 0x90200fff  com.apple.DisplayServicesFW (2.7.2 - 357) <76D33A58-C39E-398A-9597-389A9B1FE76D> /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayS ervices
    0x90a7f000 - 0x90a80fff  libremovefile.dylib (23.2) <9813B2DB-2374-3AA2-99B6-AA2E9897B249> /usr/lib/system/libremovefile.dylib
    0x90a81000 - 0x90a85ffc  libGIF.dylib (850) <45CD8B8F-7324-3187-B01C-8E16C04F33FA> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
    0x90a86000 - 0x90acdff3  com.apple.CoreMedia (1.0 - 926.104) <D0E3BE86-12ED-31BE-816F-E72D757A9F2F> /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia
    0x90ace000 - 0x90ad8fff  libCSync.A.dylib (332) <86C5C84F-11EC-39C0-9FAC-A93FDEEC3117> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
    0x90ad9000 - 0x90b55ff3  com.apple.Metadata (10.7.0 - 707.11) <F9BB5BBE-69D0-3309-8280-2303EB1DC455> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadat a.framework/Versions/A/Metadata
    0x90b56000 - 0x90b56fff  com.apple.vecLib (3.8 - vecLib 3.8) <83160DD1-5614-3E34-80EB-97041016EF1F> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
    0x90b57000 - 0x90b57ffd  libOpenScriptingUtil.dylib (148.3) <87895E27-88E2-3249-8D0E-B17E76FB00C1> /usr/lib/libOpenScriptingUtil.dylib
    0x90b58000 - 0x90b5bfff  com.apple.help (1.3.2 - 42) <2B727B38-0E18-3108-9735-F65958924A91> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framewor k/Versions/A/Help
    0x90b5c000 - 0x90b8fffb  com.apple.GSS (3.0 - 2.0) <9566A96D-C296-3ABD-A12A-E274C81C0B25> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x90b90000 - 0x90bbcff7  libsystem_info.dylib (406.17) <2731CC70-DF2E-3BD1-AE73-A3B83C531756> /usr/lib/system/libsystem_info.dylib
    0x90bbd000 - 0x90bdffff  libc++abi.dylib (26) <3AAA8D55-F5F6-362B-BA3C-CCAF0D3C8E27> /usr/lib/libc++abi.dylib
    0x90be0000 - 0x90cdeff7  libFontParser.dylib (84.6) <7D3EB3CC-527E-3A74-816A-59CAFD2260A4> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libFontParser.dylib
    0x90cdf000 - 0x90d04ff7  com.apple.quartzfilters (1.8.0 - 1.7.0) <BBB53E4F-BCBA-3461-875F-8FA8E9157261> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters .framework/Versions/A/QuartzFilters
    0x90d05000 - 0x90d17fff  libbsm.0.dylib (32) <DADD385E-FE53-3458-94FB-E316A6345108> /usr/lib/libbsm.0.dylib
    0x90d18000 - 0x90d1ffff  libsystem_dnssd.dylib (379.38.1) <4F164CA8-4A4F-3B27-B88A-0926E2FEB7D4> /usr/lib/system/libsystem_dnssd.dylib
    0x90d20000 - 0x90d20fff  com.apple.ApplicationServices (45 - 45) <B23FD836-ECA1-3DF8-B043-9CA9779BE9DB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Application Services
    0x90d21000 - 0x90f51fff  com.apple.QuartzComposer (5.1 - 284) <640BD4D4-3551-3DB1-A9F2-004257EE5DED> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzCompose r.framework/Versions/A/QuartzComposer
    0x90f52000 - 0x90f54fff  com.apple.securityhi (4.0 - 55002) <79E3B880-3AB7-3BF3-9CDF-117A45599545> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.fr amework/Versions/A/SecurityHI
    0x90f55000 - 0x90fb9ff3  libstdc++.6.dylib (56) <F8FA490A-8F3C-3645-ABF5-78926CE9C62C> /usr/lib/libstdc++.6.dylib
    0x90fba000 - 0x90fbefff  com.apple.CommonPanels (1.2.5 - 94) <7B3FC9A4-0F71-31E7-88CE-1BD4CBB655B2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels. framework/Versions/A/CommonPanels
    0x90fbf000 - 0x9123bff7  com.apple.QuickTime (7.7.1 - 2599.31) <3839E1F3-7948-3E68-9AE1-A0CEE8C59212> /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
    0x91294000 - 0x91368ff3  com.apple.backup.framework (1.4.3 - 1.4.3) <6EA22ED3-BA18-3A37-AE05-5D6FDA3F372F> /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
    0x91369000 - 0x91370ff3  com.apple.NetFS (5.0 - 4.0) <FD429432-6DA7-3B41-9889-0E8B4ECB8A4F> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x91371000 - 0x91377fff  com.apple.print.framework.Print (8.0 - 258) <3E10C488-C390-33BD-8A4F-568E3021811D> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framewo rk/Versions/A/Print
    0x913be000 - 0x913d3fff  com.apple.speech.synthesis.framework (4.1.12 - 4.1.12) <DE68CEB5-4959-3652-83B8-D2B00D3B932D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis
    0x913d4000 - 0x914f0ffb  com.apple.desktopservices (1.7.4 - 1.7.4) <782D711D-7930-324A-9015-686C2F86DBA3> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Desk topServicesPriv
    0x914f3000 - 0x917b3ff3  com.apple.security (7.0 - 55179.13) <000FD8E9-D070-326A-B386-51314360FD5C> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x917b4000 - 0x917b4fff  com.apple.Accelerate.vecLib (3.8 - vecLib 3.8) <908B8D40-3FB5-3047-B482-3DF95025ECFC> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/vecLib
    0x917b5000 - 0x917bcfff  liblaunch.dylib (442.26.2) <310C99F8-0811-314D-9BB9-D0ED6DFA024B> /usr/lib/system/liblaunch.dylib
    0x917bd000 - 0x917c0ff3  com.apple.AppleSystemInfo (2.0 - 2) <4DB3FD8F-655E-3F96-97BC-040B33044A34> /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSys temInfo
    0x917c1000 - 0x917f4fff  libssl.0.9.8.dylib (47.1) <1725A506-BD80-39D5-8EE8-78D2FBBE194C> /usr/lib/libssl.0.9.8.dylib
    0x917f8000 - 0x91818ffd  com.apple.ChunkingLibrary (2.0 - 133.3) <FA45EAE8-BB10-3AEE-9FDC-C0C3A533FF48> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/Chunking Library
    0x91819000 - 0x91c36fff  FaceCoreLight (2.4.1) <571DE3F8-CA8A-3E71-9AF4-F06FFE721CE6> /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLi ght
    0x91c37000 - 0x91c4eff4  com.apple.CoreMediaAuthoring (2.1 - 914) <8D71DE7D-7F53-3052-9FAF-132CB61BA9F5> /System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreM ediaAuthoring
    0x91c4f000 - 0x91f54ff7  com.apple.CoreServices.CarbonCore (1037.6 - 1037.6) <4DB4B0C9-1377-3062-BE0E-CD3326ACDAF0> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
    0x91f55000 - 0x921aeff5  com.apple.JavaScriptCore (8536 - 8536.30) <24A2ACA7-6E51-30C6-B9AE-17A77E511735> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
    0x921af000 - 0x921b7fff  libcopyfile.dylib (89) <4963541B-0254-371B-B29A-B6806888949B> /usr/lib/system/libcopyfile.dylib
    0x921b8000 - 0x921ffff7  com.apple.framework.CoreWiFi (1.3 - 130.13) <1961CC70-C00D-31DE-BAB5-A077538CD5CB> /System/Library/Frameworks/CoreWiFi.framework/Versions/A/CoreWiFi
    0x92200000 - 0x9222dffe  libsystem_m.dylib (3022.6) <93CEEC8C-FAB5-313C-B0BB-0F4E91E6B878> /usr/lib/system/libsystem_m.dylib
    0x9222e000 - 0x922ceff7  com.apple.QD (3.42.1 - 285.1) <BAAC13D2-1312-33C0-A255-FAB1D314C324> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ QD.framework/Versions/A/QD
    0x922cf000 - 0x92367fff  com.apple.CoreServices.OSServices (557.6 - 557.6) <E1600639-3EEC-3DF8-BD40-747BB2117988> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
    0x92368000 - 0x923d0ff7  com.apple.framework.IOKit (2.0.1 - 755.24.1) <70DE925B-51E8-3C65-8928-FB49FD823D94> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x923d1000 - 0x923e1ff7  libsasl2.2.dylib (166) <D9080BA2-A365-351E-9FF2-7E0D4E8B1339> /usr/lib/libsasl2.2.dylib
    0x923e2000 - 0x923ebfff  com.apple.CommerceCore (1.0 - 26.1) <8C28115C-6EC1-316D-9237-F4FBCBB778C5> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/C ommerceCore.framework/Versions/A/CommerceCore
    0x923f8000 - 0x92448ff7  com.apple.CoreMediaIO (308.0 - 4155.4) <E2FF59A9-3728-3D17-A1AD-84DC1BDA2146> /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/CoreMediaIO
    0x92489000 - 0x92596ff3  com.apple.ImageIO.framework (3.2.1 - 850) <C964E877-660E-3482-ACF9-EC25DFEAF307> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    0x92597000 - 0x92598fff  liblangid.dylib (116) <E13CC8C5-5034-320A-A210-41A2BDE4F846> /usr/lib/liblangid.dylib
    0x925a0000 - 0x926d3ff3  com.apple.MediaControlSender (1.7 - 170.20) <7B1AC317-AFDB-394F-8026-9561930E696B> /System/Library/PrivateFrameworks/MediaControlSender.framework/Versions/A/Media ControlSender
    0x926d4000 - 0x926f3ff3  com.apple.Ubiquity (1.2 - 243.15) <E10A2937-D671-3D14-AF8D-BA25E601F458> /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity
    0x926f4000 - 0x92721ffb  com.apple.CoreServicesInternal (154.3 - 154.3) <A452602B-67CB-39C4-95EB-E59433C65774> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/Cor eServicesInternal
    0x92722000 - 0x92724ffb  libRadiance.dylib (850) <83434287-A09E-3A3F-A1AC-085B563BA46D> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.d ylib
    0x92725000 - 0x92882ffb  com.apple.QTKit (7.7.1 - 2599.31) <B9AE5675-22B0-3AA9-903F-2195DA0B04F5> /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit
    0x92883000 - 0x928f8ff7  com.apple.ApplicationServices.ATS (332 - 341.1) <1D81B09C-98DB-3CDB-990B-459FAE3D8D7A> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/ATS
    0x92900000 - 0x92925ff7  com.apple.CoreVideo (1.8 - 99.4) <A26DE896-32E0-3D5E-BA89-02AD23FA96B3> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
    0x92926000 - 0x92966fff  com.apple.MediaKit (14 - 687) <8735A76E-7766-33F5-B3D2-86630070A1BA> /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit
    0x92c54000 - 0x93050feb  com.apple.VideoToolbox (1.0 - 926.104) <4275B89E-F826-3F65-ACE1-89052A9CAC6B> /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
    0x9308e000 - 0x930a8ffc  libsystem_kernel.dylib (2050.24.15) <9E58DCC0-D5FF-37E1-AA7F-F2206719E138> /usr/lib/system/libsystem_kernel.dylib
    0x93de2000 - 0x94102ff3  com.apple.Foundation (6.8 - 945.18) <BDC56A93-45C5-3459-B307-65A1CCE702C5> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x94103000 - 0x94127fff  libJPEG.dylib (850) <36FEAB05-86C5-33B9-9DE9-5FAD8AEBA15F> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
    0x941c2000 - 0x941cbff9  com.apple.CommonAuth (3.0 - 2.0) <34C4768C-EF8D-3DBA-AFB7-09148C8672DB> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
    0x94441000 - 0x944d3ffb  libvMisc.dylib (380.6) <6DA3A03F-20BE-300D-A664-B50A7B4E4B1A> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvMisc.dylib
    0x944d4000 - 0x945c5ffc  libiconv.2.dylib (34) <B096A9B7-83A6-31B3-8D2F-87D91910BF4C> /usr/lib/libiconv.2.dylib
    0x945c6000 - 0x945c7fff  libdnsinfo.dylib (453.19) <3B523729-84A8-3D0B-B58C-3FC185060E67> /usr/lib/system/libdnsinfo.dylib
    0x945c8000 - 0x94663fff  com.apple.CoreSymbolication (3.0 - 117) <F705A8CD-A04A-3A84-970A-7B04BC05DA97> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSy mbolication
    0x94664000 - 0x94664fff  com.apple.CoreServices (57 - 57) <83B793A6-720D-31F6-A76A-89EBB2644346> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x94665000 - 0x94671ffa  com.apple.CrashReporterSupport (10.8.3 - 418) <03BC564E-35FE-384E-87D6-6E0C55DF16E3> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/Cra shReporterSupport
    0x94672000 - 0x946d8fff  com.apple.print.framework.PrintCore (8.3 - 387.2) <0F7665F5-33F0-3661-9BE2-7DD2890E304B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore
    0x946d9000 - 0x946e9ff2  com.apple.LangAnalysis (1.7.0 - 1.7.0) <C6076983-A02E-389E-BFC6-008EECC4C896> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis
    0x946ea000 - 0x946f8fff  libxar.1.dylib (105) <6498A359-2DBA-3EDA-8F00-EEB989DD0A93> /usr/lib/libxar.1.dylib
    0x946f9000 - 0x948e1ffb  com.apple.CoreFoundation (6.8 - 744.19) <DDD3AA21-5B5F-3D8F-B137-AD95FCA89064> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x948e2000 - 0x94a1dff7  libBLAS.dylib (1073.4) <FF74A147-05E1-37C4-BC10-7DEB57FE5326> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libBLAS.dylib
    0x94a1e000 - 0x94b16ff9  libsqlite3.dylib (138.1) <AD7C5914-35F0-37A3-9238-A29D2E26C755> /usr/lib/libsqlite3.dylib
    0x94b17000 - 0x94b70fff  com.apple.QuickLookFramework (4.0 - 555.5) <4E381B7B-7EB5-37FD-9BA7-517DB48D07A7> /System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook
    0x94b9d000 - 0x94f55ffa  libLAPACK.dylib (1073.4) <9A6E5EAD-F2F2-3D5C-B655-2B536DB477F2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libLAPACK.dylib
    0x94f58000 - 0x94fafff7  com.apple.ScalableUserInterface (1.0 - 1) <4B538E02-4F41-37FF-81F6-ED43DE0E78CC> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableU serInterface.framework/Versions/A/ScalableUserInterface
    0x94fb0000 - 0x95097ff7  libxml2.2.dylib (22.3) <56E973D6-6B55-3E67-8282-6BC982816488> /usr/lib/libxml2.2.dylib
    0x95098000 - 0x95099fff  libquarantine.dylib (52.1) <094A1501-373E-3397-B632-8F7C5AC8EFD5> /usr/lib/system/libquarantine.dylib
    0x950a2000 - 0x950abfff  com.apple.DiskArbitration (2.5.2 - 2.5.2) <89822A83-B450-3363-8E9C-9B80CB4450B1> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    0x95164000 - 0x9517bfff  com.apple.GenerationalStorage (1.1 - 132.3) <DD0AA3DB-376D-37F3-AC5B-17AC9B9E0A63> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/Gene rationalStorage
    0x9517c000 - 0x95230fff  com.apple.coreui (2.0 - 181.1) <6BEEE83E-C878-3FE6-B521-8B32B3A35409> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
    0x95231000 - 0x95233ffd  libCVMSPluginSupport.dylib (8.9.2) <D6D0BB75-42DA-3772-AB5E-CBD59B343393> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginS upport.dylib
    0x95239000 - 0x95450fff  com.apple.CoreData (106.1 - 407.7) <17FD06D6-AD7C-345A-8FA4-1F0FBFF4DAE1> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x95451000 - 0x9546afff  com.apple.Kerberos (2.0 - 1) <8413EDD3-7E01-3D47-83FD-C14A5235DCD2> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x954c2000 - 0x95598fff  com.apple.DiscRecording (7.0 - 7000.2.4) <528052A0-FCFB-3867-BCDF-EE0F8A998C1C> /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording
    0x95599000 - 0x95648ff7  com.apple.CoreText (260.0 - 275.16) <7716C57B-E059-3B30-BBA8-AD7FF6EE3D35> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
    0x95649000 - 0x9565efff  com.apple.ImageCapture (8.0 - 8.0) <F681CA5B-2871-32CF-8E9F-9220EB387407> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture. framework/Versions/A/ImageCapture
    0x9565f000 - 0x95694fff  libTrueTypeScaler.dylib (84.6) <B7DB746B-7A61-38EF-8CA7-408ED9C14A02> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib
    0x95695000 - 0x95698ff9  libCGXType.A.dylib (332) <07B59FCC-6229-37C2-9870-70A18E2C5598> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib
    0x9569b000 - 0x9569bfff  com.apple.Cocoa (6.7 - 19) <01AA482A-677A-31CA-9EC9-05C57FDDE427> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
    0x9569d000 - 0x956c8ff9  com.apple.framework.Apple80211 (8.4 - 840.22.1) <DBC31BEB-B771-315F-852D-66ADC3BD75A1> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
    0x956c9000 - 0x95704fef  libGLImage.dylib (8.9.2) <9D41F71E-E927-3767-A856-55480E20E9D9> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dyl ib
    0x95705000 - 0x962c1ff3  com.apple.AppKit (6.8 - 1187.39) <ACA24416-D910-39B8-9387-52A6C6A561F8> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x962d1000 - 0x963de057  libobjc.A.dylib (532.2) <FA455371-7395-3D58-A89B-D1520612D1BC> /usr/lib/libobjc.A.dylib
    0x96501000 - 0x96501fff  com.apple.Carbon (154 - 155) <C0A26E7B-28F1-3C7E-879E-A3CF3ED5111C> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
    0x96502000 - 0x9655cffb  com.apple.AE (645.6 - 645.6) <44556FF7-A869-399A-AEBB-F4E9263D9152> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.fram ework/Versions/A/AE
    0x9655d000 - 0x9657bff3  com.apple.openscripting (1.3.6 - 148.3) <F3422C02-5ACB-343A-987B-A2D58EA2F5A8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting .framework/Versions/A/OpenScripting
    0x9657c000 - 0x9657cfff  libkeymgr.dylib (25) <D5E93F7F-9315-3AD6-92C7-941F7B54C490> /usr/lib/system/libkeymgr.dylib
    0x9657d000 - 0x96695ff7  com.apple.coreavchd (5.6.0 - 5600.4.16) <D871D730-1D5C-34E7-98C7-0FF09964E618> /System/Library/PrivateFrameworks/CoreAVCHD.framework/Versions/A/CoreAVCHD
    0x96696000 - 0x96696fff  libsystem_blocks.dylib (59) <3A743C5D-CFA5-37D8-80A8-B6795A9DB04F> /usr/lib/system/libsystem_blocks.dylib
    0x96697000 - 0x966f2ff7  com.apple.AppleVAFramework (5.0.19 - 5.0.19) <3C43A555-0A22-3D7C-A3FB-CFADDDA43E9B> /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA
    0x9670d000 - 0x96713fff  libGFXShared.dylib (8.9.2) <F3B0E66D-5C47-3A5A-A2CD-F0C58E8322C3> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.d ylib
    0x96714000 - 0x96720ff8  libbz2.1.0.dylib (29) <7031A4C0-784A-3EAA-93DF-EA1F26CC9264> /usr/lib/libbz2.1.0.dylib
    0x96721000 - 0x96730fff  libGL.dylib (8.9.2) <1082B9A5-9AA3-35D4-968B-3A3FE15B1ED7> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
    0x96731000 - 0x96735ffe  libcache.dylib (57) <834FDCA7-FE3B-33CC-A12A-E11E202477EC> /usr/lib/system/libcache.dylib
    0x96736000 - 0x96841ff7  libJP2.dylib (850) <3FFCEFA6-317A-34AF-8D99-AEBB017543C5> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
    0x96842000 - 0x9685ffff  libCRFSuite.dylib (33) <8E6E8815-406E-3A89-B96E-908FEFC27F0A> /usr/lib/libCRFSuite.dylib
    0x96860000 - 0x968a5ff7  com.apple.NavigationServices (3.7 - 200) <6AB1A00C-BC94-3889-BA95-40A454B720CE> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationSer vices.framework/Versions/A/NavigationServices
    0x968a6000 - 0x968b4ff3  libsystem_network.dylib (77.10) <11CAF6A8-17CF-3178-9348-57C5ED494BA8> /usr/lib/system/libsystem_network.dylib
    0x96953000 - 0x969b5fff  libc++.1.dylib (65.1) <35EE57E1-2705-3C76-A75A-75655D720268> /usr/lib/libc++.1.dylib
    0x969b6000 - 0x969c1fff  libcommonCrypto.dylib (60027) <8EE30FA5-AA8D-3FA6-AB0F-05DA8B0425D9> /usr/lib/system/libcommonCrypto.dylib
    0x969c2000 - 0x969cbffd  com.apple.audio.SoundManager (4.0 - 4.0) <6A0B4A5D-6320-37E4-A1CA-91189777848C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.f ramework/Versions/A/CarbonSound
    0x969cc000 - 0x969d8ff7  com.apple.NetAuth (4.0 - 4.0) <52D23F12-0718-341D-B9DF-16C814022250> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x969d9000 - 0x96a0fffb  com.apple.DebugSymbols (98 - 98) <D0293694-C381-30DF-8DD9-D1B04CD0E5F0> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbol s
    0x96a10000 - 0x96abafff  com.apple.LaunchServices (539.9 - 539.9) <C0E0CFFF-3714-3467-87DA-4A6F0AF1953B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchS ervices.framework/Versions/A/LaunchServices
    0x96ac9000 - 0x96c52ff7  com.apple.vImage (6.0 - 6.0) <1D1F67FE-4F75-3689-BEF6-4A46C8039E70> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.fr amework/Versions/A/vImage
    0x96c53000 - 0x96cb4fff  com.apple.audio.CoreAudio (4.1.1 - 4.1.1) <A3B911DB-77DF-3037-A47A-634B08E5727D> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
    0x96cb5000 - 0x96cc3fff  com.apple.opengl (1.8.9 - 1.8.9) <1872D2CD-00A8-30D1-8ECC-B663F4E4C530> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
    0x96cc4000 - 0x96cfbffa  com.apple.LDAPFramework (2.4.28 - 194.5) <23668AB5-68EA-37D2-978E-C9EF22BF8C0C> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
    0x96d9e000 - 0x96e7ffff  libcrypto.0.9.8.dylib (47.1) <E4820342-4F42-3DEB-90DB-DE5A66C5585E> /usr/lib/libcrypto.0.9.8.dylib
    0x96e80000 - 0x96ec2ff7  libcups.2.dylib (327.6) <D994A44F-CCDD-3D40-B732-79CB88F45908> /usr/lib/libcups.2.dylib
    0x96f0f000 - 0x96f21ff7  libdispatch.dylib (228.23) <86EF7D45-2D97-3465-A449-95038AE5DABA> /usr/lib/system/libdispatch.dylib
    0x96f22000 - 0x96f22fff  com.apple.Accelerate (1.8 - Accelerate 1.8) <4EC0548E-3A3F-310D-A366-47B51D5B6398> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
    0x96f27000 - 0x96f81ff3  com.apple.ImageCaptureCore (5.0.4 - 5.0.4) <6313E06F-37FD-3606-BF2F-87D8598A9983> /System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/ImageCaptureCo re
    0x96f82000 - 0x97076ff3  com.apple.QuickLookUIFramework (4.0 - 555.5) <5A62C87F-5F74-380B-8B86-8CE3D8788603> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.f ramework/Versions/A/QuickLookUI
    0x970d2000 - 0x971cfff7  com.apple.DiskImagesFramework (10.8.3 - 345) <26D0C7F8-E87E-3511-8388-8EE616A39D6D> /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/DiskImages
    0x971d2000 - 0x97214fff  libcurl.4.dylib (69.2) <8CC566A0-0B25-37E8-A6EC-30074C3CDB8C> /usr/lib/libcurl.4.dylib
    0x97215000 - 0x97216ffd  libunc.dylib (25) <5E1EEE9E-3423-33D7-95B2-E4D17DD08C18> /usr/lib/system/libunc.dylib
    0x97217000 - 0x97240fff  libxslt.1.dylib (11.3) <0DE17DAA-66FF-3195-AADB-347BEB5E2EFA> /usr/lib/libxslt.1.dylib
    0x9724d000 - 0x9730afeb  libsystem_c.dylib (825.26) <6E35A83F-1A5B-3AF9-8C6D-D7B57B25FB63> /usr/lib/system/libsystem_c.dylib
    0x9730b000 - 0x97359ffb  libFontRegistry.dylib (100) <97D8F15F-F072-3AF0-8EF8-50C41781951C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/libFontRegistry.dylib
    0x97390000 - 0x973ffffb  com.apple.Heimdal (3.0 - 2.0) <964D9952-B0F2-34F6-8265-1823C0D5EAB8> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
    0x97400000 - 0x9740cffe  libkxld.dylib (2050.24.15) <BEC097B0-9D9A-3484-99DB-0F537E71963E> /usr/lib/system/libkxld.dylib
    0x9740f000 - 0x97412ffc  libpam.2.dylib (20) <FCF74195-A99E-3B07-8E49-688D4A6F1E18> /usr/lib/libpam.2.dylib
    0x97413000 - 0x97417ff7  libmacho.dylib (829) <5280A013-4F74-3F74-BE0C-7F612C49F1DC> /usr/lib/system/libmacho.dylib
    0x97479000 - 0x974bbffb  com.apple.RemoteViewServices (2.0 - 80.6) <AE962502-4539-3893-A2EB-9D384652AEAC> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/Remot eViewServices
    0x974bc000 - 0x97516fff  com.apple.Symbolication (1.3 - 93) <4A794D1C-DE02-3183-87BF-0008A602E4D3> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolicat ion
    0x97517000 - 0x97665ff3  com.apple.CFNetwork (596.4.3 - 596.4.3) <547BD138-E902-35F0-B6EC-41DD06794B22> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x97666000 - 0x978d3ffb  com.apple.imageKit (2.2 - 673) <CDB2AC11-6D60-34A7-83F9-F6E7DA25F97B> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.fram ework/Versions/A/ImageKit
    0x978d4000 - 0x978eafff  com.apple.CFOpenDirectory (10.8 - 151.10) <3640B988-F915-3E0D-897C-CB04C95BA601> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpen Directory.framework/Versions/A/CFOpenDirectory
    0x978eb000 - 0x978f5fff  com.apple.speech.recognition.framework (4.1.5 - 4.1.5) <774CDB2F-34A1-347A-B302-4746D256E921> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogni tion.framework/Versions/A/SpeechRecognition
    0x978f6000 - 0x97d38fff  com.apple.CoreGraphics (1.600.0 - 332) <67E70F21-A0F1-356F-90B7-4B90C468EE2C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics
    0x97d39000 - 0x97d46ff7  com.apple.AppleFSCompression (49 - 1.0) <9A066D13-6E85-36FC-8B58-FD46E51751CE> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/Apple FSCompression
    0x97d47000 - 0x97d47fff  libSystem.B.dylib (169.3) <B81FAD7E-8808-3F49-807F-0AD68D0D7359> /usr/lib/libSystem.B.dylib
    0x97d48000 - 0x9812bfff  com.apple.HIToolbox (2.0 - 626.1) <ECC3F04F-C4B7-35BF-B10E-183B749DAB92> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
    0x98136000 - 0x98153ff7  libresolv.9.dylib (51) <B974

    Hi, never played them or had Steam, but it appears to be something about the Login as far as I can tell, but not sure of course.
    Hopefully my reply brings your query to the top again & we get more help here.

  • Grand Total For Matrix Based Report

    Hi All,
    I have a matrix based report with Fields like Country ,Amount and MonthYear
    So report looks like below the columns get generated dynamically :
    Country     Oct 2013    Nov 2013  Dec 2013
    India         25,000         25,000    25,000
    England    22,000         25,000    30,000
    Total         57,000         50,000    55,000
    So this works perfectly fine . So next step was to get difference between the months like below :
    Country     Oct 2013    Nov 2013  Dec 2013   Oct-Nov 2013          Nov - Dec 2013
    India         25,000         25,000    25,000             0                              
    0
    England    22,000         25,000    30,000          -3000                      
    -5000
    Total         57,000         50,000    55,000
    Simon_Hou Provided me a custom code for dynamically find the difference between months . Now only requirement left is the sum of the dynamically generated month difference column . As the columns are generated based on a custom code it's not allowing me
    to do a sum  on it.
    Desired Output
    Country     Oct 2013    Nov 2013  Dec 2013   Oct-Nov 2013          Nov - Dec 2013
    India         25,000         25,000    25,000             0                              
    0
    England    22,000         25,000    30,000          -3000                      
    -5000
    Total         57,000         50,000    55,000         -3000                       
    -5000
    Can any one please advice me how to do sum for the dynamically generated custom code column .
    Code is below it might help some1 else(Simon_Hou)
    Private queueLength As Integer = 2
    Private queueSum As Double = 0
    Private queueFull As Boolean = False
    Private idChange As String=""
    Dim queue As New System.Collections.Generic.Queue(Of Integer)
    Public Function CumulativeQueue(ByVal currentValue As Integer,id As String) As Object
    Dim removedValue As Double = 0
    If idChange <> id then
            ClearQueue()
                    idChange = id 
                    queueSum = 0 
                    queueFull = False
                    CumulativeQueue(currentValue,id)
    Else  
                    If queue.Count >= queueLength Then
                                    removedValue = queue.Dequeue()
                    End If
                    queueSum += currentValue
                    queueSum -= removedValue
                    queue.Enqueue(currentValue)
                    If queue.Count < queueLength Then
                    Return Nothing
                    ElseIf queue.Count = queueLength And queueFull = False Then
                    queueFull = True
                    Return (queueSum-currentValue-currentValue) 
                    Else
                    Return (queueSum-currentValue-currentValue) 
                    End If
    End If
    End Function
    public function ClearQueue()
    Dim i as Integer
    Dim n as Integer = Queue.Count-1
    for i=n To 0 Step-1
                    queue.Dequeue()
    next i
    End function
    Thanks in Advance
    Priya

    Hi Priya,
    According to your description, you want to add a total row at bottom of the matrix. This total row should display the  both sum of amount every month and the sum of the difference between months. Right?
    Since we have tried the custom code in another similar thread you have posted before (Difference
    Between the grouped column) and it works properly. In this scenario, we just need to use the sum function and put it as a variable when calling the custom function in custom code, then we will get the total difference between months. This
    case has been tested in our local environment (In this sample, we used the same sample data as the last thread you posted before).Here are steps and screenshots for your reference:
    1. Add a row out side of group. Put the expressions into corresponding cells.
    2. Save and preview. The result looks like below:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Web-Based Game Skill System

    Hello everyone,
    I am currently developing a web-based game website using
    Coldfusion 8 and MS SQL.
    Until recentely, things have been going well. But I am now
    stuck on a small issue of using an in-game skill system.
    The way it works (or will work) is that your in-game
    character will have a large library of skills to choose from, all
    of which are accessible throughout the entire game. By choosing a
    skill, your character will begin learning it over a set amount of
    time (the time required for that specific skill). Your character
    will, over time, generate it's own library of learnt skills - each
    benefiting him or her within the game.
    I hope this is all clear so far :)
    So my small (but actually quite large) issue is that I'm not
    sure how to go about storing this list of learnt skills.
    My first instinct was to create a column within the
    "characters" table in which the learnt skills would be stored as a
    list, and then drawn out when actually listed on a page. But I have
    heard that using lists within database tables isn't such a good
    idea, and I would generally prefer another way around the issue.
    My next idea was to create a table listing all of the
    available skills as columns (a kind of library of every in-game
    skill), then the characters would have a single row in that table
    in which they have a "yes" or "no" under each skill column. These
    yes or no answers would then be used to generate the library of
    skills that character has. But this idea is very messy and I don't
    even know how I could use this table in an SQL query...
    I'd really like a simple and powerful solution for this
    issue/problem, and I would be highly appreciative of anyone that
    could help me!
    Thanks in advance,
    Aiden

    "Thanks a lot for your reply anyway :) and I'm sorry it
    wasn't of use
    to me."
    Actually Dan was guiding you down the correct database
    normalization
    path. What you have is a classic many-to-many join. You have
    many
    character records and many skill records and you want to join
    them such
    that a character can have 0-N skills (zero to infinity) and a
    skill can
    be used by 0-N players.
    This is done with three tables. A character table with the
    basic
    details of a character and a skills table with the details of
    the skills
    and a joining table that connects the two. At a minimum the
    join tables
    simple consists of two fields, a foreign key field to the
    characters
    table and a foreign key field to the skills table. Thus for
    each skill
    a character has there will be one record connecting the two
    id's
    together. This joining table can easily be expanded to have
    other data
    about the character-skill join such as when it started, what
    level the
    character has reached in the skill, whatever else your system
    needs.
    An simple Example:
    Character Table
    ID Name
    1 Joe
    2 Sam
    3 George
    Skill Table
    ID Name
    1 Hunting
    2 Cooking
    3 Archery
    Character_Skill Join Table
    CharID SkillID
    1 1
    1 3
    2 2
    3 1
    3 2
    3 3
    Thus with basic SQL join syntax we can synthesize the data
    that Joe can
    hunt and shoot arrows, Sam can cook and George can do it all.
    HTH
    Ian

  • Help Using Path Finding Code

    Hi all.
    I found some open source code which implements the A Star algorithm to achieve path finding for the purpose of navigating something in a game (although it could really be used for anything). Problem is, I can't get it to work. I've e-mailed the author but no reply yet so I was hoping someone could shed some light on my situation.
    The code is meant to find a path on a 2 dimensional grid filled with obstacles using the following methods:
    PathFinder star = new PathFinder(grid);
    Path p = star.findShortest(startRow,startCol,goalRow,goalCol);
    I've made a simple Test class with a small 2D array but when I compile the code I recieve the error:
    Incompatible types.
    Found: int.
    Required: Test.Path
    on Path p = star.findShortest(1,1,2,2);
    I don't understand this error at all. The findShortest method takes 4 integers and I'm passing it 4 integers! Any ideas what this error means?
    Here's my Test class:
    import java.util.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import javax.swing.filechooser.*;
    import java.util.Random;
    public class Test
            public static void main(String args[])
                    Test test = new Test();
                    test.run();
           public final static class Path
                    /** 2 for down, 0 is up, 1 is right and 3 is left */
                    public int giveMove() {
                        if (size() < 2)
                            return -1;
                        Position last = (Position)positions.get(size() - 1);
                        Position forlast = (Position)positions.get(size() - 2);
                        if (forlast.col - last.col == 1)
                            return 2; //down
                        else if (forlast.col - last.col == -1)
                            return 0; //up
                        else if (forlast.row - last.row == 1)
                            return 1;//right
                        else if (forlast.row - last.row == -1)
                            return 3; //left
                        return -1;
                    /** list of positions */
                    public List positions;
                    public int getCost() { return positions.size() - 1; }
                    public int size() { return positions.size(); }
                    public void add(Object o) { positions.add(o); }
                    /** add (r,c) to the path */
                    public void add(int r, int c) {
                        positions.add(new Position(r,c));
                    /** get first position */
                    public Position head() { return (Position) positions.get(0); }
                    public Path(ArrayList positions) { this.positions = positions; }
                    public Path(Position initial) {
                        positions = new ArrayList(1);
                        positions.add(initial);
                    public Path(int cap) { positions = new ArrayList(cap); }
                    public void set(Position front, Path old) {
                        positions.add(front);
                        Iterator i = old.positions.iterator();
                        while (i.hasNext())
                            positions.add(i.next());
            /** position on the grid */
           public static final  class Position
                    public int row, col;
                    public Position(int row, int col) {
                        this.row = row; this.col = col;
            public void run()
                    System.out.println("Test");
                    PathFinder star = new PathFinder(grid);
                    for(int counter = 0; counter < grid.length; counter++)
                            for (int j=0; j < grid[counter].length; j++)
                                    grid[counter][j] = 0;
                    Path p = star.findShortest(1, 1, 2, 2);
         private static int[][] grid = new int[2][2];    
    } Here's the PathFinder class I downloaded:
    import java.util.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import javax.swing.filechooser.*;
    import java.util.Random;
    public final class PathFinder {
        /** the map grid to look on */
        private final int [][] grid;
        /** keep distances to each position here */
        private final int [][] distances;
        /** is gridposition (r, c) empty (empty is -1) ? */
        private boolean isEmpty(int r, int c) {
            return grid[r][c] == -1 ;
        /** pathfinder for grid */
        public PathFinder(int[][] grid) {
            this.grid = grid;
            this.distances = new int [grid.length][grid.length];
        /** clear distances */
        private void clear() {
            for (int i = 0 ; i < distances.length ; i++)
                for (int j = 0 ; j < distances.length ; j++)
    distances[i][j] = Integer.MAX_VALUE;
    /** position on the grid */
    public final static class Position {
    public int row, col;
    public Position(int row, int col) {
    this.row = row; this.col = col;
    /** path from start to a certain position */
    public final static class Path {
    /** 2 for down, 0 is up, 1 is right and 3 is left */
    public int giveMove() {
    if (size() < 2)
    return -1;
    Position last = (Position)positions.get(size() - 1);
    Position forlast = (Position)positions.get(size() - 2);
    if (forlast.col - last.col == 1)
    return 2; //down
    else if (forlast.col - last.col == -1)
    return 0; //up
    else if (forlast.row - last.row == 1)
    return 1;//right
    else if (forlast.row - last.row == -1)
    return 3; //left
    return -1;
    /** list of positions */
    public List positions;
    public int getCost() { return positions.size() - 1; }
    public int size() { return positions.size(); }
    public void add(Object o) { positions.add(o); }
    /** add (r,c) to the path */
    public void add(int r, int c) {
    positions.add(new Position(r,c));
    /** get first position */
    public Position head() { return (Position) positions.get(0); }
    public Path(ArrayList positions) { this.positions = positions; }
    public Path(Position initial) {
    positions = new ArrayList(1);
    positions.add(initial);
    public Path(int cap) { positions = new ArrayList(cap); }
    public void set(Position front, Path old) {
    positions.add(front);
    Iterator i = old.positions.iterator();
    while (i.hasNext())
    positions.add(i.next());
    /** gives the move to take for the shortest path from startRow to startCol
    * 0 up, 1 right, 2 down, 3 left
    * -1 if no move possible
    public final int findShortest
    (int startRow, int startCol, int goalRow, int goalCol) {
    clear();
    Position initial = new Position(startRow, startCol);
    //LinkedList list = new LinkedList();
    Position goal = new Position(goalRow, goalCol);
    BinaireHoop list = new BinaireHoop(200, new Path(goal), goal);
    list.add(new Path(initial));
    Position [] successors = new Position[4];
    int trie = 0;
    for ( ; ! list.isEmpty() && trie < 10000 ; trie++) {
    Path first = (Path) list.remove();
    Position firstPos = first.head();
    int r = firstPos.row; int c = firstPos.col;
    if (r == goalRow && c == goalCol) {  //goal found !             
    return first.giveMove();
    } else {
    int successorsCount = 0;
    if (isEmpty(r-1,c)) {
    successors[successorsCount++]
    = new Position(r-1, c);
    if (isEmpty(r+1,c)) {
    successors[successorsCount++]
    = new Position(r+1, c);
    if (isEmpty(r,c-1)) {
    successors[successorsCount++]
    = new Position(r, c-1);
    if (isEmpty(r,c+1)) {
    successors[successorsCount++]
    = new Position(r, c+1);
    while (successorsCount-- > 0) {
    Position succ = successors[successorsCount];
    int newPathCost = first.getCost() + 1;
    //add newPath if shorter than other path to this position
    if (distances[succ.row][succ.col] > newPathCost) { //shorter
    distances[succ.row][succ.col] = newPathCost;
    Path newPath = new Path(newPathCost + 1);
    newPath.set(succ, first);
    //add path to binary heap
    list.add(newPath);
    } // else longer: discard
    return -1;
    There's also a BinaireHoop class which the PathFinder class uses. I'll post that code if anyone thinks it's relevant but the error appears to be soley on my implementation. The Path and Position and just small subclass which for the sake of quickness I just placed into my Test class too instead of into a new class to themselves.
    Any thoughts appreciated! I would really like to get this working =)
    Thanks.

    Thanks for your reply. Doh, totally missed that one =)
    Anyway, I got the code working but it's still very buggy. I think this must just be a problem with the PathFinder class I downloaded.
    I create a 2D array
          int[][] array = {       
                                  {-1, -1, -1, -1, -1, -1, -1, -1},          
                                  {-1, -1, -1, -1, -1, -1, -1, -1},
                                  {-1, -1, -1, -1, -1, -1, -1, -1},
                                  {-1, -1, -1, -1, -1, -1, -1, -1},
                                  {-1, -1, -1, -1, -1, -1, -1, -1},
                                  {-1, -1, -1, -1, -1, -1, -1, -1},
                                  {-1, -1, -1, -1, -1, -1, -1, -1},
                                  {-1, -1, -1, -1, -1, -1, -1, -1}
                          };and choose starting and goal coordinates
    int p = star.findShortest(1, 1, 2, 2);The PathFinder will generate the coordinates to move to (I just stuck it all in a loop and updated the starting coordinates as appropriate to lead me to the goal). This is great!
    However, there seem to be a lot of bugs when I introduce "occupied squares". Basically, -1 in the array means that that square is empty whereas anything else means its full and the path finder should, in theory, generate a path around these obstacles. This isn't working correctly though.
    Sometimes a path wil be found around the obstacle, sometimes the path will go straight through it, and many times it just throws an array index out of bounds exception error!
    Anyone got any ideas? Or does anyone have any examples of a working path finder? =)
    Cheers

  • How to make an a basic attack in my text based game

    hey guys! i really need some genuine help on how to create an attack for my monsters and player. the attack should be basic: if the room contains a monster, then the monster attacks when the player goes inside the room. then the player can type a command to attack the monster. the attack should just deduct the hp of the monster. so the player can keep attacking till the monster is "dead"(this is where i remove the monster).
    anyway i tried alot in creating the attack but i failed all the time, messing my code even more. please!!!!! help!!!
    my monster class:
    public class Monster
    private int hp, stage;
    private String name;
    public Monster(String name, int stage)
    this.name = name;
    this.stage = stage;
    if(stage == 1) {
    hp = 1;
    else if(stage == 2) {
    hp = 2;
    else if(stage == 3) {
    hp = 2;
    else if(stage == 4) {
    hp = 3;
    else if(stage == 5) {
    hp = 4;
    else if(stage == 6) {
    hp = 6;
    public int monsterStage()
    return stage;
    public String getName()
    return name;
    this is where i created the monsters in my main game class:
    private Monster skeleton, sphinx, zombie, vampire, werewolf, undeadking;
    setting the monster to a room:
    skeleton = new Monster("skeleton1", 1);
    skeleton = new Monster("skeleton2", 1);
    sphinx = new Monster("sphinx1", 2);
    sphinx = new Monster("sphinx2", 2);
    sphinx = new Monster("sphinx3", 2);
    zombie = new Monster("zombie", 3);
    vampire = new Monster("vampire1", 4);
    vampire = new Monster("vampire2", 4);
    werewolf = new Monster("werewolf", 5);
    undeadking = new Monster("undeadking", 6);
    //setting the monster to a place
    bridge.addMonster("skeleton1", skeleton);
    castleDoor.addMonster("sphinx1", sphinx);
    castleChest.addMonster("zombie", zombie);
    dungeonDoor.addMonster("sphinx2", sphinx);
    castleStair.addMonster("werewolf", werewolf);
    dungeonBridge.addMonster("vampire2", vampire);
    dungeonBook.addMonster("sphinx3", sphinx);
    dungeonChest.addMonster("skeleton2", skeleton);
    throneCenter.addMonster("undeadking", undeadking);
    ps.: please help me! each room has one monster only and they are stored in hashmaps

    Here is a start of a basic text based game--it doesn't level or regen characters nor give healing or have new weapons...
    package ForumJunk;
    import java.util.Random;
    import java.util.Scanner;
    public class ForumJunk{
      private final int widthX;
      private final int heightY;
      private int myX;
      private int myY;
      private int myLevel;
      private int baseHP;
      private int myHP;
      private int myTreasure;
      private String[] myWeapon = {"fist", "open hand", "dagger", "short sword", "long sword", "b-sword", "2H sword"};
      private int[] myWeaponMaxDamage = {2, 3, 4, 6, 10, 12, 16};
      private int monsterFillFactor = 40;
      private int[][] monsterLevel = {{1, 1, 1}, {2, 2, 2}, {3, 3, 3}};
      private String[][] monsterName = {{"Skeleton", "Orac", "Kobald"}, {"Zombi", "Wolf", "Giant Rat"}, {"Bandit", "Mummy", "Ghost"}};
      private int[] monsterMaxDamage = {2, 4, 6};
      private myRoom[][] room;
      private Random rand;
      public ForumJunk(){
        widthX  = 100;
        heightY = 100;
        myLevel = 1;
        rand = new Random();
        baseHP   = 16;
        myHP     = baseHP;
        for(int i=0; i<myLevel; i++) myHP = myHP + rand.nextInt(4) + 4;
        room = new myRoom[widthX][heightY];
        for(int i=0; i<widthX; i++)for(int j=0; j<heightY; j++)room[i][j]=new myRoom();
        myX = rand.nextInt(widthX);
        myY = rand.nextInt(heightY);
        myTreasure = 0;
        fillMonster();
      public void doAttack(){
        if(!(room[myX][myY].monster != null)){
          System.out.println("Oh, it must have been my shadow; there's no monsters here \n");
          return; //no monster
        if(rand.nextBoolean()){
         doHumanAttack();
         if(room[myX][myY].monster.hp > 0) doMonsterAttack();
        }else{
          doMonsterAttack();
          doHumanAttack();
      public void doHumanAttack(){
        int weaponIndex = 0;
        if(myLevel<myWeaponMaxDamage.length) weaponIndex = myLevel;else weaponIndex = myWeaponMaxDamage.length-1;
        System.out.println("Attacking with " + myWeapon[weaponIndex] + " ...");
        int damage = myLevel * rand.nextInt(myWeaponMaxDamage[myLevel]);
        room[myX][myY].monster.hp -= damage;
        if(damage>0) System.out.println("Hit for " + damage + " damage\n");
        else System.out.println("I missed!\n");
        if(room[myX][myY].monster.hp <= 0) System.out.println("The " + room[myX][myY].monster.name  + " is dead.");
      public void doMonsterAttack(){
        System.out.println("The " + room[myX][myY].monster.name  + " is attacking...");
        int damage = rand.nextInt(monsterMaxDamage[room[myX][myY].monster.level-1]);
        myHP -= damage;
        if(damage>0) System.out.println("I've been hit for " + damage + " damage\n");
        else System.out.println("It missed me!\n");
        if(myHP<=0){
          System.out.println("Oh no, I'm dead!!!!!");
          System.exit(0);
      public void doStatus(){
        System.out.println();
        System.out.println("  Status:");
        System.out.println("    Room: " + myX + ":" + myY);
        System.out.println("      HP: " + myHP);
        System.out.println("Treasure: " + myTreasure + " gp");
        System.out.println("   Level: " + myLevel);
        System.out.println();
      public void doTreasure(){
        if(!(room[myX][myY].monster != null)){
          System.out.println("What--do you expect it just to be laying around in every room? \n");
          return; //no monster
        if(room[myX][myY].monster.hp>0){
          System.out.println("If there is any treasure that " + room[myX][myY].monster.name + " is guarding it.\n");
          return; //no monster
        myTreasure += room[myX][myY].monster.treasure;
        System.out.println("I found " + room[myX][myY].monster.treasure + " gp\n");
        room[myX][myY].monster = null;
      public void fillMonster(){
        int fill = (widthX * heightY * monsterFillFactor) / 100;
        int x = 0;
        int y = 0;
        boolean gen = false;
        for(int i=0; i<fill; i++){
          gen = true;
          while(gen){
            x = rand.nextInt(widthX);
            y = rand.nextInt(heightY);
            if(!(room[x][y].monster != null)){
              room[x][y].monster = new Monster(rand.nextInt(3)+1);
              gen = false;
      class Monster{
        int level = 0;
        int hp   = 0;
        int treasure = 0;
        String name = "";
        Monster(int level){
          this.level = level;
          hp = 1;
          for(int i = 0; i<level; i++) {
            hp += rand.nextInt(6);
            treasure += rand.nextInt(100);
          name = monsterName[level-1][rand.nextInt(3)];
      class myRoom{
        Monster monster = null;
        //what ever else you want to put in here
      public static void main(String[] args){
        String myIN = "";
        Scanner scan = new Scanner(System.in);
        ForumJunk fj = new ForumJunk();
        System.out.print("I am in room: " + fj.myX + ", " + fj.myY + " I have " + fj.myHP + " hit points and " + fj.myTreasure + " treasure ");
        if(fj.room[fj.myX][fj.myY].monster!=null){
          System.out.println("There is a  " + fj.room[fj.myX][fj.myY].monster.name + " here!");
        System.out.println("\n");
        while(!(myIN=scan.next()).equals("exit")){
          if(myIN.equals("north")){
            fj.myY -=1;
            if(fj.myY<0) fj.myY=fj.heightY-1;
          }else if(myIN.equals("south")){
            fj.myY +=1;
            if(fj.myY==fj.heightY) fj.myY=0;
          }else if(myIN.equals("west")){
            fj.myX -=1;
            if(fj.myX<0) fj.myX=fj.widthX-1;
          }else if(myIN.equals("east")){
            fj.myX +=1;
            if(fj.myX==fj.widthX) fj.myX=0;
          }else if(myIN.equals("attack")){
            fj.doAttack();
          }else if(myIN.equals("weapon")){
            System.out.println("I'll be using my " + fj.myWeapon[fj.myLevel] + " to attack\n");
          }else if(myIN.equals("treasure")){
            fj.doTreasure();
          }else if(myIN.equals("status")){
            fj.doStatus();
        System.out.print("I am in room: " + fj.myX + ", " + fj.myY + " I have " + fj.myHP + " hit points and " + fj.myTreasure + " treasure ");
        if(fj.room[fj.myX][fj.myY].monster!=null){
          System.out.print("There is a ");
          if(fj.room[fj.myX][fj.myY].monster.hp<=0) System.out.print("dead ");
          System.out.println(fj.room[fj.myX][fj.myY].monster.name + " here!");
        System.out.println("\n");
      System.out.println("Bye!");
    }

  • Ideas For A Text-Based Game

    I tried working on Graphics a while ago, but I didn't have too much luck with that ;)
    Just wondering if anyone here has any ideas about a 'fun' text-based game, that wouldn't be really based on RPG style stuff, because I don't really want to bother with having characters save and stuff(I kno how to though...)
    Something like Rock/Paper/Siscors(spelling? lol), but kinda more adicting...oh right, forgot to tell you...idea for a MULTIPLAYER text-based game ;)
    Thanks
    -Been trying to think of a good idea all day, no luck ;)

    Think of an existing exciting game, and make a clone. Thinking of new games is hard.
    Scissors.
    Addicting.

  • Can I install Windows 8 (DEMO) on a MAC and play windows based games ?

    Can I install Windows 8 (DEMO) on a MAC and play windows based games ?

    I installed the Developer beta with Bootcamp Assistant yesterday and was very impressed with the ease of the installation. Unfortunately, and I don't know if this is a problem with my video BIOS on my Macbook Air, but Windows 8 installs with two screens split horizontally - so it's effectively useless.
    I tried 3 times and gave up. The same thing happens with Linux distributions, however with Linux I can pass "nomodeset" on the kernel command line which fixes it. I don't know how to do that in Windows.
    This was happening with both 64x and 32-bit Win8 fwiw.
    Oh, also...when I was trying to play around with Bootcamp.exe inside Windows 8, I remember a message popping up saying Bootcamp is only configurable with Windows 7 ISOs. But aside from the kernel graphics issues and some driver compatibility problems, Bootcamp loaded the Win8 ISOs fine.

  • Help with text based game.

    SO I've just begun to make a text based game and i've already ran into a problem :/
    I've made a switch statement that has cases for each of the classes in the game..for example
    Output will ask what you want to be
    1. Fighter
    2. etc
    3. etc
    case 1: //Fighter
    My problem is i want to be able to display the class
    as in game class not java class
    as Fighter
    That may be a bit confusing to understand sorry if it isn't clear
    Here is my code that i'm using this may help.
    import java.util.Scanner;
    public class main {
         public static void main(String args[]) {
              Scanner input = new Scanner(System.in);
              int health = 0;
              int power = 0;
              int gold = 0;
              System.out.println("Welcome to my game!");
              System.out.println("First of what is your name?");
              String name = input.next();
              System.out.println(name + " you say? Interesting name. Well then " + name + " what is your race?");
              System.out.println();
              System.out.println("Press 1. for Human");
              System.out.println("Press 2. for Elf");
              System.out.println("Press 3. for Orc");
              int Race = input.nextInt();
              switch (Race) {
              case 1: // Human
                   String race = "Human";
                   health = 10;
                   power = 10;
                   gold = 25;
              break;
              case 2: // Elf
                   health = 9;
                   power = 13;
                   gold = 25;
              break;
              case 3: // Orc
                   health = 13;
                   power = 9;
                   gold = 30;
              break;
              default:
                   System.out.println("Invalid choice Please choose 1-3");
              break;
              System.out.println("Now what is your class?");
              System.out.println("Press 1. Fighter");
              System.out.println("Press 2. Mage");
              System.out.println("Press 3. Rogue");
              int Class = input.nextInt();
              switch (Class) {
              case 1: // Fighter
                   health = health + 1;
                   power = power + 1;
                   gold = gold + 1;
              break;
              case 2: // Mage
                   health = health + 1;
                   power = power + 1;
                   gold = gold + 1;
              break;
              case 3: // Rogue
                   health = health + 1;
                   power = power + 1;
                   gold = gold + 1;
              break;
              default:
                   System.out.println("Invalid choice Please choose 1-3");
              break;
              System.out.println("So your name is " + name );
              System.out.println("and your race is: " + race);
              System.out.println("and your class is: " + Class);
    }Thanks in advance!

    Brushfire wrote:
    So you're advising him to run his console based game on the EDT, why?Far King good question... To which I suspect the answer is "Ummm... Ooops!" ;-)
    @OP: Here's my 2c... if you don't follow then ask good questions and I'll consider giving good answers.
    package forums;
    import java.util.Scanner;
    abstract class Avatar
      public final String name;
      public int type;
      public int health;
      public int power;
      public int gold;
      protected Avatar(String name, int health, int power, int gold) {
        this.name = name;
        this.health = health;
        this.power = power;
        this.gold = gold;
      public String toString() {
        return "name="+name
             +" health="+health
             +" power="+power
             +" gold="+gold
    class Human extends Avatar
      public Human(String name) {
        super(name, 10, 11, 31);
    class Elf extends Avatar
      public Elf(String name) {
        super(name, 9, 13, 25);
    class Orc extends Avatar
      public Orc(String name) {
        super(name, 6, 17, 13);
    interface AvatarFactory
      public Avatar createAvatar();
    class PlayersAvatarFactory implements AvatarFactory
      private static final Scanner scanner = new Scanner(System.in);
      public Avatar createAvatar() {
        System.out.println();
        System.out.println("Lets create your avatar ...");
        String name = readName();
        Avatar player = null;
        switch(readRace(name)) {
          case 1: player = new Human(name); break;
          case 2: player = new Elf(name); break;
          case 3: player = new Orc(name); break;
        player.type = readType();
        return player;
      private static String readName() {
        System.out.println();
        System.out.print("First off, what is your name : ");
        String name = scanner.nextLine();
        System.out.println(name + " you say? Interesting name.");
        return name;
      private static int readRace(String name) {
        System.out.println();
        System.out.println("Well then " + name + ", what is your race?");
        System.out.println("1. for Human");
        System.out.println("2. for Elf");
        System.out.println("3. for Orc");
        while(true) {
          System.out.print("Choice : ");
          int race = scanner.nextInt();
          scanner.nextLine();
          if (race >= 1 && race <= 3) {
            return race;
          System.out.println("Bad Choice! Please try again, and DO be careful! This is important!");
      private static int readType() {
        System.out.println();
        System.out.println("Now, what type of creature are you?");
        System.out.println("1. Barbarian");
        System.out.println("2. Mage");
        System.out.println("3. Rogue");
        while(true) {
          System.out.print("Choice : ");
          int type = scanner.nextInt();
          scanner.nextLine();
          if (type >= 1 && type <= 3) {
            return type;
          System.out.println("Look, enter a number between 1 and 3 isn't exactly rocket surgery! DO atleast try to get it right!");
    public class PlayersAvatarFactoryTest {
      public static void main(String args[]) {
        try {
          PlayersAvatarFactoryTest test = new PlayersAvatarFactoryTest();
          test.run();
        } catch (Exception e) {
          e.printStackTrace();
      private void run() {
        AvatarFactory avatarFactory = new PlayersAvatarFactory();
        System.out.println();
        System.out.println("==== PlayersAvatarFactoryTest ====");
        System.out.println("Welcome to my game!");
        Avatar player1 = avatarFactory.createAvatar();
        System.out.println();
        System.out.println("Player1: "+player1);
    }It's "just a bit" more OOified than your version... and I changed random stuff, so you basically can't cheat ;-)
    And look out for JSG's totally-over-the-top triple-introspective-reflective-self-crushing-coffeebean-abstract-factory solution, with cheese ;-)
    Cheers. Keith.
    Edited by: corlettk on 25/07/2009 13:38 ~~ Typo!
    Edited by: corlettk on 25/07/2009 13:39 ~~ I still can't believe the morons at sun made moron a proscribed word.

  • How do I stop "delete cookies" from deleting saved games of a flash based game?

    I'm running Firefox 4 under Windows 7.
    I have it currently set to delete my history when I end the session, including cookies and temporary files. This is due to privacy concerns.
    However, I also have a (downloaded - not run online or via a browser) flash based game on my computer - which saves games as LSOs.
    Firefox therefore deletes my saved games when I exit.
    How can I address my privacy concerns and still play this game?

    I am having a problem where my flash game saves are deleting themselves on their own. I don't even have to clear browsing history, and I do not have any cleaning software installed. I have set storage to unlimited and that worked for a few days but I loaded a game this evening and my save file was gone and the storage had been reset to 100kB. I haven't touched anything, haven't deleted anything. It's infuriating.

Maybe you are looking for

  • How to determine the number of messages in a queue, that ...

    Hi, what's the proper way to count the number of the messages in an Advanced Queue that are currently visible to consumers? Currently we use: select count(*) from aq$queue_tab_name q where q.QUEUE = 'Q_NAME'; The problem with that approach: If one co

  • Connection to internet using BT dongle

    Can anyone let me know how to connect to internet from laptop using dongle on BT mobile. I get the message that there is a connection but for some reason it wont connect to internet. Am getting the blue light flashing on the dongle. Wi Fi works well

  • Steps for reversing the reversal document

    Hello Everyone, Automatic payment has been made however bank had confirmed that it was unsuccessful due to technical reason hence payment document KZ was reversed.Next day bank confirmed that payment was successful. Payment document KZ needs to be re

  • How to suppress default alert in form 6i

    Hi all I am Working on form 6i Help me ... How can i Suppress default alert with my alerts??? thanks....

  • How to use navigationmethod byEPCM with navigation tag libraries?

    Hi, we have created our own Top Level Navigation component which implements a hover meny for level 3-5. The menu works great when navigationmethod in the anchor is set to "byURL": <nav:navNodeAnchor navigationMethod="byURL" anchorAttributes="class='L