RPG 2!!!

Xtreme
11-21-2000, 08:45 AM
I wanted to know how i could do enemy detection in my games.

i am programming a tile game by having the main character check the tile he is on based on an array such as
1 1 1 1 2 2 2 2 1 1 1
1 1 1 1 2 2 2 2 1 1 3
1 1 2 2 3 3 3 1 1 2 3

well my first thought would be to have the enemies run through the same algorithm. i was just wondering if there was a better way?

Here is a longer definition. first i load a text file like the one above into a two dimensional array. then i lay the tiles on the screen. when i move say right i move my character and use an algorithm to detect which part of the array i am in. after that i check the number in the array, if it is say a 2 i move the character back. well i want moving people that i could punch around a little bit or even talk to but i need to know how to set that up. i was thinking on having the other character have a tempororay storage variable that would store his location in the map and if when the main character moved his place in the map and it was the same as the temporary variable of the other character an interacter would occur. is this sound logic or is there a better way?

punk
11-21-2000, 11:17 AM
Well, on the engine that we are making at 3Dcorp. we donīt use DDRAW but the enemy encouter should work for you. For moving the character we used "select case", when the user clicks on the arrows at the keyboard we set up a randomizer that will make the combat or not.
Ex:
Randomize
enemy = Int(Rnd * 10)
If enemy > 9 then Call (ENEMY ENGINE on our case)


Punkrock on my veins..... ARRGGHHUU !

Xtreme
11-21-2000, 12:29 PM
Thanks for the quick reply and a different look on the situation.

punk
11-21-2000, 12:59 PM
U R welcome

Punkrock on my veins..... ARRGGHHUU !

punk
11-21-2000, 01:28 PM
Found on GameDev, hope this help
http://www.gamedev.net/directory/links/category.asp?catid=23#6

Punkrock on my veins..... ARRGGHHUU !

Xtreme
11-22-2000, 02:37 PM
Thanks for the specific address i will have to check it out.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum