• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Michael Santer
      Hi!
      We're currently two programmers and a game designer working on a turn-based tactics fantasy board game. For reference you can search for images of "Tactics Arena Online", a fairly dated game that used to have a lot of depth and complexity.
      Our goal is to use the same combat concepts, but giving it a much needed modern touch as well as a whole new set of heroes to choose from with additional abilities. The game is a mix of isometric and 3D and we plan to release the game on Steam and hopefully Android & iOS as well.
      We are looking for someone to work with us pro-bono (just like we're doing) as a 3D character artist. The skills needed are creativity, a hard working attitude and an ability to make minor animations (things like idle, walk, block and very rudimentary attack animations). A perk to have would be the ability to make some VFX. If the game makes it on steam and money starts coming in, you'd obviously be compensated for your hard work, but as it stands this is a hobby project to garnish your portfolio.
      A bit more about the game:
      This game will be an online multiplayer game where each user gets to pick up to 10 characters to place on his half of the board (this would be done before even entering matchmaking. Think runes in League of Legends for example). The user can place his 10 units of choice anywhere he likes on his half board. Some units can be used more than once. So if you want 4 knights and 2 mages or even if you want 10 clerics, you can do as you please. You can then save your setups for future use. The goal of the game is to wipe out the enemy team.
      Each character or Hero (except premium and abyss characters) start with 1 ability and they can ascend (either by playing a certain amount of matches with the character or by forcing the ascension with real money) to gain a new ability or passive. Acquiring a new character can be done by using in-game currency that you earn from playing matches or using real money with the exception of Abyss characters which can only be acquired by winning certain rare matches. The goal is to offer a freemium game with lots of customizable elements while making sure that no user can "buy power" with real money. We want everything that a paying user can get to be available to non-paying users who play the game a lot.
      Ultimately we want this to become a competitive game that people can enjoy and really get invested in. Each character is designed with options for counterplay in mind and synergy with other heroes.
       
      We sincerely believe in what this game can become and we home to find someone just as passionate as we are to get involved in this project!
    • By CrazyApplesStudio
         Hello , i would like to showcase my first game project, a simple endless casual arcade game called Apples Mania : Apple Catcher. The game has simple goal , scoring as high as possible by collecting falling apples while the difficulty gradually increases. Different apples are worth different amount of points and there are also 2 power-ups to help you in your challenge.
        The game took me about 2 months to complete and polish and i made everything except for the music tracks and some of the sound files. Made in unity and blender3d.
        Would appreciate any kind of feedback.
      Google Play Link
       
        A trailer showing basic game-play:
       
    • By Paszq
      Troglodytes are a playable races in Arpago - they usually don't talk much and most of them lives near water sources.
    • By Paszq
      a Fox in a dungeon :)
    • By Paszq
      Fox Folk is one of 3 playable races in Arpago.
  • Advertisement
  • Advertisement
Sign in to follow this  

Unity Unity3D Solar System Issues

This topic is 750 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

Hello. I hope I got this topic in the right section. I have a question about Unity3D.

I've made this scenery that has several prefabs (stars) generated automatically that basically represent a solar system in the galactic map. My noob question is, how can I associate to each of these objects a random number of planets that show up in the UI when I click them. I was thinking about using text files with the names of the systems/planets, but from this on I am stuck. Should I use a database where the game will store planets/ships/other objects and update them as the game progresses? What would be the best approach for this problem? Any help would be appreciated.

The reason I'm asking is because the RTS/4X Unity tutorials aren't really that many and don't cover some of the more advanced stuff, so I was hoping I'd get an idea here. I've attached an image of what I'm hoping to achieve.

 

So I have some stars displayed, and now I need each of them to contain several planets and other things, like fleets, structures etc. My problem is, I don't have many ideas how to do this, since I'm new to game development and programming in C#. Again, any idea would be helpful. happy.png

 

[attachment=31147:Planets.png]

 

 

Thanks in advance!

Edited by 4d69636861656c

Share this post


Link to post
Share on other sites
Advertisement

So, one way to do this, is to seed the random number generator when you click, with some deterministic value.  For example, you could do a hash of the name of the planetary system.

 

Then when the user clicks, it could be something like:


GeneratePlanets(seedvalue)
{
  Random.seed = seedvalue;
  var numPlanets = Random.Range(MinPlanets, MaxPlanets);

  for(var i = 0; i < numPlanets; ++i)
  {
      //instantiate a planet, use Random again to determine its values
  }

}

That should give you the same planets as long as the seed was the same (and no one else is doing anything with random on another thread.

 

EDIT: PS. Unity has a built in hash function StringToHash

Edited by ferrous

Share this post


Link to post
Share on other sites

If you are going to re-invent the wheel, and it may need re-inventing, first look at a wheel.

 

I have been procedurally generating galaxies since the 80's, and so have a lot of other people.

 

Start by reading up on the subject, there are a hell of a lot of sites which cover it.

 

Start with pages like this.

 

http://blog.rabidgremlin.com/2015/01/14/procedural-content-generation-creating-a-universe/

 

Then move on to pages like this.

 

http://stainlessbeer.weebly.com/planets-1-mercators.html

 

When you start to understand them. you can then dive in and re-invent the wheel.

 

I like hexagons myself. You would have to modify the roads to accommodate hexagonal wheels, but they have a lot of advantages over standard designs.

 

smile.png

Share this post


Link to post
Share on other sites

Wow, thank you both so much! smile.png  It's more than I had in mind. ohmy.png

I'll make good use of this info.
 

Edited by 4d69636861656c

Share this post


Link to post
Share on other sites

If you look at the algorithms for most random name generators, typically the way they work is through some sort of schematic or pattern semantic.

 

Observe...

 

The Milky Way

 

The Semantic here is

The [Aspect] [Word]

You have a dictionary for a whole category of different words for each item. Aspect will be things that describes the galaxy, or reasons the galaxy was named. Word is simply something to throw in that feels appropriate. I don't know how you would categorize "way".

 

The Lyana Spial

 

The Spindel Galaxy

 

 

[Three Random Chars] [Random 16bit Hex]

HIP 0bb4

 

[Name] [Number]

Kepler 1882

 

 

As for displaying information. You can hold all relevant information in structures.

Share this post


Link to post
Share on other sites

Thank you for your help.

Right now I'm considering using SQLite to store all the data the main game will have. There's going to be a lot of data in the game besides planets, so I believe this would be the best approach.

I hope I'm not wrong. smile.png

Thank you all again. This was all very helpful.

Edited by 4d69636861656c

Share this post


Link to post
Share on other sites

SQL lite is taking a sledge hammer, gluing it to a nuclear war head, and dropping it on an ant mound to cut paper. In case you don't know what I just said, you're over complicating a simple problem. You can just use a simpler option and edit it with a text pad.

Edited by Tangletail

Share this post


Link to post
Share on other sites

If you get your design correct, you only need to store changes that are created by game play.

 

Say you want to display a star map of the local area. You define a function that determines if a star  exists at a location. This function creates a random number seed from the location and uses this to generate a random number.

 

If it's bigger than X, a star exists.

 

This will never change because the seed is calculated from a position.

 

So instead of having to search through a database looking for all stars within a given range of (x,y,z), building a list of results, parsing them.......... sleep.png

 

You just do a quick and simple check on the locations you need to.

 

Databases are evil when it comes to these types of games.

 

Just think about how much data you would need to store.

 

A billion stars in the universe (small universe....) 1 billion bytes just for star type. Then names, spectral parameters, planets, towns, cities, people......... 

 

Are you planning to ship this game with a quantum file storage device ? Of course not. So stop thinking about storing information you don't need to and start thinking procedurally.

Share this post


Link to post
Share on other sites

SQL lite is taking a sledge hammer, gluing it to a nuclear war head, and dropping it on an ant mound to cut paper. In case you don't know what I just said, you're over complicating a simple problem.

Databases are evil when it comes to these types of games.

 

laugh.png  Well, this is my first "big" Unity experiment/project. I'm rather new at this, so thanks for pointing this out. I'll make sure to stay away from the evil databases.

I'll look into procedural generation and PlayerPrefs instead.

Share this post


Link to post
Share on other sites

SQL databases are not bad, they just operate under different assumptions and serve a different purpose than games.  Many games use databases for certain things.

 

SQL-based databases are usually based on queries and are generally built so they search for data spread across multiple sets of data, and frequently will jump out to disk. The queries take time to run, on the order of 10ms, 50ms, or sometimes longer. They can be viewed by many different tools.

 

Information like player account information and login details that are rarely accessed are great for these databases. The game can look at the details using SQL calls, the web site can look at the details, the billing and accounting system can look at the details.  

 

For reasons that should be clear, since an SQL database query can take multiple graphics frames to run, these requests should be run in the background while the data is fetched.

 

Long-running persistent games (like MMORPGs) store quite a lot of the persistent data in SQL databases. It is loaded from the database into the game world when you log in, and whenever you pass a checkpoint or key event the data gets written. The data is not used moment-to-moment, more like a save file. 

 

 

Game data used in the game is generally implemented as data sets in code that can be looked up on the order of nanoseconds as collection containers, game objects, or other arrays and pointers and whatnot. This data is held in main memory and directly accessed.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement