SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => Topic started by: mak on January 12, 2018, 10:36:54 PM

Title: Introducing Poppy Multiplayer Regions
Post by: mak on January 12, 2018, 10:36:54 PM
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 (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 (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:


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:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fgetpmr.com%2Fimg%2Fpmrexplain.png&hash=5d19acd65bdb060ea4fe3398621c112a4666c10f)

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!  :)
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 13, 2018, 02:40:29 PM
I've also submitted the launcher to the LEX, since I know some people prefer to get their downloads from there.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: gtaman on January 14, 2018, 09:30:23 AM
It seems to be great idea, but why does it do this?
Title: Re: Introducing Poppy Multiplayer Regions
Post by: 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!
Title: Re: Introducing Poppy Multiplayer Regions
Post by: 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  :)
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 14, 2018, 04:15:26 PM
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 :)
Title: Re: Introducing Poppy Multiplayer Regions
Post by: 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
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 15, 2018, 12:00:43 PM
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.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: 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.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 15, 2018, 04:38:29 PM
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!
Title: Re: Introducing Poppy Multiplayer Regions
Post by: 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?!).
Title: Re: Introducing Poppy Multiplayer Regions
Post by: lamiska on January 16, 2018, 09:10:23 AM
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 :(
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 16, 2018, 11:55:54 AM
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.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 17, 2018, 06:55:38 PM
Hi everyone, I just pushed Release Candidate 4 of the launcher to the LEX (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=3564) (Direct link to GitHub download here (https://github.com/cizmic/pmr-client/releases/download/rc4/launcher-rc4.zip)). 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!
Title: Re: Introducing Poppy Multiplayer Regions
Post by: gn_leugim on January 19, 2018, 01:35:41 PM
Neat thing! I may try it out! :)
Title: Re: Introducing Poppy Multiplayer Regions
Post by: lamiska on January 20, 2018, 08:41:45 AM
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
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on January 22, 2018, 08:55:08 PM
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).

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fgetpmr.com%2Fimg%2Fgraph1.png&hash=32272ff7204160f8ed30bd663f662b2708b8fb41)

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.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: gtaman on January 26, 2018, 08:22:55 AM
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.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: matias93 on January 26, 2018, 10:15:36 AM
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:
Title: Re: Introducing Poppy Multiplayer Regions
Post by: Daniel9440 . on February 12, 2018, 11:53:00 PM
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
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on February 25, 2018, 04:43:41 PM
Hi everyone! Sorry for all the late replies, I've been very busy with uni lately.

Quote from: gtaman on January 26, 2018, 08:22:55 AM
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.

Glad to hear the launcher is now working for you. Regarding NAM, I have already included the core traffic simulator. I definitely want to add more of the components, but I'm afraid they're too large for the current plugin sync system. So perhaps I'll add a bypass feature to allow players to use their copies of NAM.

Quote from: matias93 on January 26, 2018, 10:15:36 AM
Now this is what I call real fun with regional playing!  :bnn:

Haha exactly!

Quote from: Daniel9440 . on February 12, 2018, 11:53:00 PM
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.

Thank you very much for the compliments :) I'm currently working on updating the server software so private regions can exist. In fact, the launcher is already capable of connecting to private regions (that's why you log in after selecting a region). Once the server is ready to handle private regions I'll let everyone know. I'm still not sure whether private regions will be hosted on the PMR server, or if private servers will run their own versions of the PMR software.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: Joey Messina on March 26, 2018, 01:17:21 PM
This is very exciting! My launcher is working and does start the game, however the simcity 4.exe process seems to crash about 5 seconds after the bridge splash screen pops up. Any idea why? I'm itching to stake my claim! I don't have a custom install path, if you are wondering.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on April 03, 2018, 09:45:44 PM
Quote from: Joey Messina on March 26, 2018, 01:17:21 PM
This is very exciting! My launcher is working and does start the game, however the simcity 4.exe process seems to crash about 5 seconds after the bridge splash screen pops up. Any idea why? I'm itching to stake my claim! I don't have a custom install path, if you are wondering.

Hi, thanks! This seems to be a problem with some CD versions of the game. Can you try setting the resolution (under "SC4 Settings...") to the lowest setting 800x600? I think that might fix the problem.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: 911Diva on April 05, 2018, 06:47:00 AM
I receive a message saying PMR is out of date, I have a tile saved, but have not been able to get back in since.
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on July 30, 2018, 11:59:33 PM
Hello everyone, I just wanted to share that another region "Basil" has been added to PMR, with 49 large tiles this time. Things have slowed down these past few months but I realized the Anise region is full and there are still many other players creating accounts, so now there are more free tiles. Also, if you claimed a tile in Anise you can still claim one more tile in Basil. :)

I'm also working on polishing the server software so that other people can run it on their own servers (private regions etc) -- expect updates soon :thumbsup:

Quote from: 911Diva on April 05, 2018, 06:47:00 AM
I receive a message saying PMR is out of date, I have a tile saved, but have not been able to get back in since.
Sorry for the late reply (I have no idea how I let this message slip by) :( Please downloading the latest version of PMR from the LEX or getpmr.com
Thanks :)
Title: Re: Introducing Poppy Multiplayer Regions
Post by: mak on July 31, 2018, 03:34:03 PM
Hello again, sorry to be bumping this thread so much but the newest version of the PMR Launcher has just been finished. For some reason I can't seem to update the file on the LEX* but you can get the latest version from http://getpmr.com/download (http://getpmr.com/download) while I sort this out.

The biggest change in this update is the ability to use your own plugins (such as NAM and others) with PMR! Take a look from the Basil region:

(https://i.imgur.com/kgKeQJg_d.jpg?maxwidth=900)

As I've mentioned before, I could never really bundle NAM into the synchronized region plugins (even though the very kind NAM Team gave me permission to do so) because it's too large for every player to download from PMR. So, instead of downloading those plugins from PMR every time you load a new region, the client will just use your local copy.

To set this up, simply move the plugins you want to use with PMR from your "SimCity 4\Plugins\" folder to the "SimCity 4\Plugins\_PMR\Plugins" folder that PMR creates. This way, PMR can access these plugins when running SimCity 4 from its working path, and you can still use these plugins when PMR isn't running (since the PMR folder is located within the standard plugins folder.

This might all seem a little convoluted, but to me this sytem appears to be the best compromise so far. I suppose the client could do some of this automatically, but I know many people have their plugins folder organized a certain way, so I don't want the launcher to be messing with that stuff without the players being aware. Another small drawback is that user plugins cannot be synchronized, which may lead to some brown boxes / blank tiles when viewing other people's cities. Oh well... ::)

Also if anyone's interested, there's now a PMR Discord channel to help coordinate city building: https://discord.gg/ppAmeKf Let me know how all this works, or if you have any questions. Thanks again! :)

*:  (The exchange threw some error about missing a filesize function and now the download doesn't work, so I've decided to lock it for now. I'll give it another try in a few hours)