# sultanofswing.90

Member

9

111 Neutral

• Rank
Newbie

2. ## If you like rock music...

Hi everyone =) i want to share with you what i done! i'm taking part in a rock guitar contest and i want to know what do you think of my solo. Here's my video [media][/media] sorry for the bad quality =\ bye ;)
3. ## 2d Isometric slopes fix

implement it as a standard height map? Does this mean that i can store all the height in a (for example) integer matrix as big as the map? Ok but every time i have to check the tiles "transition" when i move up/down one...and in certain cases i've to modify a lot of tiles...

up?
5. ## 2d Isometric slopes fix

Hi guys, i'm developing a full 2d iso engine with xna (here's a demo ), but now i need an algorithm to raise/fix automatically every tile around a previously moved up/down tile. i.e if i move up a tile at height 0, the 8 tiles around must be modified...etc... What i can do? In my video i modified every single tile... here's a video showing what i need(from 00:26) bye =)
6. ## [XNA 4] Isometric block placement issue

ok it was a stupid error =) well, i fixed all, that's the result thanks ;)
7. ## [XNA 4] Isometric block placement issue

hmm ok i tried this: [source]private void drawBlocks(SpriteBatch batch) { for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x+=2) { if (objectMap[x, y] != null) objectMap[x, y].Draw(batch); } for (int x = 1; x < Width; x += 2) { if (objectMap[x, y] != null) objectMap[x, y].Draw(batch); } } }[/source] but,again, when i click(for example) tiles 2,2 ,4,2 , 3,1 the result is =|
8. ## [XNA 4] Isometric block placement issue

nothing special....only placed blocks close togheter. The two previous screenshot are two different situation. In the first the blocks have a certain distance, in the second all the blocks are close togheter, but drawed in the wrong order...
9. ## [XNA 4] Isometric block placement issue

Hi people, i'm currently working on a simple 2D isometric engine using a staggered map, i'm thinking about a simcity clone... Drawing the map and the tile picking are ok, but here's the painful part: block placement in the map. So, here's what i've done: I've a map class containing [source]terrainBlock terrain[,]; int height; int width; mapObject objectMap[,]; ...[/source] terrain holds all terrain blocks,object holds the blocks the user can place in the map. Here's the map When i click on a terrain block i have something like this and this is my Update method: [source]public void Update(MouseState m1) { Point selectedTileCoord = ChechTilePicking(m1); //if we selected a valid tile if (selectedTileCoord.X != -1 && selectedTileCoord.Y != -1) { //if user press the left button if (m1.LeftButton == ButtonState.Pressed) { if (objectMap[selectedTileCoord.X, selectedTileCoord.Y] == null) { //create a new block objectMap[selectedTileCoord.X, selectedTileCoord.Y] = new mapObject(Content, this, selectedTileCoord); } } } }[/source] seems ok but...look at this now: Oh no! What's happening here? I don't know how to render all the blocks in the right order, once placed in the map. Here's my draw method: [source]public void Draw(SpriteBatch batch) { batch.Begin(); drawTiles(batch); batch.End(); batch.Begin(); drawBlocks(batch); batch.End(); }[/source] so, i draw first all the terrain blocks(right?), then i draw all the map blocks. Here's the drawBlock method: [source]private void drawBlocks(SpriteBatch batch) { for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x++) { if (objectMap[x, y] != null) objectMap[x, y].Draw(batch); } } }[/source] and this is the draw method for the mapObject class: [source]public void Draw(SpriteBatch batch) { batch.Draw(texture, rect, Color.White); }[/source] where rect is the destination rectangle in the screen. However, the drawBlocks method should draw every block left to right,top to bottom...but it doesn't work correctly! How can i render correctly every block in the map? =\