# I need a lot of help

**URL:** <https://forum.makecode.com/t/i-need-a-lot-of-help/13621>\
**Category:** Help\
**Tags:** game\
**Created:** [May 16, 2022, 9:36pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621 "2022-05-16T21:36:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [May 16, 2022, 9:36pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/1 "2022-05-16T21:36:19Z")

</div>

I’m working on a recreation of Pacman as accurate as possible but with the pxt-raycasting extension although my only computer is getting returned to school soon  
I would like someone to try and work on it  
I can’t get the ai to work on making code  
here is a link to the Pacman ai video:

[![](https://img.youtube.com/vi/ataGotQ7ir8/maxresdefault.jpg "Pac-Man Ghost AI Explained") ](https://www.youtube.com/watch?v=ataGotQ7ir8)

then after the Pacman is recreated I wanted it to seem like this video by terminal montage:

[![](https://img.youtube.com/vi/RR2dlAnP0-I/maxresdefault.jpg "Something About Pac-Man (Loud Sound and Light Sensitivity Warning)👨‍🚀👻") ](https://www.youtube.com/watch?v=RR2dlAnP0-I)

here is my game so far:

> **[terminal montage pac man](https://arcade.makecode.com/44125-09070-73192-08793)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

please help…  
I… I don’t…  
have much…  
time…

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [May 18, 2022, 5:04pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/2 "2022-05-18T17:04:21Z")

</div>

The walls looks so cool!  
And some advice, if your time are limited, choose only one of your dev directions at first. Which one is more important for you right now? The AI, or the theme of the movie?  
The latter I guess. So is a another “AI” which not the same to original one can do? If yes, do you think it is a way to choose the [Tilemap Path Finding ( a\* )](https://forum.makecode.com/t/tilemap-path-finding-a-beta/1846) for AI right now, and do the “accurate” AI later when you have enough time.

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [May 18, 2022, 9:23pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/3 "2022-05-18T21:23:55Z")

</div>

ai is the top priority

---

<div class="post-metadata">

**Author:** ![SoftTalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/softtalker/32/10776_2.png) [@SoftTalker](https://forum.makecode.com/u/SoftTalker)\
**Post date:** [May 18, 2022, 11:43pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/4 "2022-05-18T23:43:38Z")

</div>

you should try this

 ![Screenshot (2140)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b61c71abd1e6ac18dc5ac471e003e2abf28337d3.png)

---

<div class="post-metadata">

**Author:** ![\_jupiter](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/_jupiter/32/28012_2.png) [@\_jupiter](https://forum.makecode.com/u/_jupiter)\
**Post date:** [January 20, 2023, 7:06pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/5 "2023-01-20T19:06:48Z")

</div>

This would make a really good horror game with the AI!

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [January 20, 2023, 11:12pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/6 "2023-01-20T23:12:02Z")

</div>

I could but that is now quite old and i have moved on. also I tried it. its too laggy to run effectively

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [June 27, 2023, 4:58pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/7 "2023-06-27T16:58:39Z")

</div>

if you want to have better quality you can put this in the (on start) block

```auto
namespace userconfig
{
export const ARCADE_SCREEN_WIDTH = 160 * Quality
export const ARCADE_SCREEN_HEIGHT = 120 * Quality
}

```

Ps. you will need to change the background image size from (160,120) to (160 \* Quality,120 \* Quality)

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [June 28, 2023, 5:16pm UTC](https://forum.makecode.com/t/i-need-a-lot-of-help/13621/8 "2023-06-28T17:16:44Z")

</div>

and for the walls we can use the color fading extension, we can make a function to fade one color at a time  
here is a example

```auto
function fadeColor (startR: number, startG: number, startB: number, endR: number, endG: number, endB: number, duration: number, Color: number) {
    FadeQuality = 25 // the fps
    steps = duration / FadeQuality
    deltaR = (endR - startR) / steps
    deltaG = (endG - startG) / steps
    deltaB = (endB - startB) / steps
    // from the timer extension
    timer.background(function () { 
        for (let i = 0; i <= steps - 1; i++) {
            newR = startR + deltaR * i
            newG = startG + deltaG * i
            newB = startB + deltaB * i
            color.setColor(Color, color.rgb(newR, newG, newB)) // from the color fading extension
            pause(FadeQuality)
        }
    })
}

```

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/119f3db03ee0d6767b9e4021b892bdae288d7a21.png)  
we need the timer extension not to freeze the game for `duration` of time.  
now, for the rainbow effect, remove the ` timer.background(function () {})` or “separately do” from the fadeColor function  
then make a new function (the function below)

```auto
function rainbowEffect (cycle: number, OnColor: number, Speed: number, StartR: number, StartG: number, StartB: number) {
    timer.background(function () {
        for (let index = 0; index < cycle; index++) {
            fadeColor(StartR, StartG, StartB, 255, 0, 0, Speed / 6, OnColor) // color to red
            fadeColor(255, 0, 0, 255, 255, 0, Speed / 6, OnColor) // red to yellow
            fadeColor(255, 255, 0, 0, 255, 0, Speed / 6, OnColor) // yellow to green
            fadeColor(0, 255, 0, 0, 255, 255, Speed / 6, OnColor) // green to lightBlue
            fadeColor(0, 255, 255, 0, 0, 255, Speed / 6, OnColor) // lightBlue to blue
            fadeColor(0, 0, 255, StartR, StartG, StartB, Speed / 6, OnColor) // blue to color
        }
    })
}

```

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7b7cf01eca5af6191ab5a9e053cb9962ef99c478.png)  
Speed is the time for one cycle  
Ps. you can change the colors and the number of colors if you want just remember to change the `6`. if you need an explanation on how it works just tag me
