• Welcome to SC4 Devotion Forum Archives.

Introducing Poppy Multiplayer Regions

Started by mak, January 12, 2018, 10:36:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mak

Hello,

Over the last few weeks I have been developing a multiplayer region system for SimCity 4, which I have named Poppy Multiplayer Regions (PMR). Now that it has reached the Release Candidacy stage, I would like to share it all with you :)

You can register for an account and download the second release candidate of the PMR Launcher at http://getpmr.com.

Of course, you probably do not trust programs from unknown developers. So, I have also provided the Python source code at https://github.com/cizmic/pmr-client for you to review and run.

What makes PMR different from Dropbox regions?

Primitive multiplayer regions have been explored in SimCity 4 for quite some time in the form of shared Dropbox directories. While they worked most of the time, these regions had three major flaws:


  • No city permissions There was no real way of protecting one's saves from others, since Dropbox regions were typically configured to handle permissions only at the directory level. As a result, most regions were strictly private.
  • Adjacent save overwriting In every save operation, SimCity 4 doesn't just modify the current tile, but also the adjacent tiles. Because of this, it was previously impossible for two players to play in adjacent cities at the same time.
  • Complicated setup This isn't such an issue for powerusers, but configuring SimCity 4 to run from the Dropbox path was tricky for many newer players.

PMR overcomes all of these issues by having a server and launcher that are specifically designed for SimCity 4 regions. The diagram below shows how the saving system allows for city permissions and adjacent playing:



How to try PMR out

If you want to try out Poppy Multiplayer Regions, just follow these steps:


The PMR Launcher does all of the synchronization and launching for you. You can view the Readme file that installs with the launcher for more information.

How permissions work in PMR

PMR uses what is known as a claims system. In this system, you can only edit cities that you have claimed. All other saves will be ignored by the server. To claim an unoccupied tile, just save it; you can find unoccupied tiles in the Launcher Map that pops up whenever you connect to a region.

Choose wisely -- you can only claim one tile per region, and you can't abandon a claim.

What's next?

PMR is still a work in progress -- the launcher is still a Release Candidate. I've ironed out most of the kinks, but there still might be some small bugs and errors. I'd greatly appreciate it if you could try out the launcher and give me feedback to improve it.

So far, there is only one region ("Anise") that consists of 36 large tiles. I'm not sure how quickly this will fill up, but when it does I will expand it or add another region.

A note on plugins

PMR synchronizes plugins, and I've included my Underwater Ferry Connectors in the Anise plugins set to demonstrate this. Since redistributing others' plugins requires explicit permission, I am wondering if anybody is interested in having their plugins added to the Anise region.

Thanks, and have fun!  :)

mak

I've also submitted the launcher to the LEX, since I know some people prefer to get their downloads from there.

gtaman

It seems to be great idea, but why does it do this?

mak

Quote from: gtaman on January 14, 2018, 09:30:23 AM
It seems to be great idea, but why does it do this?

Hello,

Thanks for trying the launcher. I think you can fix that error by adding "\SimCity 4.exe" to the end of your path. I know it's misleading, but the path to the SimCity 4.exe file has to also have the "\SimCity 4.exe" at the end.

Hope that works, thanks again!

kbieniu7

Hmm... That looks interesting...  :thumbsup: Especially that at SimCityPolska we tried to do something similiar. Firstly with dropbox, later one of our admins tried to make a similiar launcher application. The most challenging thing was that permission issues and avoiding conflicting overwriting adjacent tiles. I'll pass the link to him, maybe he would have some comments on it  :)
Thank you for visiting Kolbrów, and for being for last ten years!

mak

Hello there, I realized that there were many bugs for non-Steam users so I have fixed those and published Release Candidate 3 on the LEX.

Quote from: kbieniu7 on January 14, 2018, 01:13:04 PM
Hmm... That looks interesting...  :thumbsup: Especially that at SimCityPolska we tried to do something similiar. Firstly with dropbox, later one of our admins tried to make a similiar launcher application. The most challenging thing was that permission issues and avoiding conflicting overwriting adjacent tiles. I'll pass the link to him, maybe he would have some comments on it  :)

The permissions and adjacent tiles were tricky, and I had to actually implement a DBPF parser on the server (based on the one in the SC4D wiki) to manipulate the files. Regarding the SP admin: thanks for letting him know, I would love to hear what he thinks!

Quote from: mak on January 14, 2018, 09:35:26 AM
Quote from: gtaman on January 14, 2018, 09:30:23 AM
It seems to be great idea, but why does it do this?
Hello,
Thanks for trying the launcher. I think you can fix that error by adding "\SimCity 4.exe" to the end of your path. I know it's misleading, but the path to the SimCity 4.exe file has to also have the "\SimCity 4.exe" at the end.
Hope that works, thanks again!
Sorry to reply again gtaman, but it looks like I was mistaken the first time. It turns out that the launcher wasn't recognizing custom paths. I believe I have fixed that problem with the newer version. Could you please give it a try and let me know how it works for you? Thanks again :)

Chicken_Swag101

is it possible to for me to add a region to play with my friend and am i able to make it a private one so oneone will come and claim our region tiles

mak

Quote from: Chicken_Swag101 on January 15, 2018, 11:35:50 AM
is it possible to for me to add a region to play with my friend and am i able to make it a private one so oneone will come and claim our region tiles

Hi, I'm currently working on updating the server software so players can upload their own private regions. In the meantime, I suppose you can always claim some tiles next to each other on the public region.

lamiska

Hi, looks like really cool idea  :thumbsup: but when I try to launch the game (after clicking connect button) I get error . It is fresh SimCity 4 install from steam - launching game from steam works fine.

mak

#9
Quote from: lamiska on January 15, 2018, 12:40:13 PM
Hi, looks like really cool idea  :thumbsup: but when I try to launch the game (after clicking connect button) I get error . It is fresh SimCity 4 install from steam - launching game from steam works fine.

Hey lamiska, thanks for trying out the launcher! :) I think this might be a problem with the code that launches SimCity 4. This has been an issue for many other players, since SimCity 4 is very picky about the way it is launched and how flags are passed to it. Plus I discovered that the subprocess library I was working with deals with custom flags weirdly :-[ I hope I've got it all figured out now!

Can you download this new build (https://github.com/cizmic/pmr-client/releases/download/rc3/launcher-rc3-hotfix2.zip) and try that out? You don't need to install it; just extract it anywhere and run "pmrclient.exe"

Please let me know if that works, and thanks again for your feedback!

siemanthepieman

Great work on this - looks really cool. I plan to claim my tile tonight.

Just a couple of thoughts/questions:

1. If 'my neighbour' makes a regional connection at the edge of their tile, will it connect to mine and be functional and destroy whatever is in its path (ie; behave exactly the same as in single player mode)?

2. Assuming the answer to the question above is 'yes', is there any ability for me to find out who my neighbours are and contact them (either through PMR or otherwise)? If not currently, that could be a useful feature for planning major highway connections etc (a multiplayer created RHW interchange across multiple tiles anyone?!).

lamiska

Quote from: mak on January 15, 2018, 04:38:29 PM
Please let me know if that works, and thanks again for your feedback!

still the same error :(

mak

Quote from: lamiska on January 16, 2018, 09:10:23 AM
still the same error :(
Sorry to hear that :( It looks like your version of Steam doesn't like getting launch flags from other programs -- AFAIK this issue was also observed with other SimCity 4 launchers.

That being said, after the launcher fails to start SimCity 4 automatically, you can try launching it normally from Steam (since that seems to work for you). You'll just need to configure the game manually to use the PMR path and everything will be good.

To do this, go to your Steam library, then right-click on SimCity 4 and select "Properties." Then, click "Set Launch Options..." and enter the following:

-UserDir:"PMRPath\" -intro:off -w -CustomResolution:enabled -r1280x800x32

Replace PMRPath with the location of your "_PMR" folder (you can find this under "SC4 Settings..." in the launcher). Make sure that there are two backslashes at the end of the path or it won't work. For example, since my username is "Julian" on my computer the flags would be:

-UserDir:"C:\Users\Julian\Documents\SimCity 4\_PMR\\" -intro:off -w -CustomResolution:enabled -r1280x800x32

Once you have that all set, try running the launcher again. After you get the error, try running SimCity 4 normally through Steam -- now it's set to the correct path, so it should recognize your saves. Please let me know if that works, thanks!

Quote from: siemanthepieman on January 15, 2018, 06:32:42 PM
Great work on this - looks really cool. I plan to claim my tile tonight.

Just a couple of thoughts/questions:

1. If 'my neighbour' makes a regional connection at the edge of their tile, will it connect to mine and be functional and destroy whatever is in its path (ie; behave exactly the same as in single player mode)?

2. Assuming the answer to the question above is 'yes', is there any ability for me to find out who my neighbours are and contact them (either through PMR or otherwise)? If not currently, that could be a useful feature for planning major highway connections etc (a multiplayer created RHW interchange across multiple tiles anyone?!).

Neighbor connections behave normally on the local copy of the region. However, since adjacent tile saves are ignored, the neighbor connections will be one-sided on the server's copy of the region. So, if you wanted to establish working neighbor connections you would need both mayors to place the connections on their respective sides of the border.

As you rightly assumed, this does require some deal of cooperation. At the moment there is no built-in function to contact other PMR players and plan things out. However, I really like that idea and will probably implement something like that soon. In the meantime, I suppose you could always get together with some friends or players on this forum and keep in touch that way.

mak

Hi everyone, I just pushed Release Candidate 4 of the launcher to the LEX (Direct link to GitHub download here). I normally wouldn't bump the thread for this, but this is a pretty important update.

Please update to RC4, even if you haven't experienced issues yet. There seems to be a bug with the threading mechanism in previous versions that would stop the launcher from working after running for a certain amount of time. RC4 completely fixes this issue and consolidates all of the recent hotfixes.

Thanks!

gn_leugim


lamiska

Quote from: mak on January 16, 2018, 11:55:54 AM

-UserDir:"PMRPath\" -intro:off -w -CustomResolution:enabled -r1280x800x32

Replace PMRPath with the location of your "_PMR" folder (you can find this under "SC4 Settings..." in the launcher). Make sure that there are two backslashes at the end of the path or it won't work. For example, since my username is "Julian" on my computer the flags would be:

-UserDir:"C:\Users\Julian\Documents\SimCity 4\_PMR\\" -intro:off -w -CustomResolution:enabled -r1280x800x32

Once you have that all set, try running the launcher again. After you get the error, try running SimCity 4 normally through Steam -- now it's set to the correct path, so it should recognize your saves. Please let me know if that works, thanks!


Hi, I can confirm this works !  :thumbsup: I have just small suggestion, installer automatically creates folder on C:/ drive, however in my case for example is Documents folder on different drive

mak

Anise just surpassed 1,000,000 sims today -- woo!

It's been a while since I updated the server software, so here goes. One of the many perks of tying SC4 cities to a database is that you can attach metadata to saves very easily. In this case, I have added the capability to log RCI populations with each save. I also retroactively grabbed these values from previous saves, allowing me to construct this quick population graph of the Anise region:

So far only aggregated RCI populations are saved. However, I should be able to break things down to the $/$$/$$$ level, which should allow for some interesting statistics (maybe even a way to calculate regional GDP).



Quote from: gn_leugim on January 19, 2018, 01:35:41 PM
Neat thing! I may try it out! :)
Thanks!

Quote from: lamiska on January 20, 2018, 08:41:45 AM
Hi, I can confirm this works !  :thumbsup: I have just small suggestion, installer automatically creates folder on C:/ drive, however in my case for example is Documents folder on different drive
Awesome! I am planning to add that as a setting for future releases.

gtaman

It has been fixed

And its very good. I have a suggestion; you should include NAM becasue i think this is the thing most of the players cant play without.

Keep the good work.

matias93

Quote from: mak on January 22, 2018, 08:55:08 PM
So far only aggregated RCI populations are saved. However, I should be able to break things down to the $/$$/$$$ level, which should allow for some interesting statistics (maybe even a way to calculate regional GDP).
Now this is what I call real fun with regional playing!  :bnn:

"Lets be scientists and as such, remember always that the purpose of politics is not freedom, nor authority, nor is any principle of abstract character,
but it is to meet the social needs of man and the development of the society"

— Valentín Letelier, 1895

Daniel9440 .

On facebook we have a group called simcity 4 en español, and we have a lot of time trying to play online. We would love to have a private region where through the group we can communicate and develop our region. I will be aware of the development of the launcher. Congratulations and thanks to the developer. &apls &apls &apls