• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ISDCaptain01

How to draw different mappy maps in the same game

3 posts in this topic

Im trying to make a Zelda 1 clone. I have already made my field/main map. But say I want to make cave map for whenever a player enters a cave. How would I draw this? I have already made the cave map made.

I load in my overworld map like this
MapLoad("overworld.fmp", 1);

And draw it like this:
MapDrawBG(mapxoff, mapyoff, x, y, width, height);

But Now I want to draw the cave map, what can I do to tell my program to draw the cave instead of the overworld now?

0

Share this post


Link to post
Share on other sites

Without knowing what your structure looks like or how mappy works, your best bet is probably to load in the cave map/retrieve it from memory and draw that and don't draw the overworld map.

 

If mappy only allows you to draw/load one map at a time, you can either keep on un and reload the maps needed, or construct your maps in such a way that everything is on the map and all you need to do is get the right coords to get to your caves position. Either way is rather un-efficient though.

 

Best way probably is to load in surrounding areas and draw them when entering that area, but it kind of depends how mappy works to make that work.

0

Share this post


Link to post
Share on other sites

Hacky and quick way:

In it's simplest form, you could probably have an entire map for your underworld. Make your "cave" level the entire size of your map. Any entrances down into the underworld would be in the same corresponding position of your overland map. You wouldn't have to change your mapxoff, mapyoff, x, y, width, or height variables. You'd only have to load "cave.fmp" instead.

 

I'd only do this as a way of exploring what all needs to become more sophisticated. Some things that may or may not need some more smarts: Monsters, NPC's, and Chest's spring to mind. If you haven't specified which "map" they are a part of, everything that spawns on map screen (3, 14) of the overland would also spawn on 3, 14 of the underworld.

 

Side note: This is a prime example of how global variables can come back to bite you.

 

More sophisticated way:

You'll need a way to keep up with some map data and which map the player is on. Since I don't use Mappy, some of this may be done for you already, but I'll assume not.  I'd make a MapData class and store all the core data of the map there. The filename, what types and number of enemies that spawn on what screen, which music to play, and lists of any kind of special tiles like entrances, burnable bushes, explodable rocks, raft launching spots, etc.

 

For now I'll concentrate on the "entrance" of the overland map to a cave map. The entrance on the overland will need to know specifically where it is on the overland map (screen and tile coordinate), which mapData the entrance takes the player to (cave1), and where specifically it starts you at on the destination map (mapxoff, mapyoff, x, y). 

 

In order to leave the cave, I would create an "entrance" in the cave1 MapData that leads back to a specific point on the overland MapData.

 

Create a variable for currentMapData and wire up your game logic to use the data we specified (such as enemy spawning, or the map's music). 

In your game logic, you can check for the player entering this special "entrance" tile. When they do, you'll want to load up the destinationMap, set the mapxoff, mapyoff, x, y, and set currentMapData to your cave1 mapData.

 

Now when your game loop loads a screen, it should be spawning the enemies specific to cave1's data.

 

I hope this helps,

- Eck

0

Share this post


Link to post
Share on other sites

Well I do have a state machine implemented in the game. Im thinking of this:

When I leave the overworld, Ill leave the overworld state and clear out the map. Once I get into

the cave state, I load up the cave map and draw it in the rendering area of my game loop.

0

Share this post


Link to post
Share on other sites

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  
Followers 0