So I've been messing around with simple game development for a while and just found an interesting game idea here . I'm using SFML 2.1 with C++ and so far I have a tilemap in a VertexArray using a very similar way to this tutorial and have gotten it working with submarine movement but I feel that I have dug myself a hole with this. Here is what I have so far and you can see my simple tileset: . I am pretty lost in terms of how to handle collisions between the submarines (and anything else fired) and the walls. The only way I can really think of is pixel collision but I'm not really sure how I would implement that.
Sorry if this has been asked before but I have looked and can't find much that applies. Any help is greatly appreciated.
I just realised that the question is badly worded sorry. I was wondering how to do collision detection between the submarine and the walls of the level. Since I don't want to just do collision tests on the whole tile (as it would prevent the sub from getting close to the wall) but rather the section that has the actual wall part (just the line in the tile). I really don't know how to do this, should I switch out the tilemap for just a bunch of line objects and do the collision tests on those or is there a way to do it as it stands now?