• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

ravenx30

Members
  • Content count

    27
  • Joined

  • Last visited

Community Reputation

102 Neutral

About ravenx30

  • Rank
    Member
  1. The code above works for all directions with the exception of the way Nblock etc are called. At the end of the directional componants I have a bit that says if 'not' colliding set all the Nblocks etc to false. allowing all directional keys to work again. What it basically does is disable the key in question when collition happens but allows the other keys to remain active till the collition is cleared then all is reset back to false. It is a crude way of testing for collition I know but is the only way I have come up with that works. so if the character was moving across the screen to the left and hit the block Eblock would be set to true disabling the use of the left directional key till the collition was cleared but because Nblcok, Sblock and Wblock are still false the other keys would work. ie. the user can move away from collition. (as left key is useless anyways at collition as there is a block in the way. I have found another toutorial which deals with collition and other aspects of my bomberman type clone which I am going to follow and implement today although it does use classes and other complex tasks which im unfamiliar with. By first glance what they do to test for collition is test for the intended move instead of the move it's self then say if the charatcer can move there or not. Ive spent weeks trying to draw a working map with block collition etc. with no avail so hopefully if I can get my head around this toutorial Ill boost progress drastically.
  2. WBlock etc is irrelivant. But basically they are used to disable the direction key if the certain side of the block is collided (WBlock = WestBlockFace). In the reply to the A* path finding isn't this just for AI? or can I use it to configure when my controllible charcter can or cant move? Im really finding this hard, didn't realise there was so much code just to make a tile immpassible. Im basically tring to make a bomberman type clone so there are going to be lots of blocks which I need to set to unwalkible and using that code is all I have come up with.. If instead of making tiles unwalkible and force the character to move only on walkible tiles it might make it easier. wish I could find another bomberman type game with the xna/c# source code to give me ideas but cant find any in that laungage that work.
  3. I now have the code to test weither a block is walkible or not on one tile what im wanting to do is test it for all the tiles by using the following: [code] else if ((keyboardState.IsKeyDown(Keys.Up) || (gamepad1State.ThumbSticks.Left.Y > 0f)) && (Sblock == false)) { for(int x = 0; x <= 65; x++) { if ((charBounds.Intersects(mBlock[x])) && (Nblock == false) && (Wblock == false) && (Eblock == false)) { Sblock = true; } } [/code] This in theory would check all the rectangles ive made in the 'mblock' array for a collition then stop the movement of the direction but it doesn't work.. for it to work id have to do: [code] if (((charBounds.Intersects(mBlock[0])) || ((charBounds.Intersects(mBlock[1])) || ............. || ............) && (Nblock == false) && (Wblock == false) && (Eblock == false)) [/code] something im doing wrong or something or going about it the wrong way?
  4. Sweeeet thanks to your insperation Ive managed to do it. using the below code: [code] if ((keyboardState.IsKeyDown(Keys.Left) || (gamepad1State.ThumbSticks.Left.X < 0f)) && (Eblock==false)) { if (charBounds.Intersects(mBlock1) && (Wblock == false) && (Sblock == false) && (Nblock == false)) { Eblock = true; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 1; } } skullPosition.X -= skullSpeed; } } else if ((keyboardState.IsKeyDown(Keys.Right) || (gamepad1State.ThumbSticks.Left.X > 0f)) && (Wblock == false)) { if ((charBounds.Intersects(mBlock1)) && (Eblock == false) && (Sblock == false) && (Nblock == false)) { Wblock = true; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 2; } } skullPosition.X += skullSpeed; } } else if ((keyboardState.IsKeyDown(Keys.Up) || (gamepad1State.ThumbSticks.Left.Y > 0f)) && (Sblock == false)) { if ((charBounds.Intersects(mBlock1)) && (Nblock == false) && (Wblock == false) && (Eblock == false)) { Sblock = true; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 3; } } skullPosition.Y -= skullSpeed; } } else if ((keyboardState.IsKeyDown(Keys.Down) || (gamepad1State.ThumbSticks.Left.Y < 0f)) && (Nblock == false)) { if ((charBounds.Intersects(mBlock1)) && (Sblock == false) && (Eblock == false) && (Wblock == false)) { Nblock = true; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 0; } } skullPosition.Y += skullSpeed; } } if (!charBounds.Intersects(mBlock1)) { Eblock = false; Wblock = false; Nblock = false; Sblock = false; } [/code] although not the most efficiant way to do it in the world it works perfectly and makes the block truely unwalkible by disabling the directioal key in question now I just need to replicate this to the whole grid of blocks lol...
  5. I think I know what you are tring to do and may have an idea. Create 4 'bool' type varibles (N,S,E,W) and if it collide equal the bool to true. Put the bool in the key stament as follows: [code] if ((keyboardState.IsKeyDown(Keys.Left) || (gamepad1State.ThumbSticks.Left.X < 0f)) && (W != true) { if (charBounds.Intersects(mBlock1)) { W = true; } else { // move { } else { W = false; } [/code] This would disable the corrisonding direction when collition has occured but because I have 4 bools for each direction woun't affect other directions?
  6. Modfied my code to do what you suggest but what happens now when the charater collides is the character gets stcuk to the block ie. doesn't move. he still animates but once collition has happened all movement is disabled. below is the modified code: [code] if (keyboardState.IsKeyDown(Keys.Left) || (gamepad1State.ThumbSticks.Left.X < 0f)) { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 1; } } lastSkullposition.X -= skullSpeed; } else if (keyboardState.IsKeyDown(Keys.Right) || (gamepad1State.ThumbSticks.Left.X > 0f)) { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 2; } } lastSkullposition.X += skullSpeed; } else if (keyboardState.IsKeyDown(Keys.Up) || (gamepad1State.ThumbSticks.Left.Y > 0f)) { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 3; } } lastSkullposition.Y -= skullSpeed; } else if (keyboardState.IsKeyDown(Keys.Down) || (gamepad1State.ThumbSticks.Left.Y < 0f)) { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 0; } } lastSkullposition.Y += skullSpeed; } //lastSkullposition += skullPosition; if (!charBounds.Intersects(mBlock1)) { skullPosition = lastSkullposition; } [/code] not identicle to your phudou code but does the same thing >> lastSkullposition is where you had new position. and the translating thing doesn't work.. as fails to show the character at all so commeted it out. I then tested for collition between the charater and the block and allowed movement when it wasn't colliding. Although it saved a bit of code I now have another problem of the charater being stuck once collition occurs
  7. [quote name='Resric' timestamp='1302100653' post='4795047'] I would suggest doing your collision code after the movement code. Not only will this be much faster and easier to follow but I think it will fix your problem too. Here is some pseudo code to show you what I mean. [code] // Create a temp vector to track where the player wants to move Vector2 newPosition; if (move_left_input) newPosition.X--; else if (move_right_input) newPosition.X++; if (move_up_input) newPosition.Y++; else if (move_down_input) newPosition.Y--; // Translate the old position by the movement vector to get the final position newPosition += skullPosition; // Run collision detection against the new position Bounds newCharBounds = createBounds(newPosition); if (!newCharBounds.Intersects(mBlock1)) { // The new position is on a passable tile so let the player move skullPosition = newPosition; } [/code] [/quote] Ill give it a go and let you know what happens give me 10mins
  8. Hey guys, im having a problem with my collition result. there are blocks on my map which i want set as unwalkible. I have managed to do this by putting a rectangle around the block and the character then using intesect to determine collition. the test works but thats not the problem. As when the collition does happen im unsure what to do as so far I have put the colltion in the directional keys so I know which way the charater is facing when the colltion happens. I set the posion opposite to the direction of the charecter when ther colliton occurs. Problem is when the charater collides sometimes he doesn't get pushed back straight away so he still is colliding. and when I press another directional key that part of the code runs. for if he was stuck on the colltion moving from right to left then I pressed the up key that part of the code tells him to move down even know he is facing the east side of the block =/. Ive tried hours to get this working and finding it really hard to fix any help would be appresiated my code for the directional keys is below. ps. using classes etc is behond me and not important for my project before you say it looks messy >< lol.. [code] if (keyboardState.IsKeyDown(Keys.Left) || (gamepad1State.ThumbSticks.Left.X < 0f)) { if (charBounds.Intersects(mBlock1)) { skullPosition.X++; } else if (!charBounds.Intersects(mBlock1)) { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 1; } } skullPosition.X -= skullSpeed; } } else if (keyboardState.IsKeyDown(Keys.Right) || (gamepad1State.ThumbSticks.Left.X > 0f)) { if (charBounds.Intersects(mBlock1)) { skullPosition.X--; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 2; } } skullPosition.X += skullSpeed; } } else if (keyboardState.IsKeyDown(Keys.Up) || (gamepad1State.ThumbSticks.Left.Y > 0f)) { if (charBounds.Intersects(mBlock1)) { skullPosition.Y++; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 3; } } skullPosition.Y -= skullSpeed; } } else if (keyboardState.IsKeyDown(Keys.Down) || (gamepad1State.ThumbSticks.Left.Y < 0f)) { if (charBounds.Intersects(mBlock1)) { skullPosition.Y--; } else { if (skullTimeSinceLastFrame > skullMilliSecondsPerFrame) { skullTimeSinceLastFrame -= skullMilliSecondsPerFrame; ++skullCurrentFrame.X; if (skullCurrentFrame.X >= 3) { skullCurrentFrame.X = 0; skullCurrentFrame.Y = 0; } } skullPosition.Y += skullSpeed; } } [/code] Basically the code is the same for each directional key doing the opposite on collition. its when the character doesn't get moved or gets stuck in the colltion and another key gets pressed is when I have the problem. I really really apreshiate any help as tried so long to get this working and can't
  9. [quote name='TheTroll' timestamp='1301512162' post='4792287'] Sorry didn't get a chance to work on that class, got two sick kids. The way I do it is to have in the tile a variable for each direction, N, NE, E, SE, S, SW, W, NW. Put the tile that it can travel to in each variable. This will take a little more time when loading the map. But the advantage is that during game play you have the location to test if they can move at all time. So if you want to move E, you just go E.CanMove and that would let you know if E is passable. [/quote] Sorry that your kids are unwell, If you send me a message with your email ill forward what Ive done so far as im totally sick.. tried doing this simple tile map for over a week and cant even get the basics to work. Im trying to make a bomberman type game but its a lot harder than first thought. My code is a bit messed up as been trying to get the fire mechanism working as couldn't get the tile enginne working lol couldn't even do that.. Ah well it is my first c# game I bet many were fustrated when trying to create there first game. cant upload *.zip files on here or code files so if you send me ur email via private messaging on gamedev ill fire it across
  10. Can i not do something like: [code] for(int n = 0; n < 10; n++) { if (!myTiles[n].Walkable) { Rectangle blockRect = new Rectangle(myTiles[n].,0,32,32); // NOT FINISHED/ UNSURE if(mskull.Bounds.Intersects(blockRect)) skullPosition.X += 5; } else skullPosition.X -= skullSpeed; } [/code] checks all the tiles for which ones which are not passible. It then creates a rectangle around the immpasible tile which is used for a collition test against the character. If collition test = true then the postion is altered. was thinking about putting this code when the user goes left. i then can use similar to do the other directions? logic sounds ok but not sure how to create the rectangle for the tiles in question. the first if makes sure im looking at the immpasible tile but how do I draw a rectangle around it not knowing the start x and y cords?
  11. [quote name='yewbie' timestamp='1301505256' post='4792234'] I have never used XNA but check out this tutorial its pretty much covering what your doing. [url="http://xnaresources.com/default.asp?page=Tutorial:TileEngineSeries:1"]XNA Tile Tutorial[/url] [/quote] thanks for the reply although that link dont really help that much as doesnt deal with structs etc. Ive now managed to draw the map to the screen and my character but not sure if i done it right. I now just need help with the collition aspect. Ill show you how i managed to draw it below: [code] // EXTRA VARIBLES ADDED List<Texture2D> tiles = new List<Texture2D>(); [/code] This is so i can handle the grid array (Layer1) [code] // LOAD METHOD for (int n = 0; n < 10; n++) { tiles.Add(Content.Load<Texture2D>(myTiles[n].Path)); } [/code] basically adds all the file name paths declared in the struct. [code] // DRAW METHOD spriteBatch.Begin(); for (int y = 0; y < Layer1.GetLength(0); y++) { for (int x = 0; x < Layer1.GetLength(1); x++) { spriteBatch.Draw(tiles[Layer1[y, x]], new Rectangle( x * 32, y * 32, 32, 32), Color.White); } } spriteBatch.End(); [/code] Nested loop to run through and draw each row and colum of the array. I feel i havnt used the previous code fully by implementing a list and the way I used the load method but none the less it does display the genarated tiles. problem is now when I add a charater to the equation declaring it in the stuct the same way as the tiles im not sure how to manage the collition as unfortunitly you can just do: [code] if (chararcter.walkibe.intersects(myTiles.walkible)) { // collition(); } [/CODE] I feel that I have gone about all of this totally wrong and there is a really simple solution lol but ive scoured the net and looked at many guides with no joy..
  12. Hi guys, I am using a simple program called 'd2d map editor' which basically draws your tiles and sorts out collition then genarates some code for it. The problem im having is how to actually make it work? below is the code it genarates: [code] // This C++ code is generated by D2D Map Editor // Tile struct tile { int id; string name; bool walkable; string path; }; tile myTiles[10]; myTiles[0].id = 0; myTiles[0].name = "0"; myTiles[0].walkable = false; myTiles[0].path = "Untitled\000.bmp"; myTiles[1].id = 1; myTiles[1].name = "1"; myTiles[1].walkable = false; myTiles[1].path = "Untitled\001.bmp"; myTiles[2].id = 2; myTiles[2].name = "2"; myTiles[2].walkable = false; myTiles[2].path = "Untitled\002.bmp"; myTiles[3].id = 3; myTiles[3].name = "3"; myTiles[3].walkable = false; myTiles[3].path = "Untitled\003.bmp"; myTiles[4].id = 4; myTiles[4].name = "4"; myTiles[4].walkable = false; myTiles[4].path = "Untitled\004.bmp"; myTiles[5].id = 5; myTiles[5].name = "5"; myTiles[5].walkable = false; myTiles[5].path = "Untitled\005.bmp"; myTiles[6].id = 6; myTiles[6].name = "6"; myTiles[6].walkable = true; myTiles[6].path = "Untitled\006.bmp"; myTiles[7].id = 7; myTiles[7].name = "7"; myTiles[7].walkable = false; myTiles[7].path = "Untitled\007.bmp"; myTiles[8].id = 8; myTiles[8].name = "8"; myTiles[8].walkable = false; myTiles[8].path = "Untitled\008.bmp"; myTiles[9].id = 9; myTiles[9].name = "9"; myTiles[9].walkable = false; myTiles[9].path = "Untitled\009.bmp"; // Map size const int mapWidth = 25; const int mapHeight = 15; // Map alpha int mapAlpha = 100; // Map Array int Layer1[mapWidth][mapHeight] = { { 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2} }; [/code] But dont know what I would but in the load, draw/updates methods to get this code to actually work in xna?
  13. It would be nice to include all the code (ie. load and draw methods) required to run it instead of it just genarating the inicilisation. as havnt a clue how to implement it in xna? But really nice program wished i could use it, i am a noob though
  14. [quote name='TheTroll' timestamp='1301416444' post='4791780'] A bit later today I will whip up a better class for you. You should be able to just plug it in and get it to work. Give me 3-6 hours or so to get up done. [/quote] ok cool thanks mate try and base it on the above then I can just use the editor to modify things and add layers etc
  15. [quote name='TheTroll' timestamp='1301336218' post='4791432'] [code] public class Tile { bool passable; Image backgroundImage; List<Image> overlayImages; int x_location; int y_location; public void Draw() { // Put your draw code here. } public bool CollisionTest(int x, int y) { // Do your collision test here. } } [/code] That is how I would set up my tile. You can pass the location of the moving object to the tile and then see if the object can pass through the tile. This also help with your overlay problems. theTroll [/quote] Looks good but think im going a bit ahead of my ability so i found a program called 'D2D map editor' which is fairly simple but genarates the code for you including layers and impassible objects.. problem is lol im so stupid i dont know how to draw it using xna. below is the code it genarates: [code] // This C# code is generated by D2D Map Editor // Tile struct tile { int _id; String _name; Boolean _walkable; String _path; public tile(int id, String name, Boolean walkable, String path) { _id = id; _name = name; _walkable = walkable; _path = path; } public int Id { get { return _id; } set { _id = value; } } public String Name { get { return _name; } set { _name = value; } } public Boolean Walkable { get { return _walkable; } set { _walkable = value; } } public String Path { get { return _path; } set { _path = value; } } } tile[] myTiles = { new tile(0, "0", false, "JingZhou\000.bmp"), new tile(1, "1", false, "JingZhou\001.bmp"), new tile(2, "2", false, "JingZhou\002.bmp"), new tile(3, "3", false, "JingZhou\003.bmp"), new tile(4, "4", false, "JingZhou\004.bmp"), new tile(5, "5", false, "JingZhou\005.bmp"), new tile(6, "6", true, "JingZhou\006.bmp"), new tile(7, "7", false, "JingZhou\007.bmp"), new tile(8, "8", false, "JingZhou\008.bmp"), new tile(9, "9", false, "JingZhou\009.bmp") }; // Map size int mapWidth = 25; int mapHeight = 15; // Map alpha int mapAlpha = 100; // Map Array int [,] Layer1 = { { 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 3, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 5}, { 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5}, { 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2} }; [/code] And thats all it gives you. I understand how it works etc but this is only inicilising the map not drawing it. any change you could supply the code i have to put in draw method to run it? lol probably really simple but ive tried for hours being new to all of this with no avail Do i have to inicialize each part for example walkible? open something which says what to do if its true or something? If i could work out how do use the genarated code all my problems would be solved lol