• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By wobbegong_
      I am taking an absolute beginner's game development course and we have just finished game jams in small groups. Our current assignment is to get feedback from people working in any aspect of game development. I would very much appreciate any feedback! The game is up on itchi.io (sound warning) https://wobbegong.itch.io/zombie-shooter It's essentially a very basic PvE.
      I also have some things I'm wondering about, but you don't necessarily have to answer these. 
      1. Do you have any tips on working with physics? My group wrestled a bit with Rigidbody physics not totally working the way we wanted to -- jumping ended up kind of floaty and inclines seem to mess up movement. Alternatively... how can I build terrains with depth that won't result in wonky physics?
      2. How can I keep up the level of challenge in an interesting way as the player progresses through the waves?
      3. What are some of your personal guidelines for creating title screens?
      Thank you very much in advance!
    • By Ty Typhoon
      ...if you got time to read and answer i would be happy . 
       
      So me and my co try to do a game.
      It should be in unity couse my co do everything in this engine.
       
      We got the rpg package from evila for inventor, but it only runs on pc right now.
       
      I like to make a online store for guns in the game and a multiplayer open world that runs on pc, android, mobile, ps4, xbox one. 
      Somebody told me that you "only" need to program it like so and that its possible in every engine...
       
      So if you are one of the lucky guys who could help me out or programm that, or even if you know a newer better package for maybe unreal which offers that - please let me know now.
    • By ethancodes
      I'm having a weird issue with detecting a collision. I've tried everything I could find online but nothing seems to work. I have a brick object. It has a 2D Collider attached and I have also attached a 2D Rigidbody on it. I also have an EndScreen 2D Collider. The EndScreen 2D collider is tagged with "EndScreen". I am trying to detect when a brick collides with the end screen collider and simply print "game over" in the console. 
      This is my current code for this part of the program, it is attached to the bricks:
      void OnCollisionEnter (Collision2D collision) { if (collision.gameObject.tag == "EndScreen") { Debug.Log("Game over"); } } Several things have happened depending on the set up. If I have the rigidbody 2D set as static, my ball object can still collide with the bricks, but I get no Log message. If I set it to Kinematic or Dynamic, I get absolutely no interaction between the ball and the bricks, and nothing when the bricks pass through the collider. I have tried to set the collider to a trigger and use OnTriggerEnter2D, no change. I have tried to put the rigidbody on the EndScreen object and tried to set it's body type to all 3 settings, no change. The only thing I can think of that I have not done is put the script on the EndScreen object and switch the tag to the bricks. The reason I have not done this is because I will have several types of bricks, some of which will have different tags. 
       
      Please tell me somebody can see what I'm doing wrong here, because I'm losing my mind over something I feel should be ridiculously simple. Thanks.
    • By Sandman Academy
      Downloadable at:
      https://virva.itch.io/sandman-academy
      https://gamejolt.com/games/sandmanacademy/329088
      https://www.indiexpo.net/en/games/sandman-academy
      https://www.gamefront.com/@sandmanacademy
      http://www.indiedb.com/games/sandman-academy
    • By Sandman Academy
      Downloadable at:
      https://virva.itch.io/sandman-academy
      https://gamejolt.com/games/sandmanacademy/329088
      https://www.indiexpo.net/en/games/sandman-academy
      https://www.gamefront.com/@sandmanacademy
      http://www.indiedb.com/games/sandman-academy
  • Advertisement
  • Advertisement
Sign in to follow this  

Unity Conceptual question regarding universe simulator - Unity3D

This topic is 716 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 all. I am currently working on a project, a universe star simulator. I have a dataset of 100,000 stars. In order to deal with the massive scale of the universe I have decided to go with the design of having two co-ordinates systems. One will represent all close proximity stars (these will be loaded as high detail 3D models) and the Second will represent all distant stars within the users fov (These will be drawn at the main cameras farplane).

 

Currently I have my dataset stored within an Octree and I can successfully fetch all points contained within a specified frustum.

 

The design I was thinking of going with was having two cameras within my scene, each representing a co-ordinate system. I would have a variable that I can grow/shrink that would be the conversion rate between the two co-ord systems. I would divide the larger scale by the conversion factor to get to the lower scale. 

 

Question: Would I have my camera2 (distant stars) frustum grow by the conversion rate -> fetch all points within the larger frustum -> generate mesh with these fetched points (this mesh would represent the stars in world space?) and then convert(?) the mesh to projection view using the conversion rate as the translation component? Once I have this mesh I would pass it to be rendered. 

 

Or would it be better to dynamically grow the camera2 frustum collecting all containing stars ray cast from camera1 to each of these and draw the collision on camera1s farplane? How would I apply the conversionrate with this setup?

 

Im brand new to game development and unity so apologies if my questions or explanations dont make much sense, any help would be much appreciated!

Share this post


Link to post
Share on other sites
Advertisement

http://www.gamedev.net/topic/677365-drawing-solar-systems/

 

http://www.gamedev.net/topic/678331-procedural-universe-the-illusion-of-infinity/

 

tl:dr  your data set is only 100 times the size of mine, you probably don't need octtree.  i find a simple flat array of structs to be plenty fast.   draw close stuff as a mesh, and far stuff as a pixel.  

 

just divide everything by your scale factor (i use 100,000,000 for the sun), and don't forget to lerp your mesh scale as you go from coliision rnage to max visual range (at which you just draw a pixel).

Share this post


Link to post
Share on other sites

Hey, this is what i learned so far based on my past experience and documentation:

 

    1. Use double precision

    2. Don't move the camera, move the world around the camera; you'll get most of the precision

        near the origin, so bringing the objects closer to origin is the way to go.

    3. Use a logarithmic depth buffer, it does wonders, really.

    4. Use a scale hierarchy starting from the parsec to the meter for instance.

        (pc, ly, au, km, m)

    5. Render the solar system with AU scale, when you get closer to a planet, use the KM scale, and when you land use the meter scale.

 

    When rendering solar systems, use realistic values and consider 1 unit being equal to 1 AU.

    Now, when you'll get inside the AU scale, in order to prevent the objects suddenly appear or pop larger,

    push the objects in the direction the camera is looking multiplied by the a scale vector.

 

    When the objects are far enough, simply draw them as pixels or don't draw them at all.

    I'd render the stars based on their brightness and distance on a cubemap then use the cubemap

    to render your skybox.

 

The rest should be pretty trivial i guess,  so good luck!

Share this post


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

  • Advertisement