Release Stardew Valley launcher


ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,306
Age
51
Location
France, near Lyon
Here is Stardew Valley launcher.
preview1.png

Stardew Valley use mono, so you'll need the monort PND somewhere on your pandora. The game OpenGL, so here using gl4es. The game use shaders and some large textures and a lot of memory.
You need data from the Linux full version of the game. It can be from Steam or GoG. The windows version of the game will not work. If you have the gog version, you can put the gog_stardew*.sh setup file in appdata/stardewvalley for autoextraction (untested).

When starting (and before showing any window), the game seems to load all music in memory (in uncompressed form), so you have to wait a long time before playing (1min or so).
A massive swap is needed: 1.8GB on CC model!
Also, some texture are larger than what the Pandora can handle, so some shrink of gl4es is used. The method used for Rebirth or Gigahertz model reduce as less as possible the quality, so the shriking is not really visible most of the time. Unfortunatly, during my testing I have seen that CC model still can't handle all the texture so I had to force the use of 16 bits textures, and shrink more aggressively large texture. On CC the effect of shrink is visible.
Anyway, the game is barelly playable on CC due to the constant swap (maybe it's better without the music).

You can force 16 bits textures (or not) by creating a file named .force16bits in appdata/stardewvalley and put 1 inside (to force) or 0 (to not force).
Also, you can change shrink mode with a file named .shrink in same folder with the shrink mode (11 for rebirth/gigahertz, 7 for CC).

With build 02, you can resample the sound and music of Stardew Valley. When untouched, all sounds and music are loaded in memory and at 44kHz with most sounds beeing stereo, that make around 1.4GB sounds in memory. When launching the build 02 for the 1st time, you will have some zenity dialog to allow you to resample the sounds. Compression to 22kHz, 16kHz and 11kHz, with the option of forcing mono will be proposed. Also, the option to store the new sounds as simple PCM instead of MS ADPCM will also be propose. I suggest you use 11kHz, mono and PCM. Like this, a swap will probably not be needed anymore on Rebirth and Gigahertz, and the sound quality is still fine. So unles you plan to play on headphone, it should be ok.
If you are not happy with the settings, you will need to copy again the wave bank data (hint: it's "Content/XACT/Wave Bank.xwb"). Also, removed the file named "converted" from appdata/stardewvalley to have the resampling wizard again.

A video of it running on my Gigahertz Pandora.

/!\ The Multiplayer version of Stardew Valley is slow on the Pandora (too slow to be enjoyable). If you can, use the previous (without Coop) version /!\

History log
=========

Build 06
------------

  • Update libs (gl4es and openal).
  • Added a few option to gl4es in launcher
Build 05
------------

  • Fixed Saves that was crashing
  • Needs Mono RunTime PND build 09
Build 04
------------

  • Removed 8kHz option in resample tool (game don't accept that)
  • Added option to remove biggest sounds
Build 03
------------

  • Added 8kHz option in resample tool
Build 02
------------

  • Added tool to resample sounds and music
  • Fixed monort that didn't unmount at exit
Build 01
------------

  • Initial build

The sources for the resampling tool can be found on my github here: https://github.com/ptitSeb/rexwb
 
Last edited:
awesome! this is very cool. I have always wished for a port so that I could play on the go. My fiancee will go nuts over this.
thank you soooo much!

regarding the music: is it feasible to downsample the music before running the game for the first time or something similar?
 
regarding the music: is it feasible to downsample the music before running the game for the first time or something similar?

That's a good idea, but not sure if it's possible. The game is an XNA game, so I guess it should be possible to alter things using Microsoft XNA tools. I assume Sounds are in Content/XACT but I don't have anyideo on how to do that.
 
@ptitSeb I just registered there and downloaded the wavebank extractor. There is source code in the zip file, maybe it will help. I am sending you an owncloud link via pm, so you can download the file from my owncloud instance.
 
So, I extracted the data on Windows, then used a bash prompt (on Windows 10, I'm pretty sure I could have use a windows version) to mass downsampled all files (362 files) to 16kHz (original varied around 44kHz). Then using XACT tools (from DirectX SDK) I rebuilt the xwb (the template that is in the zip is for an older version and is missing the last files, not too important for a quick test).
The xwb has gone from 380MB to 130MB. Much better.

I tested and yeah, it works. And memory consuption is down, from 1.5GB to 640MB (on the title screen), so much better :)

Now, I have to think if I can do something more simple (not sure I can)...
 
Hi all !

@ptitSeb : thank you for making Stardew Valley run on the Pandora :) I never heard of this game before... It sort of reminds me of Animal Crossing on NGC, which I liked a lot !

I'll try to buy the game on GOG and test it on my Rebirth ASAP !

EDIT: from what I can read about it, Stardew Valley is also similar to Harvest Moon games:

https://en.wikipedia.org/wiki/Story_of_Seasons_(series)

Harvest Moon 64 (N64) and Harvest Moon: Friends of Mineral Town (GBA) seem to be quite good. I'll give them a try on the Pandora too :)

Cheers, Magic Sam
 
Last edited:
So, after 2 days of work, I have a tool to resample automaticaly the sounds of the game. It can reduce up to 8 times the amount of needed memory, so you better use it for smother gameplay on the Pandora.

I have updated the 1st post with some guide line and a link to sources of the tool for the one interested.
I'll copy/paste the guidelines here for conveniance (anyway, it's all automatic, just a few question to anwser)

When untouched, all sounds and music are loaded in memory and at 44kHz with most sounds beeing stereo, that make around 1.4GB sounds in memory. When launching the build 02 for the 1st time, you will have some zenity dialog to allow you to resample the sounds. Compression to 22kHz, 16kHz and 11kHz, with the option of forcing mono will be proposed. Also, the option to store the new sounds as simple PCM instead of MS ADPCM will also be propose. I suggest you use 11kHz, mono and PCM. Like this, a swap will probably not be needed anymore on Rebirth and Gigahertz, and the sound quality is still fine. So unles you plan to play on headphone, it should be ok.
If you are not happy with the settings, you will need to copy again the wave bank data (hint: it's "Content/XACT/Wave Bank.xwb"). Also, removed the file named "converted" from appdata/stardewvalley to have the resampling wizard again.

Build 02
------------

  • Added tool to resample sounds and music
  • Fixed monort that didn't unmount at exit
 
Unfortunately even with the sound converted to 11khz mono it runs out of memory on my GHz Pandora. I tried playing without sound by removing the wave bank file but that didn't work, nor did making a blank file with the same name.
 
Just create a swap then. There are tools on the repo for that.

@Silent-Hunter : without swap and with sound at 11kHz and Mono PCM, you should be able to go to the main menu at least. It will probably run out of memory when starting the game. Or you don't even go the main menu? When the conversion is done, the xwb file should be around 160MB IIRC (or 46MB is using ADPCM).
 
Last edited:
Unfortunately even with the sound converted to 11khz mono it runs out of memory on my GHz Pandora. I tried playing without sound by removing the wave bank file but that didn't work, nor did making a blank file with the same name.
Maybe it work when you start the PND with Mini Menu?
XFCE is taking bit more Ram against MiniMenu ;)
 
Just create a swap then. There are tools on the repo for that.

@Silent-Hunter : without swap and with sound at 11kHz and Mono PCM, you should be able to go to the main menu at least. It will probably run out of memory when starting the game. Or you don't even go the main menu? When the conversion is done, the xwb file should be around 160MB IIRC (or 46MB is using ADPCM).

Ahhh okay. I need to retry with regular PCM. I misread the dialogue prompt and thought answering no would get me regular PCM.

I don't want to use swap, as I'm afraid of what it will do to my SD card.
 
Mmmm, I'm not sure even at 11kHz/mono there is enough free memory for savestate. I have notice save use mcs to compile stuff (the save?), so that will eat some memory. Maybe I can add a 8kHz option for even smaller sounds. Of course this is a very low quality samplerate, but that may be enough to avoid Out of Memory exception / killed errors
[doublepost=1526144127,1526137630][/doublepost]Ok, I have upload a new pnd with the 8kHz option. Not sure it will be enough, but that's all I can do.

Build 03
------------

  • Added 8kHz option in resample tool
 
Mmmm, I'm not sure even at 11kHz/mono there is enough free memory for savestate. I have notice save use mcs to compile stuff (the save?), so that will eat some memory. Maybe I can add a 8kHz option for even smaller sounds. Of course this is a very low quality samplerate, but that may be enough to avoid Out of Memory exception / killed errors
[doublepost=1526144127,1526137630][/doublepost]Ok, I have upload a new pnd with the 8kHz option. Not sure it will be enough, but that's all I can do.

Build 03
------------

  • Added 8kHz option in resample tool
I don't care if there's no sound at all if it means I can play on the go!
[doublepost=1526190265][/doublepost]Hmm, it seems like 8KHz is an unsupported sample rate for XNA apps, or at least this one. I'll have to just get a cheap flash drive to use for swap!
 
Back
Top