Ex.
1. Setup a scene with two bitmaps and keep track of their rectangles.
2. Check if the two rectangles intercepts eachother.
3. Perform action if they do
[This message has been edited by Spiff (edited November 14, 1999).]
Ex.
1. Setup a scene with two bitmaps and keep track of their rectangles.
2. Check if the two rectangles intercepts eachother.
3. Perform action if they do
[This message has been edited by Spiff (edited November 14, 1999).]
I'm, once again, trying to make a game similar to Zelda 3. I need to do the same thing done in that game, you can walk anywhere except on bricks, rocks, enemies, and the like. Does anyone know how to do this? What conditions would I have to check for?
- Splat
Tell me though, how can I do tile map storage? Is it better than Left and Top properties? Are there any drawbacks?
Any help is appreciated.
The trick to, at least in this case, is finding out what is and is not "walkable on". How do you / will you store this information. Obviously, the game needs to know this in order to restrict the players movement.
With a tile system, it is very simple. Before you move the player, check to see if the tile he is moving to is marked impassable. If it is, then don't move him!
On a side note, in addition to knowing the player's Top and Left you will need to keep track of the position of the upper-left corner of the displayed area relative to the upper-left of the world / level map. With those two bits you can know where any object is in the map.
- Splat
And how would I know if the square/tile he is attempting to enter is impasssible, is it something predefined? Or what?
Would everyone agree on this?
Wish you all luck
_____
Spiff
Can anyone give me a method that has worked well for them? Or some sample code...ANYTHING.
I think I'll just keep doing what I'm doing. It's only a little hobby for me anyway, I'm not going into this professionally. Not yet anyway.
Trust me, I've got animation for my character while he walks, and he is confined to move within a certain area.
If I need more help, I'll be back.
Kay!