Brainstorming for a MultiUser OXP

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

Cholmondely wrote: Mon Jul 12, 2021 1:50 pm
Making efforts to "borrow" an e-mail address from a family member. I just hope that they won't deluge the e-mail with unending mountains of codswallop.
Watch out! An email address and an XMPP address look the same, but one is used for email (SMTP, IMAP, POP3 protocols) while the other is used for XMPP. I used to have an email provider that also offered XMPP services so I had one address for both. Meanwhile XMPP is stopped, and I miss that functionality.
Cholmondely wrote: Mon Jul 12, 2021 1:50 pm
Yes, I downloaded the "developer release" for Spara's tutorial and used the Debug Console there.
So you are familiar with that setup. That is good. :-)
Cholmondely wrote: Mon Jul 12, 2021 1:50 pm
1) What is XMPP?
2) What is "the standard client" & what is "that setup"?
1) XMPP is the Extensible Messaging and Presence Protocol. There are lots of resources on it at https://xmpp.org/. XMPP is the protocol that allows us to exchange messages the way Oolite actually requires. We do not have to develop our own protocol. We do not have to develop the central servers. We do not have to host the central servers. BTW, a lot of onling gaming takes advantage of it, e.g. https://xmpp.org/uses/gaming.html

2) The standard client does not exist. Unlike whatsapp, which is a service that can only be consumed by whatsapp users, XMPP is just the data transfer standard. People are encouraged to build their own clients, so there is no standard client. Compare it to Email. Regardless whether I use Thunderbird, Outlook or emacs to write my emails, you will be able to read and respond on the OS of your choice with a client application of your choice. There is no 'standard client', and that's the beauty of it.
For XMPP the protocol messages are transferred instantly (well ignore small latencies) and you can customize the messages. This will get interesting when we covered basic communication and want to go further to the game mechanics. Examples are not to just send text messages but have cargo deliveries, payments or contracts.
So by choosing XMPP I decided not to be stuck on a specific server or client while at the same time keep doors open for more specialized messages we may want to transmit.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Brainstorming for a MultiUser OXP

Post by Cholmondely »

hiran wrote: Mon Jul 12, 2021 3:48 pm
Cholmondely wrote: Mon Jul 12, 2021 1:50 pm
Making efforts to "borrow" an e-mail address from a family member. I just hope that they won't deluge the e-mail with unending mountains of codswallop.
Watch out! An email address and an XMPP address look the same, but one is used for email (SMTP, IMAP, POP3 protocols) while the other is used for XMPP. I used to have an email provider that also offered XMPP services so I had one address for both. Meanwhile XMPP is stopped, and I miss that functionality.
Cholmondely wrote: Mon Jul 12, 2021 1:50 pm
Yes, I downloaded the "developer release" for Spara's tutorial and used the Debug Console there.
So you are familiar with that setup. That is good. :-)
Cholmondely wrote: Mon Jul 12, 2021 1:50 pm
1) What is XMPP?
2) What is "the standard client" & what is "that setup"?
1) XMPP is the Extensible Messaging and Presence Protocol. There are lots of resources on it at https://xmpp.org/. XMPP is the protocol that allows us to exchange messages the way Oolite actually requires. We do not have to develop our own protocol. We do not have to develop the central servers. We do not have to host the central servers. BTW, a lot of onling gaming takes advantage of it, e.g. https://xmpp.org/uses/gaming.html

2) The standard client does not exist. Unlike whatsapp, which is a service that can only be consumed by whatsapp users, XMPP is just the data transfer standard. People are encouraged to build their own clients, so there is no standard client. Compare it to Email. Regardless whether I use Thunderbird, Outlook or emacs to write my emails, you will be able to read and respond on the OS of your choice with a client application of your choice. There is no 'standard client', and that's the beauty of it.
For XMPP the protocol messages are transferred instantly (well ignore small latencies) and you can customize the messages. This will get interesting when we covered basic communication and want to go further to the game mechanics. Examples are not to just send text messages but have cargo deliveries, payments or contracts.
So by choosing XMPP I decided not to be stuck on a specific server or client while at the same time keep doors open for more specialized messages we may want to transmit.
Well, I dug around in your XMPP link and managed to register an account: [email protected]
I also have "Adium" downloaded, but can't seem to get it to do anything whatsoever with "[email protected]"... I have come to the fulsome realisation that I have not the foggiest idea what I am doing, what I should be doing or how to do it. I don't understand what Adium does, I don't understand what "[email protected]" does (sounds nice and complicated, though!)... etc., etc., etc. You know, I could have finished building my spanking new semaphore tower by now... maybe I can ransack one of Phkb's nice new Generation Ships for the wood! If you hold it down, and I can get my hacksaw out...

Image
Last edited by Cholmondely on Thu Oct 21, 2021 3:22 pm, edited 1 time in total.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

Cholmondely wrote: Mon Jul 12, 2021 10:00 pm
Well, I dug around in your XMPP link and managed to register an account: [email protected]
Excellent. The account sounds very realistic this time. I sent you an invite from mine. :-)
Cholmondely wrote: Mon Jul 12, 2021 10:00 pm
I also have "Adium" downloaded, but can't seem to get it to do anything whatsoever with "[email protected]"... I have come to the fulsome realisation that I have not the foggiest idea what I am doing, what I should be doing or how to do it.
The advantage of the flexibility is at the same time a downside. I do not know Adium - it is a MacOS only client and I do not have a Mac.
In principle you need to configure this client so it tries to connect to kode.im and authenticate as user cholmondely.

I just checked the Adium documentation for you. That client can talk many different protocols but does not mention XMPP. However it mentions the historical yet still referred-to name Jabber. So try to configure a Jabber account, entering your XMPP data.

And don't give up - you are almost there.
Last edited by hiran on Mon Jul 12, 2021 10:51 pm, edited 1 time in total.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Brainstorming for a MultiUser OXP

Post by Cody »

hiran wrote: Mon Jul 12, 2021 10:31 pm
So try to setup a Jabber account
'Twas brillig, and the slithy toves...
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Brainstorming for a MultiUser OXP

Post by Cholmondely »

Cody wrote: Mon Jul 12, 2021 10:46 pm
hiran wrote: Mon Jul 12, 2021 10:31 pm
So try to setup a Jabber account
'Twas brillig, and the slithy toves...
Hush! don't say a word - they are slithing all over the jolly show...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

So one more step was taken.

Today Cholmondely and I were abe to test a very early version of the Oolite Communicator.
That application was able to pass text messages between us (just like an Instant Messenger) but also showed the online players and their location (galaxy, system, station) as contact list.

With that the basic, simple breakthrough is done. We can now stabilize the code and add features. :D
Sunshine - Moonlight - Good Times - Oolite
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Brainstorming for a MultiUser OXP

Post by Milo »

Have you thought about multiplayer passengers? Or escape pod rescues?

Imagine, you could have Cholmondely himself riding in your passenger cabin... commenting on comms traffic sent to his viewscreen... chastising you for taking an unnecessary detour through Riedquat... perhaps even cycling through your equipment and brewing a fresh cup of tea...

Or you could be minding your own business in that same anarchy, only to find yourself confronted by an escape pod... and upon scooping it, you'd have a passenger more vocal than most.

Ship Storage OXP could be helpful for stowing a multiplayer passenger's ship whilst they are "away" from wherever they left it; upon delivering the passenger to a station, give them a specially scripted "ship" that immediately docks itself again if launched from a station, so they must either buy a new ship there or find a way back to their old ship (for example, by finding another ride). Also allow them to carry parcels and a small amount of commodities (gold, gems) and trade them in any stations visited along the way...

While "in flight" as a passenger, you also could use mission screens to present the multiplayer "passenger" with some level of interaction (aside from the separate debug-console text windows) without allowing them to do the usual sorts of things that can be done while playing independently.
Last edited by Milo on Wed Jul 14, 2021 1:06 pm, edited 1 time in total.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Brainstorming for a MultiUser OXP

Post by Redspear »

hiran wrote: Tue Jul 13, 2021 9:23 pm
With that the basic, simple breakthrough is done. We can now stabilize the code and add features. :D
Congratulations :D

Kudos on persevering with your vision 👍

(...Can I really use external emojis on this board? 🐍🦎🛸🚀🎉🍻
...What have I started? 😬😅)
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

Milo wrote: Wed Jul 14, 2021 2:23 am
Have you thought about multiplayer passengers? Or escape pod rescues?
I have not thought about them in the way you are, and it seems a fun ride! :D

Meanwhile I spend some more time with the code, and it is a bit more stable now and should also be a bit more user friendly.
On top of revealing a player's position it can
* exchange text messages as group chat
* send fuel to some selected individual
* send money to some selected indiviual

I'd like to test this together with some volunteers. My time permits to start this test in a few days only.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

Now I am working on yet another feature I had in mind all the time:
Players shall be able to exchange goods. For that it is pretty easy to issue the command

Code: Select all

dumpObject(eval("player.ship.manifest"))
to get the full manifest in one shot.

How about modifying it? Can I set the whole manifest in a similar manner or would I have to set the amounts for each commodity separately?
And what about the quantity vs containers? I noticed the amount of containers is zero while in station, and set when in flight.
Do I have to modify one, the other or both?
Sunshine - Moonlight - Good Times - Oolite
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Brainstorming for a MultiUser OXP

Post by phkb »

You can't set the player manifest in one go. It would need to be per commodity, as you'd need to check they have room for it. Also note, some equipment and OXP's will adjust the available cargo space, so you can't rely on shipdata to give you all the info.

I'd recommend doing it 1 TC at a time, and then stopping when there is no change to the manifest value for that commodity (which indicates a limit has been reached).
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Brainstorming for a MultiUser OXP

Post by Cholmondely »

hiran wrote: Fri Jul 23, 2021 6:54 am
Now I am working on yet another feature I had in mind all the time:
Players shall be able to exchange goods. For that it is pretty easy to issue the command

Code: Select all

dumpObject(eval("player.ship.manifest"))
to get the full manifest in one shot.

How about modifying it? Can I set the whole manifest in a similar manner or would I have to set the amounts for each commodity separately?
And what about the quantity vs containers? I noticed the amount of containers is zero while in station, and set when in flight.
Do I have to modify one, the other or both?
If we're going to pass things around the station, Phkb has some enticing items in GalCop Mission: "GalCop Station Security Software" & "Virus Specimens". I'd also rather like to give you a "Dynamic Response Uridium Injection Dilator‎" or two!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

Cholmondely wrote: Fri Jul 23, 2021 7:16 am
hiran wrote: Fri Jul 23, 2021 6:54 am
Now I am working on yet another feature I had in mind all the time:
Players shall be able to exchange goods. For that it is pretty easy to issue the command

Code: Select all

dumpObject(eval("player.ship.manifest"))
to get the full manifest in one shot.

How about modifying it? Can I set the whole manifest in a similar manner or would I have to set the amounts for each commodity separately?
And what about the quantity vs containers? I noticed the amount of containers is zero while in station, and set when in flight.
Do I have to modify one, the other or both?
If we're going to pass things around the station, Phkb has some enticing items in GalCop Mission: "GalCop Station Security Software" & "Virus Specimens". I'd also rather like to give you a "Dynamic Response Uridium Injection Dilator‎" or two!
Sounds like we not only want to exchange goods but also equipment?
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

phkb wrote: Fri Jul 23, 2021 6:58 am
You can't set the player manifest in one go. It would need to be per commodity, as you'd need to check they have room for it. Also note, some equipment and OXP's will adjust the available cargo space, so you can't rely on shipdata to give you all the info.

I'd recommend doing it 1 TC at a time, and then stopping when there is no change to the manifest value for that commodity (which indicates a limit has been reached).
Hmmm, that is a special case that needs consideration.
If one user sends three TCs and only one can be added at the recipient side, what is going to happen to the other two?

1) I can imagine to revert the whole 'transaction'
2) I can imagine to drop the excess cargo
3) I can imagine to send the excess cargo back to the sender

To keep the beginnings simple I will probably opt for 2). To limit the damage we could limit to sending single containers only.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Brainstorming for a MultiUser OXP

Post by hiran »

phkb wrote: Fri Jul 23, 2021 6:58 am
You can't set the player manifest in one go. It would need to be per commodity, as you'd need to check they have room for it. Also note, some equipment and OXP's will adjust the available cargo space, so you can't rely on shipdata to give you all the info.

I'd recommend doing it 1 TC at a time, and then stopping when there is no change to the manifest value for that commodity (which indicates a limit has been reached).
I seem to have problems adding cargo, even though I's just trying to add the amount 1. The javascript command for Oolite is constructed like this:

Code: Select all

String.format("player.ship.manifest.%s += %d", commodity, amount)
While similar lines using += worked for fuel and credits, the manifest seems to behave strangely. Is it possible I can only set absolute values? Or am I accessing the manifest wrongly and I need to find the correct entry in the array....?
Sunshine - Moonlight - Good Times - Oolite
Post Reply