Hi

I am making a 2D adventure/rpg game in vb.net. At the moment, the character in the game moves around a game map, and initiates battle with any enemies he comes across.

The problem is that I want the terrain on the battle map to change according to the terrain on the game map. So if the character fights in water, the battle map is in water and if he fights on land, the battle map is on land. The crash collision as I know it works on squares. But the map I am using, like all maps, is not polygonal. Does anyone know how I could make the character detect whether he is on water or land, and the battle map changes accordingly?

Thankyou

You should store your characters position in a 2D array. It is independent from terrain type, you have to store and check only the positions after every movement.
If two character positions are the same then a collision appear.

Hi

But wouldn't the array only work with a tile based game?

You choose the array. Your array could be the pixels of the screen, or the bitmaps of the map, or anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.