# Salvo! on HW - Help :-)

**URL:** <https://forum.makecode.com/t/salvo-on-hw-help/204>\
**Category:** Arcade\
**Created:** [May 25, 2019, 8:06pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204 "2019-05-25T20:06:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [May 25, 2019, 8:06pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/1 "2019-05-25T20:06:04Z")

</div>

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.splash`es in the code.

> **[Salvo HW Diags](https://arcade.makecode.com/60008-82481-20799-78108)**
>
> Made with ❤️ in MakeCode Arcade.

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. 🙂 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.

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [May 25, 2019, 10:28pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/2 "2019-05-25T22:28:15Z")

</div>

Could you try this (on /beta) [https://makecode.com/\_awFAwAf8xFTD](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 🙂

(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)

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [May 25, 2019, 11:04pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/3 "2019-05-25T23:04:28Z")

</div>

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:

> [@Presenting: Salvo!](https://forum.makecode.com/t/presenting-salvo/199):
>
> This week, I offer to you: Salvo! This probably will be my last game for a while. I do need to start writing the course. smiley Mad props to one of my best friends, Solar, for drawing some amazing ships for me. Have fun! Play-through video: [http://somup.com/cqhufNnEiW](http://somup.com/cqhufNnEiW) Use the following URL to import the code into MakeCode Arcade: [https://github.com/robo-technical-group/salvo](https://github.com/robo-technical-group/salvo) Multiplayer is local; JACDAC is not currently supported. Hardware hates this game right now. I’ll open a separate…

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [May 25, 2019, 11:48pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/4 "2019-05-25T23:48:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![frank\_schmidt](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@frank\_schmidt](https://forum.makecode.com/u/frank_schmidt)\
**Post date:** [May 26, 2019, 1:00pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/5 "2019-05-26T13:00:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![frank\_schmidt](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@frank\_schmidt](https://forum.makecode.com/u/frank_schmidt)\
**Post date:** [May 26, 2019, 1:10pm UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/6 "2019-05-26T13:10:19Z")

</div>



---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [May 28, 2019, 5:06am UTC](https://forum.makecode.com/t/salvo-on-hw-help/204/7 "2019-05-28T05:06:22Z")

</div>

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.
