Page 6 of 15

Posted: Sun May 18, 2008 9:27 pm
by Eric Walch
matt634 wrote:
Very cool building..... love the idea of adding dockable cities to the already existing planets. They would make great targets for raiding :twisted: and some should be well defended by plasma cannons and/or missiles.

And fighters of course :evil:
Has anyone already thought about how to put the buildings upright on the surface?

Posted: Sun May 18, 2008 9:45 pm
by pagroove
Great Building.
If you need textures p.m. me. 8)

Posted: Sun May 18, 2008 11:31 pm
by Frame
Eric Walch wrote:
matt634 wrote:
Very cool building..... love the idea of adding dockable cities to the already existing planets. They would make great targets for raiding :twisted: and some should be well defended by plasma cannons and/or missiles.

And fighters of course :evil:
Has anyone already thought about how to put the buildings upright on the surface?
Lestradae did manage to put a base right onto the surface of a planet, but he did this manually though.

i hope we can be able to use some sort of calculus since we allready have the diameters of planets.

if i can get a model of a planet, and get the scales right, i could adapt the base of the model to hug the surface or be very near the surface..

to stand upright, i dont know how yet to make sure that is allways the case, quickly thinking, if we cant rotate a model, i hope we can point it towards a point in orbit, the building then orientates itself towards that point somehow, i would love a no collision flag here though, so that it do not hit the surface while rotating.. a basespeed of 0, and a command to fly to a destination in orbit could do the trick quite nicely. but i have not tested that scenario yet...

having the building rotated in the first place before spawning, and then testing how it will behave on the surface of different sized planets seems maybe the bestway to go..

to calculate the surface you need simply the planets posistion + radius of the planet, then if the pivot of the building is at the bottem of the model you should in theory always clear the surface.

offcourse what happens ingame is another story, it allways is ;-)

...

Posted: Mon May 19, 2008 7:49 am
by Lestradae
Just a quick note about how-To put a building on a planet:

1. You use the same internal coordinate system that placed/places the planet

2. You see to it that your building is on the SAME coordinates in two dimensions (i.e. the planet being at, say, spm 100000 100000 600000, the ground station at spm 100000 100000 600000+planetary radius)

3. Regarding the orientation, just put the station whereever its orientation already works.

As a pilot coming from a great distance doesn`t notice that all planets of a given type have the same radius anyways (if additional planets are done that way), that the ground station/buildings are all in right angles to main planet/sun etc., why not make it easy as in physics where you just use your coordinate system in a way that makes everything as easy as possible without resorting to monstrous coordinate transformations all the time.

Bit more difficult for the main planet, though, but using something along the lines of pwm "planet radius" "planet radius" "planet radius" (in "metres" times 10 for some reason, methinks) you should get a positioning in a 3D diagonal from the main planets core.

Actually, make that "planetary radius" + five metres more than half the length of your building.

Not sure if all of the above is entirely correct fired out from scratch, but should be, basically.

Keep it up (and, actually, I`m also intrigued by the idea of main planet ground stations anyways, with or without an expanded solar system, be it to raid, to trade or just to visit the capital of a system!)

L

Posted: Mon May 19, 2008 8:05 am
by Dr Beeb
Disembodied wrote:
Along the lines of "less is more", perhaps it might be an idea to reduce the number of multi-planet systems... just a feeling, but it might be better if these were occasional "wow!" places to visit, rather than just commonplace additions which players might become blasé about. Maybe it should only apply to Rich systems; or even Rich systems above a certain TL and population limit? (They could be the only ones who could afford to sustain multi-planet colonisation, with all the extra station upkeep, police patrols etc.)

If there were only a handful of such systems -- say, two or three -- across each galaxy, each one could be hard-coded with interesting "special" locations, where unique items, missions, cargos, ship-types etc. could be found. With long travel times I think a lot of players will have to be given a big incentive to make the effort. Otherwise I think there's a risk of a bit of initial sightseeing, followed by a lot of "nah... not this time".

This is not to disparage the main idea! But if players are asked to put in a lot of effort then there would have to be relatively big payoffs. "Wow!" is, in itself, a big payoff: the spectacular and the strange have a big appeal. But asking them (us!) to trek across a system to find cheap ores or alloys or gemstones probably isn't enough to do it more than once or twice.

Some possible "special" places could be:
  • Scientific/technical outpost (where they look for volunteers to test new equipment/weapons/ships)
  • Prison planet
  • Archaeological dig site (requiring specialised equipment, and shipping out antiquities)
  • Anti-Thargoid early warning station
  • Breakaway/rebel colony
  • Duelling zone
  • Religious cult HQ
  • Interdicted world (plagued by Von Neumann machines or runaway nanotech)
  • Other...
I like this list of sites,

add
  • Mining sites, including Cloud-cities at gas giants
  • Planets, moons that need surveying, scanning, for natural resource exploitation, maybe in competition with others, stake claiming.
  • Rescue operations, salvage operations from planets used for nuclear bomb tests etc.
  • Help Navy with Thargoid eradication, colonization attempts on worlds inhabitable to Thargoids but not to GalCorp species.
  • Yet more others ...
I can see a lot of mission/feature oxps would be possible once the framework existed. I see no problem with systems having lots of planets and moons just so long as they are very far away visually from the witchpoint that brought you into that system and near to the PRIMARY inhabited planet (which has primacy in broadcasting its market prices throughout the whole system, but see fun below).

In reality (and thankfully helps coding in Oolite) it would be very very rare that any other planet, moon would have a large population. So general trading with them is moot - the main planet supports and defends any colonies, space stations, in its system. Of course OXPs could introduce missions related to the site lists above, or even introduce off-world large communities with new trading systems (with prices that are not known until you are in orbit around that planet?) Or even do have two or more comparable inhabited worlds, with space lanes, warfare just bubbling below the surface, jamming system-wide market-price broadcasts etc.

If the sun needs to move further away from the home planet than in Elite then there should probably be a level-2 jump system that kicks in after 15s of no mass locks with the usual jump system, but drops down to normal jump speed once a mass lock occurs x10, 250 km ? further out than the level-1 jump system. So the time-scale for the player to reach the sun from the home planet remains essentially unchanged from Elite. And with no idiots tootling along in space lanes between planets, visiting another planet other than the primary should not be too onerous.

The range of planets, moons, at each system could be procedurally, randomly, placed or follow an approximate scheme. For example if the sun is small and red there are probably many large rocky worlds, maybe more than one inhabitable. A sun like ours (medium yellow, green) maybe gives a system similar to ours. Big white stars maybe not many planets, some gas giants very far out. Very big blue stars, nothing but of course at least one inhabitable planet to explain its existence in Elite. And don't forget ice dwarf planets, comets, even further out for all systems, and the occasional gas giant wandering in quite close to the star (but not many terrestrial planets anywhere nearby to them).

Posted: Mon May 19, 2008 11:19 am
by Eric Walch
Lestradae wrote:
Bit more difficult for the main planet, though, but using something along the lines of pwm "planet radius" "planet radius" "planet radius" (in "metres" times 10 for some reason, methinks) you should get a positioning in a 3D diagonal from the main planets core.

I was just curious because I am already a few weeks busy how to align a station around a planet. One of the "rotate" functions I need for that seems to be not working. For building placement you need similar functions as I do. Problem is that you need quaternions for setting an orientation and not just vectors.

Today I used my last method: just take the orientation as it is and place it as a position were the orientation matches. Next ship-script will do the trick. Just spawn the ship at a random position. Then the startup script of the ship will kick in and place the ship around the planed at a position were the orientation is aligned.

Code: Select all

this.shipSpawned = function()
{
this.ship.setPosition(system.mainPlanet.position.subtract(this.ship.orientation.vectorForward().direction().multiply(system.mainPlanet.radius * 2)))
}
I just tested this for my station. For a building you probably need system.mainPlanet.radius + "building dimension" instead of system.mainPlanet.radius * 2. And when the building is standing "upside down" replace "subtract" by "add". That way it will be upright on the other planet side.

But note: you have no control were on the planet the building is placed this way.

EDIT:
When you need control over the position:

For a better orientation of buildings you can use next code in the ship-script of the building:

Code: Select all

this.shipSpawned = function()
{
  let targetVector = this.ship.position.subtract(system.mainPlanet.position)
  let angle = this.ship.heading.angleTo(targetVector)
  let cross = this.ship.heading.cross(targetVector).direction()
   // align the heading to the targetVector
  this.ship.setOrientation(this.rotateQ(this.ship.orientation, cross, -angle))
}
This code auto-aligns the building to the mainPlanet on the place it was added. But you can also replace mainPlanet for any other planet or object.
rotate is not currently working, but Ahruman showed in page 11 of the "scripters-cove" forum code to implement your own rotate function for quaternions: this.rotateQ

Posted: Wed May 21, 2008 1:03 pm
by Commander McLane
Just a humble remark, although it will cause a lot of extra trouble for the positioning of buildings:

Have you considered that planets usually are rotating? This means positioning a ground structure at a fixed point on a planet will not give any realistic impression at all, even if it has the correct outbound orientation. The planet will turn away under it, while the structure remains fixed.

So for a realistic visual impression the buildings will have to move in a circular orbit, a few meters above the planet's surface. And of course constantly change their orientation in the process.

To make things even more complicated: Depending on their latitude on the planet's surface, they will have to rotate on their lines of latitude, not just on the equator or any meridian. Therefore a building close to the pole will go in a very small circle (a building exactly on the pole will just turn around itself), while a building on the equator will go the biggest possible circle (equal to the planet's diameter).

And as if this all wasn't enough, it gets even worse: If we are talking about textured planets (like in System_Redux), we have on top of that to deal with the fact that the rotational axis of Oolite's planets it not related to the poles defined by the texture. So the optical north and south pole (which are easily identifiable on at least some of the textures), are wandering randomly over the planet, instead of the planet turning around them.

A lot of work to do, in order to make ground structures realistic and believable.

Posted: Wed May 21, 2008 1:11 pm
by Frame
Commander McLane wrote:
Just a humble remark, although it will cause a lot of extra trouble for the positioning of buildings:

Have you considered that planets usually are rotating? This means positioning a ground structure at a fixed point on a planet will not give any realistic impression at all, even if it has the correct outbound orientation. The planet will turn away under it, while the structure remains fixed.

So for a realistic visual impression the buildings will have to move in a circular orbit, a few meters above the planet's surface. And of course constantly change their orientation in the process.

To make things even more complicated: Depending on their latitude on the planet's surface, they will have to rotate on their lines of latitude, not just on the equator or any meridian. Therefore a building close to the pole will go in a very small circle (a building exactly on the pole will just turn around itself), while a building on the equator will go the biggest possible circle (equal to the planet's diameter).

And as if this all wasn't enough, it gets even worse: If we are talking about textured planets (like in System_Redux), we have on top of that to deal with the fact that the rotational axis of Oolite's planets it not related to the poles defined by the texture. So the optical north and south pole (which are easily identifiable on at least some of the textures), are wandering randomly over the planet, instead of the planet turning around them.

A lot of work to do, in order to make ground structures realistic and believable.
afaik planets dont rotate, the sky does though,, but im not sure.. checking...

Edit: nope it is the sky that is moving, not the ground itsself..
jsut sat a good 5-7 mins and looked at lave, its continents didnt move

Posted: Wed May 21, 2008 1:22 pm
by Kaks
nope, they do rotate, albeit slowly... Even though you could reposition the structure using javascript & a timer in the oxp, I don't think there's a way of getting the rotation speed & planetary axis position from within javascript...

What about having floating cities inside the atmosphere? Kind of goes round this problem, but will have to be used very sparingly, can't expect every planet to have them, and having more than 3 or four in a single planet might be overegging it...

Posted: Wed May 21, 2008 1:28 pm
by Frame
Kaks wrote:
nope, they do rotate, albeit slowly... Even though you could reposition the structure using javascript & a timer in the oxp, I don't think there's a way of getting the rotation speed & planetary axis position from within javascript...

What about having floating cities inside the atmosphere? Kind of goes round this problem, but will have to be used very sparingly, can't expect every planet to have them, and having more than 3 or four in a single planet might be overegging it...
Cloud Cities ?... Well it would eliminate the collision problems with the ground

Wonder if I still got the models from the cloud cities in Galactic ConQuest mod, for bf1942 ;-), on the other hand... naa, to many polies, like 700 pr Render model building and there where like 20 of them..

But yeah Cloud Cities sounds good, what do other ppl think, that way we could in theory make people shop around for different goods at different buildings like in that game Extention or what its name was, inside a net of buildings hovering on some sort of disc.

Posted: Wed May 21, 2008 1:46 pm
by Frame
i just made a Quick mockup of an idea i got..

Basicly you have to enter a dome to fly inbetween the different "stores"

here is the mockup

Image

The dome offcourse cant be transparent as ahruman stated earlier... but this also fits neatly for Gas giants

Posted: Wed May 21, 2008 2:59 pm
by FSOneblin
@ Frame I'v had that Idea for a while now. But I could not get anything in wings 3d. That is a good mockup you have there, I think some of the stores should not have sellable stuff, but great buyable stuff. You should have to buy a landing license, It won't do anything, but it would be cool.


Don't panic: FSOneblin

Posted: Wed May 21, 2008 4:35 pm
by pagroove
I propose something else.

Why not look at the way Freelancer did planets. They implemented docking ports. In our add on this can be named as entry points. It's a point where you enter the atmosphere. Instead of making problematic models for cities we could then just concentrate on making exciting new types of stations. The agricultural factory for example looks just as good if it is a station. I also liked the way Freelancer did the impression of landing in a city. After you enter an 'entry point' a new city interface (like the station but with illustrations) could bring new options.

The solution of Ad Astra (only the planets and not the models )is of course more elegant but then we have to find a way to 'render' a planet including landmass and mountains with a sort of fractal technique (like Ad Astra does). I have a copy of this on my HD just to compare. But gameplay is far better in Oolite.

But hey, who did say that this will be an 'easy' OXP

But these are just my 2cts :D

Posted: Wed May 21, 2008 4:37 pm
by pagroove
BTW:

It should include a combination of cloud city's AND landing pads. But IMO the landing pads could be done with the entry points.

Posted: Wed May 21, 2008 9:34 pm
by nijineko
i agree with the entry points idea, personally. also, would it be possible to use the witchspace code to generate the inside of a city that one can fly around in? so once you have "docked" it takes you to a psudeo-witchspace location that has a big sphere or dome with the city buildings inside of it, then you can fly around and 'dock' with the different buildings. just some thoughts.