Zelda-Style Background/Map

0 favourites
  • 8 posts
From the Asset Store
Two types of minimap: "full map" and "player is the center" (square map and radial map)
  • How Do I Make a Better Map?

    Okay, I started making a top-down game based on the ghost-shooter tutorial. Things are going well, but I'm worried about the size of my game now.

    The basic concept is to make a background that isn't simply a single repeated tile. At the moment, I have a 2000x2000 pixel image that serves as my background, and I've used about 20 sprites or so to create walls for my character to collide with and enemies to climb over.

    This serves fine for demonstration purposes, and people are enjoying the game- they just want more of a map to explore.

    My first thought was to set up "Edge of the Map" sprites, so when the hero runs over them, the layout disappears, and a new one appears in its place, with the hero standing in the appropriate place. In other words, Zelda 1 Style.

    This is where my problems occur. I don't want to bog down my loading or my game with 20 2000x2000px maps... I'd rather just use 15 100x100 pixel images and make some tile maps.

    I did this once in Visual Basic 6... I made a subroutine that would read a text file and create the map I wanted accordingly on Form Load. (Layout start, here.) For example-

    W,W,W,W

    W,G,G,W

    W,G,G,W

    W,W,W,W

    These four lines of text would be translated into a 4x4 grid that would have 4 Grass tiles surrounded by 12 Wall tiles. But in everything I've read, I don't know if Construct2 even has this capability.

    THUSLY...

    1. Would 20 large background images (like 2000x2000 pixels) be too much for a game I hope to use on mobile devices?

    2. If that's a bad idea, then what about the text file approach? Using only 15 small images sounds like it would save a lot of space, but does the technology support it? I'm not after random maps here, I'm after a 20x20 grid that has a purposeful arrangement.

    3. Is there a better way? Something I'm totally missing? I'm not married to any particular method. I just can't accept having one small image tiled a thousand times without any variety.

    I know this is an incredibly long post, and I thank anyhow who reads it. I doubly thank any who reply, even if it's only to tell me that my post is too long.

  • Try using an array that stores the data you need to check...an array will even let you alter the map and update the info as needed...look up up the various tutorials on the forums and the manual entry on arrays..they can be used in just about any way you can imagine

    Hope it helps...its basically what you are doing anyway....CS2 has a built in function for that...:-)

  • 1. You'd have to test it and see, and then it would also depend on the device. Generally the size of the image doesn't affect speed. Image size does affect memory usage, and keep in mind that mobile devices have less memory than PCs.

    2. You can do that approach. Load the text file with the ajax object and utilize the System text expressions to read parts of the text.

  • 1. You'd have to test it and see, and then it would also depend on the device. Generally the size of the image doesn't affect speed. Image size does affect memory usage, and keep in mind that mobile devices have less memory than PCs.

    Yeah, this is true, you can't be sure of anything until you've tested it thoroughly. I'll have to believe that if angry birds can have a ton of unique maps, then so can I...

    2. You can do that approach. Load the text file with the ajax object and utilize the System text expressions to read parts of the text.

    Okay, so Ajax, eh? I had no idea... I will try to research this more.

    Thanks

  • Try using an array that stores the data you need to check...an array will even let you alter the map and update the info as needed...look up up the various tutorials on the forums and the manual entry on arrays..they can be used in just about any way you can imagine

    Hope it helps...its basically what you are doing anyway....CS2 has a built in function for that...:-)

    Thanks Mystazsea.

    Arrays are a great tool, I just wish I understood them better. I've read the tutorial and several forum entries, but I still have no practical way of understanding them...

    For example, I could do something like:

    System / On Level2 Start /

         System Create S at 0,0 //create sand tile

         System Create G at 100,0 //create grass tile

         System Create W at 200,0 //create wall tile

         etc...

    But that's like a hundred lines of "System Creates" for five levels of 5x5 grids. 5 levels of 20x20 grids would be astronomical...

    I'm not looking for somebody to make my game, but any help on formulating the proper way to make such an array would earn somebody an Associate Producer credit...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So, if somebody has already tackled this, maybe you could point me towards that tutorial/thread? I don't mind searching the forums on my own, but I've been at it for about two weeks without much luck...

  • Might want to look into the TMX Importer plugin by RexRainbow. It allows you to use tiles in your game without building your own editor since C2 isn't really made for that stuff.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)