Tile Based Collision Detection

I am following Tonypa's Tile Based Tutorials and I have to
say, they are great. He covers everything needed, except for one
thing I am troubled on - Refering to Tutorial 9,
http://www.tonypa.pri.ee/tbw/tut09.html,
Stupid Enemy, instead of an enemy I want to make this a NPC who
walks around in a village. So what do I do to make it so that I, or
the char, doesn't walk right over the enemy/NPC? I am trying to
develop an RPG, and it would look silly to have the character walk
on top of the NPC. Can someone provided a snippet on how to make a
collision detection with the NPC and not walk on top/under the NPC?
One last favor to ask: What if I want to talk to the NPC if I
am within a half tile? Would anyone be willing to share info on how
this as well?
Thanks a bunch in advance

Ok, let me see if I get the read correct here: you have your scenery objects as tiles and when moving your players/NPC's through the scenery you are not scrolling the background as you go, but when you get to s certain point you want to scroll the tiles of the background also, so you can have new scenery cycle in as needed an still have the tiled background objects and new tiled background objects work for collision detection.
If my take on your project is correct, then you have to make your tiles addressed with relative addressing formulas as you'll probably need to do with your sprites also.
So the way this will go is that you have to make an offset and add them into your formula based on your character position. Then based on your character position you can choose to scroll your tiles left, right, up, down or what ever you choose to support. As a tile falls fully off the screen, you can dispose of it or cycle back through depending on how you implement your background.

Similar Messages

  • 2D Pixel Collision detection on XML tiled map

    Hello,
    I'm designing a game where the player can move through a city composed of 2D image tiles. Right now we have successfully got the pixel collision detection to work on a large single image consisting of an invisible mask image and a visible image that shows a cluster of buildings and objects. The mask overlays the visible buildings and blocks / allows movement based on the color of the mask. Black is a collision, white is open space, etc.
    But this technique won't work for the game, since there will be many cities and vastly larger than this little testbed. I cannot create multiple huge cities into one file - the file would be several megs large, and I'm looking at dozens of cities.
    My idea is to create tiled maps, which will save the coordinates for the various building/object tiles in an XML file. However, I do not know how to make the collision detection work with such a tiled map. Moreover, I don't know if constructing a mosaic city using XML coordinates is the best way to go - I'm open for suggestions. My goal is to simply be able to assemble a city from individual tiles of buildings and masks, and drive/walk my character through the city with pixel collision detection, without using the current setup of a single image and a single mask.
    Any advice/suggestions offered will be GREATLY appreciated! This is our first Java project, but hopefully we can make this work.
    Thank you so much!
    Message was edited by:
    Gateway2007 - clarifying that this is a collision detection based on pixels, not planes or other method.

    Sound like this might be too late of a suggestion, but have you looked at Slick at all?
    http://slick.cokeandcode.com/static.php?page=features
    It might help with the tiling and collision aspects.

  • KeyPressed / collision detection

    I have a tile based platformer I am making and am having some trouble with the collision detection. I have it so that the game detects a collision before it actually occurs so that it wont happen in the game. However, it only appears to works right if i tap the arrow key into the wall, and if i hold the arrow key down i fly right through the tile until i let go (if i let go inside a block the hero gets stuck because it detects a collision anywhere i try to move after that). At this time i had the new coordinate to detect collision based on which direction i was moving gotten from keyPressed. Since this didnt work (assumed it was because the game loop and keyPressed dont take turns performing their actions) I made the new coordinate collision be detected from a method called in the main game loop and the result was that if I held down the key and flew into a wall, it doesnt stop exactly at the right spot (but I cant go through an entire row of tiles) but when I go the opposite direction from the collision (open space should work fine) it works fine until a point where in mid air it acts like a collision occured.
    I have tried very hard to find the error in my code concerning the collision detection and need to make sure these problems arent a result of limitations of keyPressed or something, but rather just the code i've written

    ok well I now have it set up so that before the hero moves it checks to see if the move is valid from each pixel starting at the hero to the length the hero moves in 1 directional press (using a rectangle that is the size of the hero, then has width 1 pixel larger etc until reaches the length of a move). The collision detection method returns true if there is a collision at any point, false otherwise. I tried to put the method in both the keyPressed method (for each case of a directional key pressed) as well as in the main game loop (not both at the same time) and neither worked perfectly and both worked about the same. Now the problem is that as long as the hero approaches the tile from a far away distance it works perfectly (a tile is 40 pixels in width and hero is 30), it appears that if the hero approaches from around 40 pixels out it will work but anything less and it will go through the tile as far from the 40 pixel mark it started (ie if hero starts at 37 pixels from tile and moves, it will go through the tile 3 pixels) then it can only travel back to the position it started even if there is no collision detected. Again, it appears that the hero must be about 40 pixels out (not sure if this is coincidence or it is exactly the length of the tile for a reason). Really can't figure this out, dont think there is a problem with the code i have written but probably i'm approaching the solution wrong

  • URGENT: Collision Detection In Tiled Map

    HELP!!!!! I am creating a tile map of size 32*32. And the character image size is also 32*32. Now i am stuck in making collision with the walls. I have tried my own method but to no avail. Has anyone tried to doing collision detection? Need a simple logic method to detect the collision...
    (Using keyevent to control the character moving around)
    Pls I really appreciate your help!!!!!!!
    Thanks.....

    I assume you have some way of knowing that you need to display a wall tile on the map, so before you move a particular direction check to see if the square you will move to is an acceptable move (no wall, door, mountain, water etc). If it is unacceptable play a little sound or display a message, otherwise do the move.

  • Good collision detection?

    I have been looking into quadtrees since it is a way to detect collisions. Is there another better way to do this? My game also has a system of sorting sprites in an array based on there relative locations on the map. ie: my character can appear in front of a tree or behind it. I have a complex system to do this which tests polygons however I was wondering if there is an expert way to do this.

    well my tank game has two levels of collision detection. Well, I guess in a way it handles all the items in 3 levels.
    First level, I have a Vector storing the items on the screen. They're only evaluated in any way if they're in the Vector. I refresh that vector every 10 frames by testing all the objects in the game to see if they're in a rectangle that surrounds the screen.
    After that, to check collisions I have a simple distance formula check that finds the distance between the centers of two objects (ie. bullet and tank) and compares them to the sum of the largest dimensions (width for both) to see if they're close enough to collide.
    If that check returns true, it calls a third level of collision checking. This check intersects the areas I've created from polygons that outline my objects. This way even if they're rotated in any way, the check only returns true if there's an honest to goodness real accurate collision. This check takes much longer than the previous one, but since it has the first check behind it, this check isn't called very often.

  • Collision Detections in Tilemaps

    I need some help with collision detection with tilemaps. I have the following code for the tilemap:
    import java.awt.*;
    public class TileMap {
         final int EMPTY = 0;
         final int WALL = 1;
         private static final int WIDTH = 30;
         private static final int HEIGHT = 40;
         public static final int TILE_SIZE = 15;
         private int[][] map = new int[WIDTH][HEIGHT];
         public TileMap() {
              for (int i=0;i<HEIGHT;i++) {
                   map[0] = WALL;
                   map[29][i] = WALL;     
              for (int i=0;i<WIDTH;i++) {     
                   map[i][0] = WALL;
                   map[i][39] = WALL;
         public void paint(Graphics g) {
              for (int x=0;x<WIDTH;x++) {
                   for (int y=0;y<HEIGHT;y++) {
                        if (map[x][y] == WALL) {
                             g.setColor(Color.RED);
                             g.fillRect(x*TILE_SIZE,y*TILE_SIZE,TILE_SIZE,TILE_SIZE);
    Im finding it hard to find a good tutorial on simple collision detection. Can anyone explain how i would work out some simple collision detection. For example, lets say there is one sprite, how would i figure out which tile the sprite is on? How would i detect the next sprite? Just need the concept.
    Thanks very much.
    Edited by: Java_Jenius on Jun 28, 2009 8:34 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Take a look at http://www.13thmonkey.org/~boris/jgame/ for example.
    It is an open source gaming engine and features sprites and collision detection.

  • Collision detection with rectangles

    Hi, I'm making a racing game from the top view. My track is made up of many gif files, each connecting to each other. My cars are also gif files, and the player's car doesn't move, it can only rotate by displaying gif files of the car in different angles. Only the track moves to create the effect of the car moving. I am having trouble with the collision detection when the car hits the side of the road and when it hits other cars. I've looked at the discussion by JTeen but my car are rectangles, not circles. Could someone please help me with the following:
    1. What is the best system to define the boundary of the road in the gif files.
    2. Should I use the 4 verties of the player's car to detect the collisions and change the co-ordinates whenever I rotate the car.
    3. My tracks are never actually curved, they are made up of multiple straight lines to create a turn. Should I use the slope of these lines and then create an equation for the lines for the detection?

    sure.
    btw this isn't the way of doing it, its simply a way of doing it.
    In a Sector based track, the track is represented as 2 polygons.
    An inner track edge, and an outer track edge.
    Both polygons have the same number of verticies.
    a screen shot from my track editor would probably explain it better than words... http://www.pkl.net/~rsc/4KApplet/editorGrab.png
    As the car goes around the track, you keep track of which sector it is in by doing a line intersection with either the nextSector or prevSector.
    The code will look something like this [taken from the 4KApplet]
                      //check for entry into the next sector
                      while(Line2D.linesIntersect(x,y,newX,newY,
                            trackX[RIGHT][newNext], trackY[RIGHT][newNext],
                            trackX[LEFT][newNext], trackY[LEFT][newNext]))
                         // if you do enter the next sector, this must loop, until you stop going forward in sectors
                         // if this loop wasn't here, a fast traveling car could potencially jump out of its current sector
                         if(newNext==1) lapChange--;//if the car passes the start/finish line, set the lapChange flag
                         newPrev = newNext; //newPrevious sector is now the old Next sector
                         newNext = (newNext+1)%SEGMENT_COUNT; //and the new next sector is the old next sector +1 (modded for track looping)
                         checkPrevious=false; //the car is going forward, so don't check previous sector gate line
                      if(checkPrevious)
                         //does same as above, but for previous sector
                         while(Line2D.linesIntersect(x,y,newX,newY,
                               trackX[RIGHT][newPrev], trackY[RIGHT][newPrev],
                               trackX[LEFT][newPrev], trackY[LEFT][newPrev]))
                            if(newPrev==1) lapChange++; //if the car is going backward, increment the lapCounter
                            newNext = newPrev;
                            newPrev = (newPrev + (SEGMENT_COUNT-1))%SEGMENT_COUNT;//backward looping by using mod as well :) didn't work this out until now!!
                      }Once you have determined which sector the car is in, you must then do 2 more line intersections to determine if the side of the track has been hit.
    In a Collision Map based track[n], you pre-calculate the 'inside-ness' of each pixel before hand and store it all in a [][], then, whenever you move the car, you simply look into the collisionMap [][] to see if the new point is track or wall.
    This has the advantage that you don't need to keep track of which sector the player is in (though you still have to do 1 line intersection to determine if the start/finish line has been crossed)

  • Simple Grid/Tile based layout

    I am trying to create a simple game, where there is the human controlled character and some enemy placed in a maze. When you take one move, the enemy takes one move, until he reaches you or you reach the exit.
    What I'm having trouble figuring out is how I can lay all this out.
    What I'm envisioning is a 2 dimensional array, with each position either a 0 or 1 depending on if the user can move there or not.
    Is there a way in java to implement a grid style playing field, such that the player moves from tile to tile, and incoporate collision detection with the use of the array values?
    I could realy use some help here, I was thinking of using a layout manager, but I don't think the two ideas are compatible. Please help!

    Assuming your not going to use a special-purpose gaming library, you'll probably have to build most from scratch.
    A simple way of doing it would probably be to to create a 2-dimensional Tile array, in which Tile is a class you'll write yourself to hold all relevant information (painting info, wether it can be moved to, etc).
    If you're going for a 'square' looking game (as opposed to isometric) you might be able to use GridLayout to some extent. But in that case (or when using any other layout manager) your Tiles will have to subclass Component. My guess is that it will quickly become more work to cram everything into Component-shape than it's worth...
    Short skeleton-example of what I might do:
    public class Game extends JFrame {
        private Tile[][] tiles;
        private Monster[] monster;
        private Player player;
        private GameCanvas canvas;
        public Game() {
            canvas = new GameCanvas();
            add(canvas);
            //other initialization, listeners, etc.
        //you could call something like this when you detect user input that implies a move
        private void move(int x, int y) {
            if (tiles[x][y].isPassable()) {
                player.moveTo(x, y);
                for (int i = 0; i < monsters.length; i++) {
                    monsters.makeMove();
    canvas.repaint();
    } else {
    //inform user that he can't move to (x, y)
    private static class GameCanvas extends JPanel {
    public void paintComponent(Graphics g) {
    for (int i = 0; i < tiles.length; i ++) {
    for (int j = 0; j < tiles[i].length; j++) {
    //OtherPaintingInfo is stuff like coordinates, width, height, etc.
    //All of that more or less depends on how you want tiles to look
    tiles[i][j].paint(Graphics g, OtherPaintingInfo I);
    //do something similar for monsters and player
    private static class Tile {
    boolean isPassable() { ... }
    //Again, OtherPaintingInfo is just a placeholder for anything your impl. needs
    void paint(Graphics g, OtherPaintingInfo I() { ... }

  • Events Triggered By Collision Detection In Shockwave 3D Environment Happen More Than Once?

    Okay, I've finally managed to get my Director 3D game to move an object to a new random position when collision detection occurs with that object! HOWEVER, sometimes it will work as expected and other times the object seems to move SEVERAL times before settling. Anyone have any idea why it isn't always just moving once and settling as I'd hoped it would...?
    To see an example of the problem I'm facing, create a new Director movie then insert a new Shockwave 3D media element into that Director movie named "Scene" and apply the below code to that 3D media element. I've tried to trim the code down as much as possible to get right to the heart of the problem:
    =====
    property Scene  -- reference to 3D cast member
    property pSprite    -- referebce to the 3D sprite
    property pCharacter -- reference to the yellow in the 3D world
    property pTransformgreen01Flag -- reference to the flag which will trigger action to move green01 + increase score on collision
    property pTransformgreen02Flag -- reference to the flag which will trigger action to move green02 + increase score on collision
    on beginSprite me
      -- initiate properties and 3D world
      pSprite = sprite(me.spriteNum)
      Global Scene
      Scene = sprite(me.spriteNum).member
      Scene.resetWorld()
      Tempobjres = Scene.newmodelresource("sphereRES", #sphere)  --create sphere modelresource
      Tempobjres.radius = 10     --set sphere modelresrource radius to 20
      Tempobjres.resolution = 17   --set the sphere modelresource resolution to 17
      Tempobj = scene.newmodel("yellow", tempobjres)   --create a model from the sphere modelresource
      Tempshader = scene.newshader("sphereshd", #standard)   --create a new standard shader
      Tempshader.diffuse = rgb(250,250,10)   --set the diffuse color (in this case, a light green)
      Tempshader.texture = void   --set the texture of the shader to void
      Tempobj.transform.position=vector(0,0,0)
      Tempobj.shaderlist = tempshader   -- assign the shader to the model
      Tempobjres1 = Scene.newmodelresource("sphereRES1", #sphere)  --create sphere modelresource
      Tempobjres1.radius = 10     --set sphere modelresrource radius to 20
      Tempobjres1.resolution = 17   --set the sphere modelresource resolution to 17
      Tempobj1 = scene.newmodel("green01", tempobjres1)   --create a model from the sphere modelresource
      Tempshader1 = scene.newshader("sphereshd1", #standard)   --create a new standard shader
      Tempshader1.diffuse = rgb(100,200,50)   --set the diffuse color (in this case, a light green)
      Tempshader1.texture = void   --set the texture of the shader to void
      Tempobj1.transform.position = vector(25,25,0)
      Tempobj1.shaderlist = tempshader1   -- assign the shader to the model
      Tempobjres2 = Scene.newmodelresource("sphereRES2", #sphere)  --create sphere modelresource
      Tempobjres2.radius = 10     --set sphere modelresrource radius to 20
      Tempobjres2.resolution = 17   --set the sphere modelresource resolution to 17
      Tempobj2 = scene.newmodel("green02", tempobjres2)   --create a model from the sphere modelresource
      Tempshader2 = scene.newshader("sphereshd2", #standard)   --create a new standard shader
      Tempshader2.diffuse = rgb(100,200,50)   --set the diffuse color (in this case, a light green)
      Tempshader2.texture = void   --set the texture of the shader to void
      Tempobj2.transform.position = vector(-25,-25,0)
      Tempobj2.shaderlist = tempshader2   -- assign the shader to the model
      --the following lines will add collision detection for all three on-screen 3D objects
      Tempobj.addModifier(#collision)
      Tempobj.collision.enabled=true
      Tempobj1.addModifier(#collision)
      Tempobj1.collision.enabled=true
      Tempobj2.addModifier(#collision)
      Tempobj2.collision.enabled=true
      Tempobj.collision.resolve=true
      Tempobj1.collision.resolve=true
      Tempobj2.collision.resolve=true
      --the following lines will tell Director what to do with a specific object when it collides with another
      Tempobj.collision.setCollisionCallBack(#beepsound, me)
      Tempobj1.collision.setCollisionCallBack(#hitgreen01, me)
      Tempobj2.collision.setCollisionCallBack(#hitgreen02, me)
      pCharacter = Scene.model("yellow")
      -- we must define pCharacter after we use the resetWorld() command
      -- otherwise this variable object will be deleted
      createCollisionDetect
      pTransformgreen01Flag = false
      pTransformgreen02Flag = false
    end
    on createCollisionDetect
      Global Scene
      -- add collision modifier to the character
      pCharacter.addmodifier(#collision)
      -- set bounding geometry for collision detection to bounding box of model
      pCharacter.collision.mode = #mesh
      -- resolve collision for character
      pCharacter.collision.resolve = TRUE
    end
    on keyDown
      Global Scene
      case(chartonum(the keypressed)) of
        30: --up arrow
          scene.model("yellow").translate(0,5,0)
        31: --down arrow
          scene.model("yellow").translate(0,-5,0)
        28: --left arrow
          scene.model("yellow").translate(-5,0,0)
        29: --right arrow
          scene.model("yellow").translate(5,0,0)
      end case
    end
    --when "yellow" (player character) hits another object, this will happen:
    on beepsound me, colData
      beep --plays sound
    end
    --when "green01" is hit by another object, this will happen:
    on hitgreen01 me, colData
      Global Scene
      pTransformgreen01Flag=true
    end
    --when "green02" is hit by another object, this will happen:
    on hitgreen02 me, colData
      Global Scene
      pTransformgreen02Flag=true 
    end
    on enterFrame me
      Global Scene
      if pTransformgreen01Flag then
        --the following lines will generate new random x and y co-ordinates for green01
        randomx=random(-110,110)
        green01x=randomx
        randomy=random(-90,90)
        green01y=randomy
        Scene = member("Scene")
        Scene.model("green01").transform.position = vector(green01x,green01y,0)
        pTransformgreen01Flag = false
      end if
      if pTransformgreen02Flag then
        --the following lines will generate new random x and y co-ordinates for green02
        randomx=random(-110,110)
        green02x=randomx
        randomy=random(-90,90)
        green02y=randomy
        Scene = member("Scene")
        Scene.model("green02").transform.position = vector(green02x,green02y,0)
        pTransformgreen02Flag = false
      end if
    end
    =====
    I imagine the part that's causing the issue is the "on enterFrame me" part at the end, but can't see any reason why it wouldn't just perform the desired action ONCE every time...?
    This is really confusing the hell out of me and is pretty much the final hurdle before I can call my game "finished" so any and all assistance would be GREATLY appreciated!

    You can get yourself a used copy of my book http://www.amazon.com/Director-Shockwave-Studio-Developers-Guide/dp/0072132655/ for $0.82 + shipping.  Chapter 14 contains 33 pages which deal specifically with the vagaries of the collision modifier.
    You can download just the chapter on Collision Detection from http://nonlinear.openspark.com/book/Collisions.zip.  This includes the demo movies and the unedited draft of the text for the chapter.
    Perhaps you will find this useful.

  • Camera Collision Detection - Is It Possible?

    Hi,
    I am making a 3D RPG game and I would like to know if it is possible to get collision detection on a camera created in Adobe Director 11.  I have my 3D character running through an underground maze and he detects correctly on the walls of the maze.  However, I also have a camera as a child to the character so this moves with him.  I have added a bounding-box to this camera but it still doesn't detect whereas the gunBB works fine, as does the characterBB.
    This is really confusing and I don't know what I am doing wrong.  Any help would be really appreciated!
    Thanks, Phil.

    Thanks for the reply.  It is not exactly what I am looking for as the script is different than the style I am using.  This is the script I have got so far, I have also added an extra camera to view what is happening.
    property pSprite, p3Dmember -- reference to the 3D member
    --property pLevel, maze -- Level
    --property pLeftArrow, pRightArrow, pDownArrow, pUpArrow -- arrow keys
    --property pCharacter -- character in the 3D world
    --property pTofuBB, pGunBB, gun --  character + gun
    --property gUseGun, hasGun
    --property pCamera, pCameraBoundingBox --camera and bounding box
    --property barrier,mountains,exitmaze
    --property door1, door2, turret, turretgun
    --property keylist, keypresslist -- for keys pressed
    --on beginSprite me
    --  -- define the 3D cast member
    --  p3Dmember = sprite(me.spriteNum).member
    --  -- reset the 3D world
    --  p3Dmember.resetWorld()
    --  pSprite = sprite(me.spriteNum)
    --  pCamera = pSprite.camera
    --  -- define level as 3DS level Plane - must all be defined after resetWorld()
    --  pLevel = p3Dmember.model("landscape")
    --  mountains = p3Dmember.model("mountains")
    --  turret = p3Dmember.model("turret")
    --  turretgun = p3Dmember.model("turretgun")
    --  maze = p3Dmember.model("maze")
    --  exitmaze = p3Dmember.model("exitmaze")
    --  pCharacter = p3Dmember.model("hero")
    --  gun = p3Dmember.model("gun")
    --  barrier = p3Dmember.model("barrier")
    --  door1 = p3Dmember.model("door1")
    --  door2 = p3Dmember.model("door2")
    --  -- stop hero walking biped animation
    --  pCharacter.bonesPlayer.pause()
    --  -- below for key control
    --  keylist = []
    --  keypresslist = []
    --  -- this sets up a list of keycodes to track.
    --  -- this code covers the arrow keys only, it could be changed to cover a full range of keys
    --  repeat with i = 123 to 126
    --    keylist[i] = i -- this creates a list of keycodes to track
    --    keypresslist[i] = 0 -- this creates a "last state" list that corresponds to the keycode.
    --    --keypresslist tracks the last known state of that key, so we can tell when a keypress has changed.
    --  end repeat
    --  -- key control end
    --  createBoundingBoxes
    --  createLight
    --end
    -- code used to create bounding boxes
    --on createBoundingBoxes
    --  -- create tofu bounding box for character
    --  tofuBB_MR = p3Dmember.newModelResource("tofuBox",#box)
    --  tofuBB_MR.height = 235
    --  tofuBB_MR.width = 235
    --  tofuBB_MR.length = 500
    --  pTofuBB = p3Dmember.newModel("tofuBox",tofuBB_MR)
    --  pTofuBB.worldPosition = pCharacter.worldPosition
    --  -- create parent child relationships
    --  pCharacter.addChild(pTofuBB, #preserveWorld)
    --  invisShader = p3Dmember.newShader("invisShader",#standard)
    --  invisShader.transparent = TRUE
    --  invisShader.blend = 50
    --  pTofuBB.shaderlist = p3Dmember.shader("invisShader")
    --  pCamera = p3Dmember.newCamera("camera")
    --  frontCam = p3Dmember.newCamera("frontCam")
    --  frontCam.fieldOfView = 35
    --  frontCam.transform.position = vector(-14150,-3100,-600)
    --  frontCam.transform.rotation = vector(90,0,180)
    --  pSprite.camera = p3Dmember.camera("frontCam")
    --  pCamera.fieldOfView = 75
    --  pCamera.transform.position = vector(500,1800,450) --450
    --  pCamera.transform.rotation = vector(90,0,180)
    --  pSprite.camera = p3Dmember.camera("camera")
    --  cameraModRes = p3Dmember.newModelResource("cameraModRes",#sphere)
    --  cameraModRes.radius = 200
    --  pCameraBoundingBox = p3Dmember.newModel("CameraBoundingBox",cameraModRes)
    --  pCameraBoundingBox.worldPosition = pCamera.worldPosition
    --  pCameraBoundingBox.shaderList = p3Dmember.shader("invisShader")
    --  pCamera.addChild(pCameraBoundingBox, #preserveWorld)
    --  pCharacter.addChild(pCamera,#preserveWorld)
    --  -- create gun bounding box
    --  gun.worldposition.z = gun.worldposition.z + 200
    --  gunMR = p3Dmember.newModelResource("gunSphere",#sphere)
    --  gunMR.radius = 218
    --  pGunBB = p3Dmember.newModel("gunSphere", gunMR)
    --  pGunBB.worldPosition = gun.worldPosition
    --  pGunBB.shaderList = p3Dmember.shader("invisShader")
    --  pGunBB.addChild(gun, #preserveWorld)
    --end
    -- code below used to light up level
    --on createLight
    --  -- create a point 'bulb' type light
    --  p3Dmember.newLight("Bulb Light", #point )
    --  -- position the light
    --  p3Dmember.light("Bulb Light").transform.position = vector(0,0,100)
    --  -- define light color and intensity
    --  p3Dmember.light("Bulb Light").color = rgb(255,255,255)
    --  -- Make the character model a parent of the light
    --  -- Bulb Light becomes a child of pCharacter
    --  -- This is done so that the light will always move
    --  -- with the character.
    --  pCharacter.addChild(p3Dmember.light("Bulb Light"),#preserveParent)
    --end
    --on keyUp me
    --  --pCharacter.bonesPlayer.pause()
    --  --if keypressed("s")
    --end
    --on keydown me
    --  if keypressed("c") then changeCamera
    --end
    --on changeCamera
    --  -- check the sprites camera and switch
    --  if pSprite.camera = p3Dmember.camera("frontCam") then
    --     pSprite.camera = p3Dmember.camera("camera")
    --     else
    --     pSprite.camera = p3Dmember.camera("frontcam")
    --     end if
    --end
    --on exitFrame me
    -- below detects which keys are pressed
    --repeat with i = 1 to keylist.count
    --inewstate= keypressed( keylist[i] )
    --if keypresslist[i] <> inewstate then -- this means the key changed status from whether it's up or down
    --if inewstate= 0 then
    -- they key was released
    --keyLastReleased = keylist[i]
    --if (keyLastReleased=123) then pLeftArrow = 0 -- 123 = left arrow key
    --if (keyLastReleased=124) then pRightArrow = 0 -- 124 = right arrow key
    --if (keyLastReleased=125) then
    --pDownArrow = 0 -- 125 = down arrow key
    --pCharacter.bonesPlayer.pause()
    --end if
    --if (keyLastReleased=126) then
    --pUpArrow = 0 -- 126 = up arrow key
    --pCharacter.bonesPlayer.pause()
    --end if
    --else
    -- the key was pressed
    --keyLastPressed = keylist[i]
    --if (keyLastPressed=123) then pLeftArrow = 1 -- 123 = left arrow key
    --if (keyLastPressed=124) then pRightArrow = 1 -- 124 = right arrow key
    --if (keyLastPressed=125) then pDownArrow = 1 -- 125 = down arrow key
    --if (keyLastPressed=126) then pUpArrow = 1 -- 126 = up arrow key
    --end if
    --keypresslist[i] = inewstate-- update so we remember its new state.
    --end if
    --end repeat
    -- by the time this repeat loop has finished, keypresslist will contain a complete index of what keys
    -- are held down, and which aren't.
    -- Note: most keyboards have a limit on how many keys they'll track simultaneously.
    --checkCollisions
    --characterMove
    -- gun collision start
    --if gUseGun = TRUE then
    --pTofuBB.addChild(pGunBB,#preserveParent)
    --pGunBB.worldPosition = pTofuBB.worldPosition
    --pGunBB.worldPosition.z = 500
    --pGunBB.worldPosition.x = pCharacter.worldPosition.x - 150 --50
    ---pGunBB.worldPosition.y = -860
    --pGunBB.rotate(0,0,-240)
    --pCharacter.bonesPlayer.pause()
    --gUseGun = FALSE
    --hasGun = TRUE
    --end if
    -- gun collision end
    --end
    --on characterMove
    -- if the right arrow is pressed,
    -- rotate the character 5 degrees about the z-axis
    --if pRightArrow then
    -- rotate character and camera
    --pCharacter.rotate(0,0,-2)
    --end if
    --if the left arrow is pressed,
    -- rotate character -5 degrees about the z-axis
    --if pLeftArrow then
    --pCharacter.rotate(0,0,2)
    --end if
    -- if the up arrow is pressed,
    -- move the character 5 pixels along the y-axis
    --if pUpArrow then
    --if (pcharacter.bonesPlayer.playing = 0) then
    --pCharacter.bonesplayer.loop = true
    --if (_key.shiftDown) then
    --pCharacter.bonesPlayer.playRate = 2
    --if (hasGun = TRUE) then -- running
    --pCharacter.bonesplayer.play("hero", 1, 6270, 8330, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 2067, 4130, 1)
    --end if
    --else
    --pCharacter.bonesPlayer.playRate = 1
    --if (hasGun = TRUE) then -- walking
    --pCharacter.bonesplayer.play("hero", 1, 4200, 6200, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 0, 2000, 1)
    --end if
    --end if
    --end if -- bonesPlayer playing
    --if (_key.shiftDown) then
    --pCharacter.translate(120,0,0)
    --else
    --pCharacter.translate(50,0,0)
    --end if
    --end if
    -- if the down arrow is pressed,
    -- move the character -5 pixels along the y-axis
    --if pDownArrow then
    --if (pcharacter.bonesPlayer.playing = 0) then
    --pCharacter.bonesplayer.loop = true
    --if (_key.shiftDown) then
    --pCharacter.bonesPlayer.playRate = 2
    --if (hasGun = TRUE) then -- running
    --pCharacter.bonesplayer.play("hero", 1, 6270, 8330, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 2067, 4130, 1)
    --end if
    --else
    --pCharacter.bonesPlayer.playRate = 1
    --if (hasGun = TRUE) then -- walking
    --pCharacter.bonesplayer.play("hero", 1, 4200, 6200, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 0, 2000, 1)
    --end if
    --end if
    --end if -- bonesPlayer playing
    --if (_key.shiftDown) then
    --pCharacter.translate(-120,0,0)
    --else
    --pCharacter.translate(-50,0,0)
    --end if
    --end if
    -- floor collision
    --thisPosn = pTofuBB.worldPosition
    -----thisPosn.z = 1000
    --tModelList = [pLevel, maze, door1, door2] -- removed wall as its no longer on level
    --tOptionsList = [#levelOfDetail: #detailed, #modelList: tModelList]
    --thisData = p3Dmember.modelsUnderRay(thisPosn,vector(0,0,-1),tOptionsList)
    --if thisData.count then
    --totalCount = thisData.count
    --repeat with dataIndex = 1 to totalCount
    --terrainPosn = thisData[dataIndex].isectPosition
    --- if (thisData[dataIndex].model = pLevel) then
    --tDiff = (terrainPosn.z - pTofuBB.worldPosition.z) + 375
    --pCharacter.translate(0,0,tDiff,#world)
    --exit repeat
    --end repeat
    --end if
    --end
    --on checkCollisions
    --tModelList = [pGunBB, barrier, mountains, maze, exitmaze, turret, turretgun]
    --tOptionsList = [#maxNumberOfModels: 2, #levelOfDetail: #detailed, #modelList: tModelList, #maxDistance: 300]
    -- make 4 rays around character checking for collisions, 90 degrees apart
    --repeat with i = 1 to 18
    --pCharacter.rotate(0,0,20,#self)
    --returnData = p3Dmember.modelsUnderRay(pCharacter.worldPosition,pCharacter.transform.xAxis,tOptionsList )
    --if (returnData.count) then
    -- first in array is closest
    --checkObjectFoundDistance(returnData[1])
    --end if
    --end repeat
    --end
    --on checkObjectFoundDistance thisData -- check distance from collision with objects
    --dist = thisData.distance
    -- check if distance is less than width of bounding box
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"barrier":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"mountains":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"maze":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"exitmaze":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"turret":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"turretgun":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --end

  • Please i need help in Collision  detection

    i want to make collision detection system
    but i have no good papers or examples about collision to can make simple collision if anyone can give me good link please

    http://www.flipcode.com/articles/article_basiccollisions.shtml
    regards

  • Using ModelsUnderRay Collision detection

    Ok first things first. I know you guys who have been reading
    my other post is going to get confused after reading this post so
    let me make myself clear. First yes I was previously trying to
    Havok, but I could not get my car to work with it. So This is why I
    am now asking stuff about ModelsUnderRay collision detection.
    Second, I found this tutorial at
    http://www.fbe.unsw.edu.au/learning/director/,
    and all things seem to go pretty good with using the max File the
    tutorial uses. Meaning I have not tried this on my car as of yet.
    In addition, considering that things seem to work with the
    tutorial, I now came up with a new question. Basically, if I am
    correct, I think by using the code below, this is not going to work
    with my car when the car is going up a hill. I conclude this by
    knowing that the tutorial just uses a character, meaning it is not
    like a using something like a car that has a chassis and 4 wheels.
    So my question is this... How can I get the chassis to follow the
    angle of the hill if I am using a behaviour that looks something
    like this...
    on collisionDetect me
    -- create a list to store collision data created by
    modelsUnderRay
    -- cast ray to left
    collisionList =
    p3Dmember.modelsUnderRay(pCharacter.worldPosition, \
    -pCharacter.transform.yAxis,#detailed)
    -- if models picked up by ray, then activate checkForCollion
    -- handler and send the collisionList as a parameter
    if (collisionList.count) then
    me.checkForCollision(collisionList[1])
    -- cast ray to right
    collisionList =
    p3Dmember.modelsUnderRay(pCharacter.worldPosition, \
    pCharacter.transform.yAxis,#detailed)
    -- if models picked up by ray, then check for collision
    if (collisionList.count) then
    me.checkForCollision(collisionList[1])
    -- cast ray forward
    collisionList =
    p3Dmember.modelsUnderRay(pCharacter.worldPosition, \
    pCharacter.transform.xAxis,#detailed)
    -- if models picked up by ray, then check for collision
    if (collisionList.count) then
    me.checkForCollision(collisionList[1])
    -- cast ray backward
    collisionList =
    p3Dmember.modelsUnderRay(pCharacter.worldPosition, \
    -pCharacter.transform.xAxis,#detailed)
    -- if models picked up by ray, then check for collision
    if (collisionList.count) then
    me.checkForCollision(collisionList[1])
    end
    on checkForCollision me, collisData
    -- grab the #distance value from the CollisionList
    dist = collisData.distance
    -- check if distance is less than width of bounding box
    if (dist < pCharBoundingBox.resource.width ) then
    -- get distance of penetration
    diff = pCharBoundingBox.resource.width - dist
    -- calculate vector perpendicular to the wall's surface to
    move the character
    -- using the #isectNormal property
    tVector = collisData.isectNormal * diff
    -- move the character in order to resolve the collision
    pCharacter.translate(tVector,#world)
    end if
    end
    on keyDown
    -- check to see which key has been pressed
    -- and set the property relating to that key to TRUE
    if keypressed(123) then pLeftArrow = TRUE -- 123 = left
    arrow key
    if keypressed(124) then pRightArrow = TRUE -- 124 = right
    arrow key
    if keypressed(125) then pDownArrow = TRUE -- 125 = down
    arrow key
    if keypressed(126) then pUpArrow = TRUE -- 125 = up arrow
    key
    -- if 'r' key pressed, return character to starting position
    if keypressed("r") then resetCharacter
    -- if 'c' key is pressed, then switch camera
    if keypressed("c") then changeCamera
    end
    on keyUp
    -- when the arrow keys are released, set the properties to
    FALSE
    pLeftArrow = FALSE
    pRightArrow = FALSE
    pUpArrow = FALSE
    pDownArrow = FALSE
    end
    on exitFrame
    characterMove
    end
    on characterMove
    -- if the right arrow is pressed,
    -- rotate the character 5 degrees about the z-axis
    if pRightArrow then pCharacter.rotate(0,0,-5)
    --if the right arrow is pressed,
    -- rotate character -5 degrees about the z-axis
    if pLeftArrow then pCharacter.rotate(0,0,5)
    -- if the up arrow is pressed,
    -- move the character 5 pixels along the y-axis
    if pUpArrow then pCharacter.translate(0,5,0)
    -- if the down arrow is pressed,
    -- move the character -5 pixels along the y-axis
    if pDownArrow then pCharacter.translate(0,-5,0)
    -- move along terrain
    -- create reference for terrain (ground)
    terrain = p3Dmember.model("Terrain")
    -- store character's position
    charPos = pCharacter.worldPosition
    charPos.y = charPos.y - 20
    -- cast a ray down
    collisData =
    p3Dmember.modelsUnderRay(charPos,vector(0,0,-1),#detailed)
    -- if model is picked up on ray.
    if collisData.count then
    -- store total no of models detected by the ray
    totalCount = collisData.count
    repeat with modelNo = 1 to totalCount
    -- check if over the terrain model
    if (collisData[modelNo].model = terrain) then
    terrainPos = collisData[modelNo].isectPosition
    -- find out the distance the character should move up or
    down
    diff = (terrainPos.z - pCharacter.worldPosition.z)+45
    -- move the character
    pCharacter.translate(0,0,diff,#world)
    end if
    end repeat
    end if
    end

    ok,
    I have been trying to work this out for ahwile and I got
    pretty close on getting this correct but there are still some
    glitches. So far I did a little research in the help files to see
    what the dot product does and this is how I got my calculations
    going so far
    --the code
    on beginSprite me
    I created 2 spheres and a box. Next, I then positioned them
    so that the first sphere is alligned with the front end of the box
    and then I aligned the second sphere to back of the box. I will not
    show you the code of beginSprite because all this does is for
    creating the models and there are no calculations going inside this
    handler. In addition, with these 3 models, my purpose is to say
    lets prtend that the box is the chasis of the car and the sphere
    that is placed at the frent end of the chassis are to represemt the
    2 front wheels and the othere sphere is to represent the 2 back
    wheels of the car. Also, I initlalised a timer to the following
    below
    pTimer = (the milliseconds)
    end beginSprite
    ... note The timere is just for purposes of simulating a
    pretend upward movement for the wheels. See below which should
    explain it better then I can say it in words.
    --the code below is the calculations. The translations is for
    saying that I am pretending that the wheels are inclining up a
    hill. However, the wheels in the true game will be getting
    calculated by finding the distance of collion by using the
    modelsUnderRay function just like you normally would. By the way,
    all models and the camera are set to y is the up vector
    on exitFrame
    if ((the milliseconds) - pTimer) > 1000 then -- increment
    the calculations every one second
    pBall1.translate(0, 0.125, 0) -- This is for saying that
    this is the calculations that I am calculating the front wheels
    need to move up when they incline up the hill.
    pBall2.translate(0, -0.125, 0) -- Just like the front wheel
    pretend calulations but for the back wheels, and use a negative
    translate.
    pos1 = pBall1.transform.position -- get the calculated
    position for the front wheels
    pos2 = pBall2.transform.position -- get the calculated
    position for the back wheels
    norm1 = pos1.getnormalized() -- not sure I understand this,
    but in the help files, it says that when you calculate the dot
    product of 2 vectors that have been normalized, you then get their
    cosine
    norm2 = pos2.getNormalized() -- normalize the back wheels
    position
    dotProduct = norm1.dot(norm2) -- calculate the dot product
    of the 2 vectors
    pBox.rotate(dotAngle, 0, 0) -- I took a guess and thought
    that using the dotProduct will allow me to correctly rotate the
    chassis but the chassis is quite not rotating correctlly
    pTimer = (the milliseconds) -- update the timer so that we
    can recyle the above code again
    end if
    end exitFrame
    ... Ok, now like I said previously, the chassis is rotating
    almost correctlly, but if you continue to do this, and by after the
    third cycle, the front end wheels start to collide with the
    chassis. So in other words, the rotations look correct untill
    exitFrame is called for the third time and after which then the
    front wheels start to collide with the chassis.
    So I am wondering if anyone could help me out to fix this and
    explain what I am doing wrong?

  • Best way to do a tile-based map

    Hello everybody-
    This should be a simple thing but I just can't get it to work. I'm making a tile-based top-down online rpg (application, not applet), and I pretty much have most of it done except I can't get the map to display and scroll right. i will admit that java graphics isn't really my thing, but i just can't get it. Its been so frustrating that i actually quite develpment on my game and quit for awhile, but i decided to try again. What I have is an array if images that make up the map, and then i manipulate the array depending where the character is so i only draw the tiles necessary. what i want to do is to combine all the tiles i need for the particular position, draw that image to the screen (so i don't have to draw each tile individually to the screen). then i could move that large image depending where the character moved, and add tiles to it depending on which way the character moves. I just can't get it to work however. I've looked at double-bufferning posts and that gave me some ideas, but not enough for my particular situation. if anybody has any experience in this i would be more than greatful. thank you

    I know exactly what you are talking about, I had your problem a while back when I was doing mobile phone games.
    To reduce the number of cell draws needed, cells were only drawn when at the edges of the view area. (all other cells were maintained from the previously drawn frame.)
    It gets pretty complicated, but it will work - stick with it.
    I would post some code - but I don't have it anymore - and it was pretty specific to J2ME MIDP API (java mobile phone).
    p.s. When I did it, I had to include several additional optimisation, these made it incredibly complex :(
    I will try to describe it, but without pictures, It will probably be in vain. (don't worry if you don't understand it :P)
    here is the summary of the logic :-
    the backbuffer had dimensions SCREEN_WIDTH+CELL_WIDTH*2, SCREEN_HEIGHT+CELL_HEIGHT*2 (I effectively had a border that was CELL_WIDTH wide, and CELL_HEIGHT tall.)
    this meant new cells only had to be drawn every time the view area passed over a cell boundary.
    however, doing this, meant it was super smooth until it hit a cell boundary, at which point it had to draw all the cells in the newly exposed column and/or row - which caused a jerk.
    To get around this, I devised a speculative rendering, where by the next column/row was pre-rendered over a series of game frames.
    (each column/row had its own buffer into which the pre-rendering was done)
    On average 2-4 times as many edge cells had to be rendered than needed, but, because the camera moved slowly, this could be distributed over approx. 10 game frames.
    By distributing the rendering of the edge cells over a number of game frames, I hoped to remove the jerk experienced as the camera crossed a cell boundary.
    The system worked... ish... but I never finished it :(
    basically, these were crazy optimisations that were only necessary because I was developing for mobile phones.
    On mobile phones the speed of rendering is relative to the number of draw calls, NOT the actual area of the screen being repainted.
    e.g.
    fillRect(0,0,50,50)
    fillRect(0,50,50,50)
    will take almost twice as long as
    fillRect(0,0,100,100)
    even though you are only painting 1/2 the area.

  • Bypass content-based format detection so I can use a custom iFilter in Sharepoint 2013 Search

    Can I get SharePoint 2013 Search to bypass the content-based format detection and use the file extension to determine the format (and therefore the format handler so that I can use a customer iFilter)?
    We have a proprietary file format which uses xml, and we use a specific filename extension to indicate the type of file.  We have a custom iFilter to parse the file, because we only want some of the content to be indexed.  The iFilter works with
    Windows Search.  I’m now trying to use our custom iFilter to search the same files with SharePoint 2013.  SharePoint 2013 Search appears to determine a file’s format from its content and not from its file extension (I have confirmed this by changing
    the extensions of .docx and .txt files).  SharePoint 2013 search appears to use the built-in XML format handler to index our proprietary files.  Can I get SharePoint 2013 Search to bypass the content-based format detection and use the file extension
    to determine the format (and therefore the format handler)?  I think SharePoint 2010 may allow this, but I can’t find out if/how it is done in SharePoint 2013.
    I understand that built-in format handlers can’t be replaced by custom iFilters, but I don’t want to replace the XML format handler for .xml files.  

    Hi jeh271,
    quite interesting, because as i know iPersistStream should be installed when you need to use ifilter when using windows search.
    just curious, if you also restart the spsearchhostcontroller?
    as i know the search should have the content-based format,we cant bypass it, if we bypass it, then it may broke.
    i saw some thread about this before:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/944e6878-a7f0-4c0e-98b7-a7fb9faeef1b/bcs-connector-and-mimetypefield
    ifilter example:
    http://msdn.microsoft.com/en-us/library/hh694268(v=office.14).aspx
    last time i did this, seems similar issue:
    • The custom iFilter is working in SP 2010 but when we followed the same process of registering the iFilter in SP 2013, it was not working.
    • So, we knew that we were some missing some extra step in registering the filter in SP 2013.
    • Finally, we involved the Product group and we found out that we need to run an extra PowerShell commandlet apart from following the steps to register it in SP 2010 (given in this link:- http://msdn.microsoft.com/en-us/library/hh694268(v=office.14).aspx )
    • We ran the commandlet described here in this article http://technet.microsoft.com/en-us/library/jj219556.aspx.
    • The New-SPEnterpriseSearchFileFormat cmdlet adds a new file format and a corresponding file name extension to the search parsing system. This binds the file format to a filter-based format handler in the search parsing system. Thus, the search parsing system can only parse the new file format if the user has installed a corresponding filter-based format handler, an IFilter, for the new file format. If the installed IFilter registers more than one file name extension, the user must use the New-SPEnterpriseSearchFileFormat cmdlet to add a new file format to the parsing system for each of these file name extensions. The user must also ensure that the file name extension of the new file format is a member of the file-type inclusion list. The file-type inclusion list specifies which files that are crawled, based on their file name extensions. The system will only consider the new file format after a restart of the content processing components
    • The example for our scenario would be something like this:-
    New-SPEnterpriseSearchFileFormat -SearchApplication $ssa -FormatId dwg -FormatName DWGFiles -MimeType application/dwg
    • Then, we restarted the SharePoint Search Host controller service on the machine where you have installed the iFilter and this resolved our issue and we were able to successfully search with .dwg files using the custom iFilter.
    i am not quite sure if search treating your file as an XML file, if it is true, perhaps you can check this xmlmapper:http://msdn.microsoft.com/en-us/library/ff795813(v=office.14).aspx
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Java 3d collision detection

    i loaded some villas models(.obj ) and i want to implement simple collision detection to prevent the user from walking through the villa models

    Note: The powerups do move around too, so, if the powerup and the character are in the middle of a translation (in between predefined grid positions), then I need to find out if their paths cross and react appropriately.

Maybe you are looking for

  • Flash streaming from non-native websites not working on 10.1

    Note: I am running: Windows 7 64 bit Internet explorer 8 32 bit, Firefox 3.6.3 (32 bit) Flash player version: 10.1.53.64 Graphics card: Nvidia GeForce GTS 240 Graphics card driver: 257.21 Hi, Adobe Flash 10.0 was working perfectly until I upgraded it

  • Enhancement request: Remote interface java file generation

    Problem: In release 9.0.3, If you want to write a method that is suppossed to be exposed in the remote interface, you have to first right click on the ejb-jar.xml's appropriate EJB name node and then add the method, specify the argument types (say ab

  • Recovering library from new external hard drive

    My old external hard drive containing my iTunes and iPhoto libraries crashed.  I paid to have the data recovered.  The libraries are now on a new portable hard drive, but I don't know how to access them through ITunes and iPhoto.  Can anyone help?

  • Send email settings

    Hi, I am trying to send an email on a button click event. I do not see any error when the function module to send email is executed but I did not see any email to my personal email address too. Can you please guide me step by step that which all sett

  • Need source code to add image from a rolling camera onto a panel

    is there anyone who would be kind enough to tell me how i would get a moving camera image to appear on a specified panel.I am using Java awt