# The Coder King Help

**URL:** <https://forum.makecode.com/t/the-coder-king-help/37441>\
**Category:** Help\
**Tags:** game\
**Created:** [June 20, 2025, 9:18pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441 "2025-06-20T21:18:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [June 20, 2025, 9:18pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/1 "2025-06-20T21:18:56Z")

</div>

This is my topic, [The Coder King](https://forum.makecode.com/t/the-coder-king/37361). I attempted to make it two player. But it freezes when you choose your character. Could you please help me? @WoofWoof? Here’s the link. [The Coder King](https://arcade.makecode.com/S02408-45618-46175-64929). Thank you.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [June 20, 2025, 10:49pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/2 "2025-06-20T22:49:38Z")

</div>

I’ll look at the code when I get home, but how do you get past this screen?

 ![IMG_9186](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/c/6c0024be27d942e7a07e087792e42870cfdcda8b.jpeg)  
My guess is that you have to wait until another player joins, though I thought I saw some code for handling single player games, so… uhh… yeah

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [June 22, 2025, 2:24am UTC](https://forum.makecode.com/t/the-coder-king-help/37441/3 "2025-06-22T02:24:14Z")

</div>

Well that’s the thing, it’s not supposed to freeze there.

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [June 23, 2025, 8:30pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/4 "2025-06-23T20:30:54Z")

</div>

Well, it’s supposed to act like a single player until someone else joins and then it becomes two player. Could you help me and make it so it doesn’t freeze when it’s waiting for the other player to pick their character @WoofWoof? I need this. Here’s the updated link: [The Coder King](https://arcade.makecode.com/S02408-45618-46175-64929)

P.S. @WoofWoof, you are in the game as an unlockable character. Once you reach 3 wins, you are unlocked. Wait until you get **9** wins, then you unlock _ **THE MODS!!!** _

Please help me, @WoofWoof, _you’re my only hope…_ (star wars reference)

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [June 24, 2025, 4:05pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/5 "2025-06-24T16:05:21Z")

</div>

Ok so it looks like the issue is with the Pause Until blocks in the On Game Update block. When you pause inside an On Game Update block it pauses everything because On Game Update blocks aren’t “Multithreaded”. Basically makecode has a built in system for fake multithreading, which is where two sets of code can run at the same time. Makecode can’t do that, but it fakes it by letting other bit of code run when one bit of code is paused. Your issue is that only certain blocks are wrapped in that fake multithreading code… like the Forever block! So putting that whole code section inside a Forever block should fix your issue, because makecode will let the cursor movement code run while those pause until blocks are running. Hope this helps! This game looks very neat, and I like my character!

edit thanks for the likes (jk jk)

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [June 30, 2025, 5:52pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/6 "2025-06-30T17:52:06Z")

</div>

ok, thanks @WoofWoof, but I encountered another error. [I think it explains itself.](https://arcade.makecode.com/S74965-40564-86947-59693) PS I started coding in JavaScript cuz the Blocks were getting too laggy, I hope you don’t mind, but…

> **My deepest, darkest secret**
>
> I’m still learning. Hehehe?

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [June 30, 2025, 6:08pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/7 "2025-06-30T18:08:37Z")

</div>

It most certainly explains itself XD  
Your issue is on line 10361:

 ![Screenshot 2025-06-30 at 1.59.22 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/9/69458f31e9e7bcf6231740fdafcb44767e341691.png)  
Using debug mode, I can see that both “playerhealth” and “fighter” are both null when this line of code is run. This is the classic “sprite doesn’t exist yet” issue and should be easy to fix, have fun! Nice to see someone using JavaScript!

Pro tip: you can use the “!=” operator to check that some numbers are _not_ equal, which will let you avoid doing this:

 ![Screenshot 2025-06-30 at 2.05.23 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/9/0/90ca842550ab7f3101bb8bc1bbceb850c83c4053.png)

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [June 30, 2025, 8:20pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/8 "2025-06-30T20:20:17Z")

</div>

oh… no brainer.

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [July 10, 2025, 6:34pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/9 "2025-07-10T18:34:35Z")

</div>

Hey @WoofWoof, sorry if I’m getting annoying, (I’m a bad coder) but I have another problem. The computer player stops at the wall, and doesnt move, just stays there for the rest of the match, dying. Could you try to find what’s causing it, and fix it? You can even give yourself an op move. 🥺 Also, I made a mobile mode, so you can play it on your tablet or phone, just there are limited characters. [The Coder King](https://arcade.makecode.com/S20966-94603-22035-00477)

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [July 16, 2025, 3:17pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/10 "2025-07-16T15:17:33Z")

</div>

Um, @WoofWoof?

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [July 17, 2025, 5:24pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/11 "2025-07-17T17:24:21Z")

</div>

I’m on a trip with only my phone for a few weeks. I’ll look at it when I return and have a computer.

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [July 23, 2025, 4:38pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/12 "2025-07-23T16:38:24Z")

</div>

ok, while you’re at it, could you add [this](https://drive.google.com/file/d/1-c4Bq5reE_ymcuqP7S1qx1gdMnx7LcaS/view?usp=sharing) gif to the start of the game? It’s not crucial, and it doesn’t HAVE to be done, but idk know how to use [the gif converter](https://github.com/UnsignedArduino/Image-to-MakeCode-Arcade) 😭

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [August 13, 2025, 9:24pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/13 "2025-08-13T21:24:34Z")

</div>

Could u help me fix the problem​:face\_holding\_back\_tears:🙏

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [August 13, 2025, 10:20pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/14 "2025-08-13T22:20:05Z")

</div>

I _knew_ I had some stuff to do when I got back, just couldn’t quite remember what! I’ll look at this very soon.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [August 14, 2025, 9:42pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/15 "2025-08-14T21:42:12Z")

</div>

I see the issue you are talking about, but where in your code controls the position or speed of com2? Does a certain part tell it to move based on what tiles it’s next to or on top of?

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [August 15, 2025, 9:13pm UTC](https://forum.makecode.com/t/the-coder-king-help/37441/16 "2025-08-15T21:13:32Z")

</div>

It is powered by a game update block. every 500 ms or so, it moves (set cm2 velocity to vx (pick random from -70 to 70) vy (pick random from -70 to 70).

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [December 20, 2025, 1:25am UTC](https://forum.makecode.com/t/the-coder-king-help/37441/17 "2025-12-20T01:25:17Z")

</div>

@WoofWoof ? Sorry to bother you, this is a long dead topic, but could you please help me?

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [December 20, 2025, 1:38am UTC](https://forum.makecode.com/t/the-coder-king-help/37441/18 "2025-12-20T01:38:53Z")

</div>

Oh yeah! Forgot about this topic, sorry!

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [December 21, 2025, 12:18am UTC](https://forum.makecode.com/t/the-coder-king-help/37441/19 "2025-12-21T00:18:25Z")

</div>

Nah ur good

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [December 21, 2025, 12:28am UTC](https://forum.makecode.com/t/the-coder-king-help/37441/20 "2025-12-21T00:28:59Z")

</div>

Sorry, didn’t get to it today, but I have a lot of time since it’s winter break for me, so I’ll look at it tomorrow. Also, happy forumversary!

[Next page](https://forum.makecode.com/t/the-coder-king-help/37441.md?page=2)
