Walls, or even boundaries, these are impossible to find

  • Makksor
  • Born
  • Born
  • Makksor
  • Posts: 2

Post 3+ Months Ago

Ok, heres the thing. I searched everwery to find just anything about walls or boundaries. I couldn't find them. send me the script if you have one, and if you can, don't let enemies look through them.
note : my game is like gameboy zelda or pokemon, you see your character from up
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

be more specific. You want walls so that you cant go through them or walls that enemies cant look through them?
u said it`s the second one, and if so ... you'll need a matrix of the map with all the objects.
something like
001000100
000020100
000000104
000000100
300000000

where 1 is wall, 2 is your character, 3 is enemy type A and 4 enemy type B.

in that matrix check the line between the enemy and your character and if it intersect the code for wall, then it cant see you. if i'll remember the site where i seen more explanations about this kind of stuff, i`ll post it here. But now is show time, Brasil - Croatia.

later edit:
ok, here you go
google search for: game programming 2d maps and see what u can find
i came up with this one:
game programming

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.