gs-tauri boilerplate project

adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

So electron is a bit heavy since it includes an mini install of chrome to get things working.

Tauri is an HTML5 wrapper that uses the OS's native web component, making the binary a lot smaller.

Sooo... here you go:

https://github.com/gamesalad/gs-tauri/

Comments

  • ArmellineArmelline Member, PRO Posts: 5,365
    edited March 19

    This is very exciting. Building HTML5 into exes in particular is such a faff and leads to huge files and this seems massively more straightforward. I just did a quick test with mixed results. I haven't got the time tonight to really dig into it, so enitrely possible I'm doing things wrong.

    Running the dev test, it launches the game and it seems to play fine. There's a white border that would be better black, but it seems to work great. When I actually build it, though, I get a white screen with no sign of the game at all, including no music.

    Not sure if I'm doing something wrong, though. I'll poke at it more later if I can!

    Tested on Mac for now as I'm more comfortable with it and didn't have much time, but I'll do a Windows test later too!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    I should re-checkout the project and try to drop something in from scratch, to see if I missed anything on checkin then!

  • ArmellineArmelline Member, PRO Posts: 5,365

    Thanks! I've resisted porting Sand (and soonish Silk) to Steam because they're image heavy and surprisingly big for what they are, and once wrapped to an EXE were excessive in size. This might just be the push I needed!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    K, fixed the issue for the build (had to add some more permissions). Hope to see Sand on Steam!

  • ArmellineArmelline Member, PRO Posts: 5,365

    Looks fixed on Mac. Will be trying Windows tonight. Thanks!

  • ArmellineArmelline Member, PRO Posts: 5,365
    edited March 20

    Windows, I had to install Rust before it would try to preview or build anything. Not sure if that was wrong. I'm getting the white screen problem for both the dev and build options on Windows, though.

    Last Windows build I did of Sand for awards thing, it ended up taking the 198mb project and making it a 563mb folder full of confusing looking files. This, it's making a 198mb project with a nice clean installer. This is an amazing addition, had no idea Tauri was even a thing!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    Yes you do need to install rust (tauri's native side is built in rust). Not sure about the white screen issue, so I'll look this weekend as this is more of a "freetime" project.

  • ArmellineArmelline Member, PRO Posts: 5,365

    Thanks!

    Turned out I already had rust installed on my Mac so never ran into the need for it there!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    I didn't look into it this weekend, but I suspect it's based on the code we use to create paths to assets (we assume a / and windows likes a \ )

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    After mentioning it, it was a quick enough fix that I pushed an update. Let me know if it works!

  • ArmellineArmelline Member, PRO Posts: 5,365

    I'll check it out tonight, thanks!

  • ArmellineArmelline Member, PRO Posts: 5,365

    Still not been able to get this to work on Windows but I'll give it another try tonight.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    K, I'll see if I have my Parallels up and take a look tonight then.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    Okay, I think I got it this time. Had to do things in the opposite direction (convert backslashes to fwd slashes).

  • ArmellineArmelline Member, PRO Posts: 5,365

    Thanks! I'll give it another try asap!

  • ArmellineArmelline Member, PRO Posts: 5,365

    Seems to be working great now, thanks!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    Awesome, looking forward to seeing Sand on Steam!

  • ArmellineArmelline Member, PRO Posts: 5,365

    Thanks! We're thinking we'll bundle Sand and Silk together for Steam as Sand on its own is a bit short but with this it's gone from "eh maybe one day" to "this is a very high priority once Silk is out on iOS!"

  • CasualEvolutionCasualEvolution Member, PRO Posts: 537

    Well, this interests me! 😁

    How do I generate the html5 to package as an exe? Can I export it from the classic Mac version of GS?

    Or should it be a project generated and exported from the web version of GS?

    Thanks!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    @CasualEvolution

    The high level instructions are in the README of the project, but I'll try to create a video sometime soon if that's requested.

    You can use the Desktop version of GS, but it's running on HTML5, you need to publish as HTML5 and test your game.

  • Jeffm2Jeffm2 Member, PRO Posts: 148

    I would love a video to see how to implement

Sign In or Register to comment.