Hey guys, I'm trying to get more serious into programming so I've started my first browser game project. Right now I'm working on a Diablo 1 ripoff just to see what I can and can't do. I've ran into a problem and I'd like your opinion on the easiest way to manage a map and its obstacles (wall/houses,stones,etc).
I started using z-layers to get the character and obstacles over the game background and move stuff accordingly but how do I keep my character from running through a wall?
Should I start using some kind of grid? Should I figure something to implement coords and preset 'obstacle' zones in a databank I then verify everytime my character coords attempt to move? Am I stupid?:confused:
Basically, I know my way is wrong but that's all I could think of.
I don't expect anyone to do miracle with this kind of thread/post but if anyone has suggestions or ideas on how to go, I'd really appreciate.
Managing map/obstacles on browser-game? NOOB!
Started by by0logic, Nov 08 2010 08:35 PM
2 replies to this topic
#1
Posted 08 November 2010 - 08:35 PM
|
|
|
#2
Posted 09 November 2010 - 04:18 AM
Are you treating walls as part of the background, or at the same level as the player?
#3
Posted 09 November 2010 - 06:24 AM
Right now the obstacles are on the same level than the character but i can change that. Im also considering using many zlayers for the obstacles so i can try to figure the "deepness" tho i dont know how ill do that yet so maybe i wont.


Sign In
Create Account


Back to top









