Sign in to follow this  

Unity 2D Space Map

Recommended Posts

Hello Game Dev community! This is my first post., but I have lurked for a while here. I'm a solo indie planning my next game.

I searched the forum and the web and wasn't able to find any great sources for this topic, so I was hoping you could help me! My apologies beforehand if I missed something.

I'm trying to build a space exploration game, with a ship mode and a player mode. As in, the player can either be piloting their ship in a top down twin-stick kind of mode, or a more traditional RPG mode where the player can walk around and interact with other characters. This will all be in 2D, top down. My current plan involves XNA.

I'm running into a problem figuring out how to best handle my space-mode maps. The player-mode will be relatively painless, a tilemap. But I'm at a loss as to the best way to create a galaxy. I'm currently thinking that I will break up space into solar systems and there will be a travel mechanic to go between these sytems. So the maps will actually be individual solar systems, not all of space. I have a few ideas on how to store this, but I was hoping to get some feedback before I really started rolling.

I was thinking of a XML file defining a point, an asset to use for the planet's graphics, and a scale. And then I'd read that file. At first I would manually edit it and maybe eventually put together an editor. I want to support asteroid belts as well so being able to define a path to draw along would also be useful.

So, anyways, I have a few ideas, but I'd love to hear from some other programmers before moving forward. Thanks for any help.

Share this post

Link to post
Share on other sites
If your solar system aren't too big, you could stick to the grid based mapping. You could also move onto an oc/quad tree design, instead of having everything on a fixed grid. Using an xml file is perfectly doable... though editing it by hand is going to become a huge pain the more you have to add to it. But along with an editor, it's a decent way to store information, not the fastest but it is friendly to the end user if you allow modding.

Share this post

Link to post
Share on other sites
Since I want exploration to be a big part of the game, I'd like to make the map fairly large. Larger than I see my tile maps being. For the player-mode I plan on using Mappy to generate tile map files, and designing a galaxy to the scale I'm thinking in Mappy would not be easy.

EDIT: Also, the solar systems will not have too many objects in them, so I think hand-editing would not be so bad.

Share this post

Link to post
Share on other sites
This sounds very similar to [url=""]Planet's Edge[/url]. In it, you can be on a planet, interacting with characters, or flying around in your space ship. There are stars in the galaxy map, and when you hit a star with your ship, it takes you to the star's system where you can see planets orbiting the star. If you travel outside the boundaries of the solar system, you go back to galaxy map, exiting from the star that you hit, in the same direction that you left the solar system.

For star placement in the galaxy, I had a similar [url=""]problem[/url], the proposed solutions may help you. For solar system, do you want it to be real-time or static? If static, you can get away with randomly generating points for planets to be on (random radius * random angle) -> convert to x,y position. If realtime, you can generate random radius for each planet, assign orbit speed, and update the angle of the planet in relative to the star in middle, then convert to x,y position again.

Share this post

Link to post
Share on other sites
Hmm, I actually hadn't considered yet having the planets move, yet that makes so much sense :D Your navigation sounds nice and smooth, similar to Mass Effect 2's as well which I really enjoyed. I haven't decided between that and actually warping between systems through a navigation menu or something. I'm kind of a Trekkie so I like the idea of warping around...

Thank you for the link Zeraan I'll check it out.

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  

  • Announcements

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Similar Content

    • By koto

      I'm developing a roguelike game. Currently it's in a playable state and I think it's a high time to show it and hopefully get some feedback.

      The game has following features:
      - turn based
      - procedurally generated levels
      - tons of loot
      - spells system
      - trading system
      - some quests
      - some limited crafting
      - door/key/lever mechanics
      - quite a lot of different (look/behaviour) monsters

    • By Afambus
      I have a full experienced team that looking for a composer and another 3d designer, im expecting as much from you there are other people in this server that can help you we have a determined team, we have done many things in our game there is more information in the discord about everyone and there skills there region and about the game, if you join the discord pm asap
    • By BAG Labs
      Mobile SoS

      Platform: Android
      Genre: Board
      Link: Google Play
      This games sharpen memory and test your strategies to place S-O-S pattern within time limit and serve 3 difficulties as Easy, Normal, and Hard.

      Goals of the game is to put S-O-S words in patterns (Horizontal, Vertical, and Diagonal) alternately with enemy.
      Single Player Multiplayer Achievements Leaderboards  



      Link: Google Play
      Please help us improve this game with review
    • By abarnes
      I am a game development student in my second year of a three year program and I would like to start building my portfolio. I was thinking of creating some games to show what I can do to potential employers since I wont have any work related experience when I graduate. But as I'm sure you all know there are tons of ways to approach developing/designing a game and I'm curious if anyone had any insight as to any "standards" that come with this? Is it okay to use game engines like Unity, Unreal, Game Maker etc? Or would it be better to make a game from scratch to better show case your skills? Any and all advice will be greatly appreciated!
    • By Hilster
      Hello 2D Artists,
      I've started making a 2D Puzzle Adventure game for mobile and I'm looking for someone who would want in on creating assets for the game. The core of the programming is pretty much complete, you can walk within the grid laid out and push boxes, when there is an object on top of a pressure pad it will activate the linked objects or if there is one object with multiple linked pressure pads it requires you to activate all points for the object to become active. 

      The level iteration for the game is quick and simple, a Photoshop file that is made of individual pixels that represents objects is put into the game and it creates the level out of those pixels with the assigned objects.
      The objects that need sprites created so far is the character, box, pressure pad, door, trap door, the walls, the stairs and the tiled background.
      I intend to add more objects so the amount I'd like to add will be extended.
      My motivations for posting here is to have something that looks nice to be able to display on my portfolio, so if you're looking for a working game that you can place your art into and improve the look of your portfolio then we're in business.
      Please reply with a few past examples of your art below and I'll be in touch!
  • Popular Now