Sign in to follow this  

Grid based games

This topic is 4094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a text based RPG as a test bed for various ideas I've had. Currently its room based with all movements simply being move to the next room. I've recently begun pondering making it grid/tile based (or possibly coordinate based so I don't have to fill in the unused tiles). This would allow me to transition very easily to graphics based and improve range effect on combat. Can anyone suggesest some good places to find information on this programming? One of the specific things I'm wondering about is such things as determining what is visible to the player. Is the best approach to "spiral out" from the character, locating all items at you move further out and stopping each line of sight when it runs into something you can't see though?

Share this post


Link to post
Share on other sites
What you are describing is known as a "roguelike".

You can probably find a pile of code, open to being reused, used by varous "roguelikes" -- including nethack, rogue, angband, and dozens of others.

Share this post


Link to post
Share on other sites
What I do is make my "land" or Rooms in your case, have a certain width. The "land" is a class that has several properties such as position, whats on it, is it walkable, etc. So this concept isnt much more improved on what you're doing cvurrently, but perhaps you should think of a "room" more as a "square unit" of your decided dimensions.

As to more free moving games, I'd think there's a handler class that handles the properties of the "zone", like which mobs are there and where trhey are, what is impassable, etc.

Im no expert, so take this with a grain of salt.

Share this post


Link to post
Share on other sites

This topic is 4094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this