Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Linking top-view 2D rooms

This topic is 5873 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 top-view 2D game engine, similar to Zelda or what have you. The game is based on arbitrary-sized rectangular rooms, and currently I''ve only implemented one. However, I''d like to link the rooms so that you can walk off one and into another - nothing groundbreaking, but unlike Zelda the rooms aren''t all the same size, so I''m wondering how to best handle this. I want to create the illusion of a continuous world that just happens to be broken up by the room boundaries, but I can''t think of a way to do this without being really confusing in the code and/or level editor. As always, thanks in advance and let me know if you need more information.

Share this post

Link to post
Share on other sites
Keep a list of rectangular regions, each of which points to another room (or to some specific point in a room).

Alternatively, have a way of flagging tiles (if you use tiles) as ''exit'', pointing to some other room.

Once the character steps inside the region, just move it to the room pointed to.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!