- Home /
Infinite Space in Cube
I have a space-like game, and you control a spaceship in this space. I have a particle system in this scene, at 0,0,0 and it is 100x100 in scale.
I would like my particle system to expand or to be duplicated, when near a side of this cube of particle system. It's formed as a cube, so theres 6 sides you can enter from or exit.
An example of this can be played here: http://difficultystudios.com/games/play.php?id=5
I've tried some solutions, like test if the players position is near a wall of the cube side, doesn't really work well, to be honest.
Any ideas?
Answer by Bunny83 · Jan 13, 2013 at 05:35 PM
From what I've seen i would suggest a way easier approach. Just move the particlesystem along with your space ship. Just make sure the particles are simulated in worldspace so they don't move along with your ship.
You could even make the particle system a child of your ship and use a sphere area around your ship.
Answer by $$anonymous$$ · Jan 13, 2013 at 03:40 PM
I think you should make the particle system smaller in size, because you don't see the whole thing through anyway. Also, think of a setup like this:
This is 3x3x3 = 27 cubes. The middle cube is where the character always should be. This implies that if the character moves to another cube, the system must be adjusted so the player is in the middle cube again. This can be achieved by repositioning the "left behind" cubes so the system is in the correct state again.
This way there's no strange immediate change of the particle system, because the immediate surroundings of the player remain in their place, only cubes that are more far away need to be replaced, making the transition smooth.
I hope I explained it clearly enough.
Btw. the game looks pretty nice, but I would use a nice space skybox and use much smaller particles, so they would be just floating dust, adding to the impression of moving through space.
I kinda get yes, but if you just hear me out, my plans i was going for, is a kinda $$anonymous$$inecraft-like generation style, so you can explore, find new planets and resources, that spawns randomly, whenever you travel a distance. This cannot be accomplised, if this 3x3x3 is static in one place. Hope you know, where i'm getting at.
Yes it can, because that is a different thing. I guess these particles are not your planets, they're just there to give the implression of moving, no? This whole thing can be just a component of the character, and you could still generate planets randomly in space. This system is not static by the way, it moves with the player, wherever it travels.. and it seems random since the particle system itself is random.
I see, so if i get this straight, what you mean is like this. If i entered the top left cube, then that cube would now be the middle and all other cubes, would be moved around that cube, so it's like the start again, but its position is changed.
Yes, that's what I was thinking.. replace the other cubes so the player's cube is in the center, but this is a local change to the cubes, the player can go anywhere, the cubes just follow it, to give the impression there're particles everywhere.. but since you don't see far away particles, you can just use this system, and it will never get out of control in terms of performance.
Your answer
Follow this Question
Related Questions
BigInteger/BigRational 2 Answers
Beyond boundary flat extension terrain? 1 Answer
Random generated debris in empty space 1 Answer
How to create a distant asteroid field? 2 Answers
How can I go about creating an "Infinate" asteroid field?? 1 Answer