Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Suppose I want to create a 2D game where the player can freely move in a map with walls (including diagonal ones). I don't know the best way to create a game like this but I suppose using tiles is not the best option.

How can I implement a line-of-sight game to occlude stuff hidden behind walls and angles the player can't see?

like the game Teleglitch

Every frame it has to check the LoS for each wall but I don't know the best way to store the map information due to diagonal walls

share|improve this question

closed as too broad by Byte56 Dec 26 '13 at 23:44

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Sounds like you need to do a bit more research and find out what you want. For example, the way your character moves and sees doesn't matter if you're using tiles. –  Byte56 May 28 '13 at 3:41
1  
I see great questions and answers here and here –  congusbongus May 28 '13 at 4:08
    
@Byte56 i've been doing some research but I didn't find anything useful yet.. what's the best way to store and draw a map with complex shapes (and collide with them)? –  andrepcg May 28 '13 at 12:51
    
Big question. Break up the question into smaller parts and research those. You basically have shapes and positions. Then there are strategies for finding the nearest objects to reduce your collision checks. Ask in chat or one of the other sites listed in the FAQ for open ended questions. –  Byte56 May 28 '13 at 12:59

Browse other questions tagged or ask your own question.