Using Tonypa's code for the ISO world I am creating a 3D world for a person's website in the ***** Hotel look.
The structure of this site is going to be like a tower, hence the name Tower of Babble. Now in order to get to the next floor, obviously you need to walk onto the stair tile.
Last edited by SamusKreations; 05-24-2004 at 04:37 AM.
just take out that code. I forgot to remove that little snippet.
Here's my real problem: Doors!
I just can't seem to get the code right. If the char even moves near the door space you automatically go to the next map. I don't want that. What I want is for the char to actually stand ON the space and THEN go to the next map.
I think Tonypa said that I don't need to change the code but shouldn't you have to convert it to iso? the code he had was for TBW.
In my door detection code, I first test to see if the hero is over the door tile, and then do the pythogoras distance test that Tonypa uses for the collision between hero and enemy, but testing the distance between the hero's centre and the door tile's centre. That way I know that the hero is roughly in the centre of the tile, and hasn't just got one corner over the tile.
if (game["t_"+ob.ytile+"_"+ob.xtile].door and ob == _root.char) {
if(ob.x%game.tileW==0 and ob.y%game.tileW==0){
// make new map
changeMap(ob);
}
}
Note, that your stairs object wont work correctly:
game.Tile13.prototype = new game.Doors([game.currentMap-1], 1, 4);
this will be run in the start of the game, and game.currentMap is not later updated. So if the game starts at floor1, then all the stairs going down will send you to floor0.
ok here's what I got so far. THe stair code Tonypa gave m worked like a charm. I fixed all the door codes by giving each stair its own tile in the door code. I don't know if that's an easy way to do that but It works for me.
Now I have a few more problem that I keep seeing.
my "teleporters are up against the walls, but they look like they are in between the floor and the wall. kinda like its wedged under the wall.
The other problem is that all of the objects i have in the floors look like they're levetating off the ground. the char kinda goes under them. I tried fixing the depth code but it won't work.
I also want the character to be the same height as the tiles. He looks so small compared to the objects.
the characters height shouldn't be a problem - as long as you've centred the clip to his feet (and all depth sorting is done to this centre), then you can make the character's height anything you want.
I think the character moving under the objects (like the candle sticks) could be corrected in your collision detection, so that he doesn't move close enough to look like he's under the object.
Of course, if you need objects that he can move over, then you'll need to carefully depth sort by the objects _y value
one thing that I find odd, is that the character moves down a stair in the far corner but then appears on the next floor a distance away from that. I think it would be better if the character appeared in the tile next to the stair
maybe that has something to do with why it looks a little wrong.
I still haven't got right yet is the npc placement. I am trying everything known to man from using them as tiles with a purpose to using tonypa's stupid enemy tutorial. Using that one made the npc up in the air nowhere near a tile it should be. maybe i calculated it wrong. it probably needs to be written like the main character placement, and call a function for its brain.
any comments or help is very appreciative. I even took a look at edmack's iso world, but he uses XML to store his maps. that's something I haven't fooled around with it much.
I just want to let everyone know that they have helped me along through my rough spots and even help fine tuning it.
I have a working on geocities, but most of the tile work is done by my assistant damien, who is not right in the head. I will make the fial tiles when it's ready for the web.