Salvo! on HW - Help :-)

Hi!

As I mentioned in the post where I present Salvo!, hardware hates this game. Actually, it doesn’t hate the whole game at all. I had been testing it on my BrainPad Arcade as I was building the initial structure of the game, and it was working fine … until I created the Player class, found in custom.ts.

My BrainPad Arcade hates the Player class.

You can take a look here. It’s an earlier version of the game with my old, placeholder graphics and such, but I’ve left my diagnostic game.splashes in the code.

There are some game.splash entries in setupPlayer in main.ts and some additional ones in Player's constructor in custom.ts. Here is what I am experiencing:

If I remove the game.splash pauses in the Player constructor, I typically get an 984 error. This is a weird one, and I really don’t see why I would be getting that one. Every once in a while, I get an even worse error in the 800 range. That one’s definitely not good. :slight_smile: I also have sometimes generated a 021 error … but I haven’t seen that one in a few days.

If you leave those pauses in the constructor, though, the game is almost always able to move forward and allows the player to place the fleet. Then, once the game enters setupGame in main.ts, the game hard-stops. No error … it just freezes when it tries to access the Player object.

I’m at a loss. Particularly since I’m getting the 984 and the occasional 800 errors, I’m feeling this one is a compiler bug, but I don’t know how I can help confirm and/or diagnose that.

I’ve tried having the beta version compile the game, as well, in case this is something that has been fixed but not yet released to production. I’m experiencing the same symptoms, though.

The game works fine in the browser … but I think it’d be neat to get this game running on hardware. It’s a great multiplayer “pass-and-play” game.

I’m happy to help diagnose this one. I just need some direction as to where to go next.

Could you try this (on /beta) https://makecode.com/_awFAwAf8xFTD?

It seems like there might be a limitation on the number of fields that we hadn’t run into before, or something of the sort - it mostly worked after just bumping a handful of the constant / static fields to be top level constants. I also had a 984 error from game.askForString, but haven’t looked into that yet / will later tonight (I ran out of coffee at starbucks, so I’m about to drive down to visit family for the long weekend). It works on my pybadge now off my dev build (and I don’t think /beta is missing any fixes that would affect it), I’ll check on a meowbit or GHI board when I unpack :slight_smile:

(Great game, by the way! I have a branch to add it to the community carousel as soon as we get a version that works on all hardware)

1 Like

You’re the best, @jwunderl. I’ll update my code and see how it goes with the current version of the game. Have a great holiday weekend with your family, Joey!

P.S. This seems to compile just fine with the current production version (0.8.11), too.

P.P.S. I’ve updated my original post with the new version of the game:

Regarding game.askForString, I was getting a 021 error when I left that in, so that’s one of the changes for the hardware version (or, rather, if the HARDWARE flag is set). The game doesn’t ask for player names on hardware; it just gives default names.

I’ve never been able to figure out how to start this Salvo game. I select the # of players and then click all/any button and nothing happens. I click “Start” and nothing happens (except the A button seems to press) but no game. Haven’t made it work so far.

Hi, @frank_schmidt.

I noticed in your video that you are playing the version posted in this thread. You shouldn’t be using this version. It’s an older and incomplete version of the game that may still have bugs. Use the link provided earlier to go to the other thread with the published version of the game. In that post, I’ve added a play-through video so that you can see how it should play in your browser. (After choosing the number of human and computer players, move the cursor to Start! and press A.)

It plays similarly on hardware. Be sure to follow the instructions in that thread about compiling the game for hardware.