Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Spherical Planets/Worlds

onceforloops
Registered User
Quote
2022-07-16 00:09:28

There is an app on itch.io called planet painter. It splits up spherical terrain. Can anyone help me with figuring some kind of system to change/switch scenes between each mesh? How would you place proximity sensors mathematically with js code so that your player could from one tile to the next? and set up a spherical terrain/open world? I know that's a lot to ask for. But has anyone looked into this for CC and what can we do to make it possible?


onceforloops
Registered User
Quote
2022-07-16 00:24:50

One idea I have is that you could have a minature version of the sphere in the same scene, way outside the play area, where it plots out the point where the player is on the sphere. But I don't know how to code well at all, so I don't know how to place these sensors across a sphere so that the gameplay area gets updated as to what scene/location the player is at...


onceforloops
Registered User
Quote
2022-07-16 00:28:23

More or less, the minature sphere would act like a master sphere, controlling the behavior of the game. If you could figure out how to place these sensor points across seperate vertices along the sphere it would simple as knowing good CC api, ccbSwitchScene or "On Proximity"...."Change Scene"


onceforloops
Registered User
Quote
2022-07-16 03:18:46

I scrolled through your discord channel JustInCase, was excited just now when I found the link to JaimeZelgpi's gravity action and downloaded and tested it. VERY COOL! Hopefully his action will really help me do what I want to do...:) If not it is amazing anyways...


just_in_case
Moderator
Quote
2022-07-16 08:17:56

I searched itch.io for planet painter, but I still don't get it, it only allows to change the color of the planet based on the rocket position.

I don't know what do you mean by splitting the sphere and changing scene.

Do you want your player to be on the sphere and when it reaches to a specific position then you want to switch scene or what?

If you can point to video or the original link to the game that you were talking about. Then it will be much easier to help you out.

if you want to simply check the position of the player on the sphere and wants to change the scene then yes you can do that.
simply attach a dummy node on and make it children of the sphere mesh, and then on to that dummy node, you can attach the on proximity behavior, and checks the proximity with the player, and attach the action to switch the scene in the proximity action.

as you said you don't know how to code well, you don't need coding you can also do that with the inbuilt actions and behaviors.

All you need is create an empty dummy node and make it children of the the sphere(planet) and do the above mention proximity thing on the empty node, and now the empty node will act as sensor for your game.


onceforloops
Registered User
Quote
2022-07-16 17:37:43

Ok. But then How could I place evenly spaced child nodes along the surface of the sphere??? An array? I don't know, but maybe you could help if you have time. No pressure. Right now I'm just trying to make some landmarks and the sphere rotate in the next scene so gravity is up/down in the y direction.
I thought I had JaimeZelgpi's gravity action working for me but it is not, at least I may have not implemented it correctly...


onceforloops
Registered User
Quote
2022-07-16 20:03:50

I want to make small traversable worlds that you can actually go around a planet and end up in the same place after a lot of walking...


Aiming_bullets
Guest
Quote
2022-07-16 22:02:43

I think he want to create a game with planets on which the character walks, but instead of having a gloval gravity he wants the gravity source to be that planet, so that if character is in the downside of the planet, it won't fall due to global gravity but should stick to the planet.


onceforloops
Registered User
Quote
2022-07-16 23:30:16

Yes, and I want the planets to have some element of feeling "large" in size, so I would want to use LOD and some kind of splitting the spherical terrain into different sections...


onceforloops
Registered User
Quote
2022-07-16 23:30:58

A single player space RPG in other words...


just_in_case
Moderator
Quote
2022-07-17 05:26:24

Ahh okay, now I got it, what you can do is you can create the planet with all the sections( playable areas) on it. Scale your player (character) a bit higher than the usual scale, so that he will be visible more clearly when walking through the planet.

And I think that you don't need your player to go around the planet, It will be okay, if your player is not walking but only playing the walk animation , on a fixed position and the planet is rotating.

As I suggested in my previous post, you can use empty nodes with proximity as sensor to trigger something. So on your planet you have these sensors and when the player comes in proximity with them, it will show a 2D overlay and if the player presses a key then enter the playmode for that section.
all you need to do is scale the player down and let the camera follow him, it will look much better if you scale him animated, You can use the third person camera, so that when you scale him, the camera automatically chases him, as the player will scale down, the planet will become large automatically and will become playable by the player.

you might also need to change the position of the player, when you are scaling him, so that it won't look odd, and the player remains on the planet.

Hope this helps.


onceforloops
Registered User
Quote
2022-07-28 17:40:59

I guess I don't understand, would the planet rotate according to player WASD input? How would I do that? I want the player to be able to seamlessly transition throughout a planetary terrain, and still make it seem like there is Y gravity. Or, at least though seperate sections, because I can imagine a large scene would crash CC like that...That's why I mentioned LOD..


onceforloops
Registered User
Quote
2022-07-28 17:42:48

Think No Man's Sky but much more scaled down...


santito
Registered User
Quote
2022-07-28 20:10:51

What'a you know.....this classic subject of a FPS camera moving about on a spherical surface is being talked about again :-)

Trying to implement this on Coppercube has been discussed on this forum for years now. I think I was the first one who brought up the idea back in 2014: https://www.ambiera.com/forum.ph...

And then about a year later "aion" brought up the subject again: https://ambiera.com/forum.php?t=...

In both of these threads, Niko had plenty of commentary on how this could be done. Game engines like Blender, Unity, BabylonJs and Unreal Engine all have working examples of spherical (planetary) gravity for FPS cameras.

I have a couple of ideas on how this type of camera navigation can be done in Coppercube, but since I am not really a good coder I can't really explain it correctly. What I can do, is to give a very basic visualization on possible implementation idea. For this to work, Coppercube's general scene gravity will have to be disabled, set to 0.

🔎︎



onceforloops
Registered User
Quote
2022-08-11 18:08:38

Sorry JustInCase, I'm having more problems getting my sphere world to work, do you think if you have time you could try and make ccb for me?
Thanks


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact