1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Release Stardew Valley launcher

Discussion in 'Software Releases' started by ptitSeb, May 9, 2018.

  1. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    Here is Stardew Valley launcher.
    [​IMG]
    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.

    History log
    =========

    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: May 14, 2018
  2. xnopasaranx

    xnopasaranx Superbad!

    Joined:
    Jan 31, 2006
    Messages:
    3,162
    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?
     
  3. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    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.
     
  4. xnopasaranx

    xnopasaranx Superbad!

    Joined:
    Jan 31, 2006
    Messages:
    3,162
  5. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    You need an account there to download stuff :( ...
     
  6. xnopasaranx

    xnopasaranx Superbad!

    Joined:
    Jan 31, 2006
    Messages:
    3,162
    @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.
     
  7. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    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)...
     
    Farox, TeDaDeS and Magic Sam like this.
  8. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,010
    Location:
    Ankh-Morpork
    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: May 9, 2018
  9. Citizen_Lurker

    Citizen_Lurker Member

    Joined:
    Mar 1, 2016
    Messages:
    93
    This is magic. Thank you!
     
  10. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    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
     
    Farox likes this.
  11. Silent-Hunter

    Silent-Hunter Advanced Member

    Joined:
    May 29, 2010
    Messages:
    2,633
    Oh wow, thank you very much! I will try this soon.
     
  12. Silent-Hunter

    Silent-Hunter Advanced Member

    Joined:
    May 29, 2010
    Messages:
    2,633
    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.
     
    ingoreis likes this.
  13. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    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: May 12, 2018
  14. ingoreis

    ingoreis Advanced Member

    Joined:
    Mar 7, 2012
    Messages:
    2,994
    Location:
    49.491276,8.423518
    Maybe it work when you start the PND with Mini Menu?
    XFCE is taking bit more Ram against MiniMenu ;)
     
  15. Farox

    Farox Certified Guru

    Joined:
    Jan 8, 2009
    Messages:
    1,952
    Location:
    Italy
    I think i'll wait and enjoy this with the Pyra...but Seb have done a superb work here...as always:cool:
     
  16. Silent-Hunter

    Silent-Hunter Advanced Member

    Joined:
    May 29, 2010
    Messages:
    2,633
    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.
     
  17. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,959
    Location:
    France, near Lyon
    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
    --- Double Post Merged, May 12, 2018, Original Post Date: May 12, 2018 ---
    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
     
  18. ekianjo

    ekianjo Hardcore Member

    Joined:
    May 7, 2012
    Messages:
    8,261
    Location:
    神戸市、日本 (Japan)
    Can anyone make a video to show how well it runs?
     
  19. Silent-Hunter

    Silent-Hunter Advanced Member

    Joined:
    May 29, 2010
    Messages:
    2,633
    I don't care if there's no sound at all if it means I can play on the go!
    --- Double Post Merged, May 13, 2018 ---
    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!
     
  20. Eight Bit

    Eight Bit Advanced Member

    Joined:
    Nov 16, 2008
    Messages:
    1,354
    Location:
    Amsterdam, Netherlands
    I checked it out on youtube and this looks like a fun game! I'm afraid I will have to go buy it... :p
     

Share This Page

Loading...