# Elemental rebooted Devlog

**URL:** <https://forum.makecode.com/t/elemental-rebooted-devlog/47313>\
**Category:** Show & Tell\
**Tags:** art, game, extension, demo\
**Created:** [November 15, 2026, 6:17am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313 "2026-11-15T06:17:18Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 19, 2026, 12:34am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/21 "2026-11-19T00:34:37Z")

</div>

To summarize… I have switched from using mouse controls(more fun but less perf) to use button controls(less fun easier to port to hardware and better perf on said hardware), My game would run probably really good 30+fps but the memory usage would be INSANE(storing hundreds of cards gets ya).

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 19, 2026, 5:45am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/22 "2026-11-19T05:45:58Z")

</div>

not directly for the end and start( the time value should only be in-between those) Its more of a percent of the start to the end(dunno how to word this

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 19, 2026, 6:26pm UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/23 "2026-11-19T18:26:15Z")

</div>

time goes from 0 to 1. If you take:

```typescript
function lerp (start: number, end: number, time: number) {
    return start + (end - start) * time
}

```

`lerp(5, 10, 0)` → `5 + (10 - 5) * 0` → `5 + 5 * 0` → `5 + 0` → `5`  
`lerp(5, 10, 1)` → `5 + (10 - 5) * 1` → `5 + 5 * 1` → `5 + 5` → `10`

If time went from `start` to `end`, lerp would look like:

```typescript
function lerp (start: number, end: number, time: number) {
    return time
}

```

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 21, 2026, 9:49pm UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/24 "2026-11-21T21:49:12Z")

</div>

I mainly wanted to sort it so it doesn’t look a huge mess of spaghetti, and you can easily add more types of entities (using the update function, and if needed to the render one)

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 21, 2026, 9:49pm UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/25 "2026-11-21T21:49:17Z")

</div>

yuo should probably use both mouse and controller

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 22, 2026, 3:55am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/26 "2026-11-22T03:55:08Z")

</div>

That would be the worst of both worlds. So lemme get this straight you want me to have janky controls(buttons) and have overlaps that drain performance?? What would be the point? I would develop the button version and if I wanted I may make a mouse version.(another way would be to use 0-9 to switch cards faster)

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 22, 2026, 8:19pm UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/27 "2026-11-22T20:19:18Z")

</div>

I don’t really know the best way to make it but it could be like:

```typescript
let s = sprites.create(img`1`, SpriteKind.Player)

if (control.deviceDalVersion() == "sim") {
    browserEvents.onMouseMove((x, y) => { s.x = x; s.y = y })
    browserEvents.setCursorVisible(false)
} else controller.moveSprite(s)

```

`control.deviceDalVersion()` returns “sim” on the simulator and something else on hardware, so this way your only using one at a time

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 23, 2026, 1:55am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/28 "2026-11-23T01:55:09Z")

</div>

I guess this would work but likeee… I don’t wanna. Thanks for your continued support man! Anyways I’m completely redoing the engine to fit this(now cards are just data storing and a single method lol). My next biggest issue is probably going to see how I’m going to Implement moves. @Luke how did the enemies in your game card delver do it? I am most likely going to do it like sts does with some using a cycle some using percents for attacks and probably some with phases(simple check and then switches to a different cycle).

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [November 24, 2026, 12:22am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/29 "2026-11-24T00:22:20Z")

</div>

I just had an array for each enemy which corresponds to the cycle of intents

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 24, 2026, 12:30am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/30 "2026-11-24T00:30:27Z")

</div>

darn it(you went ez mode). I was praying you had some insight on other attack patterns

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 24, 2026, 4:22am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/31 "2026-11-24T04:22:53Z")

</div>

what are you thinking that makes it more complicated? (because so far I haven’t really understood what it is)

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [November 24, 2026, 4:30am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/32 "2026-11-24T04:30:18Z")

</div>

it shouldnt be too hard to generate a random array of intents every round for each enemy though. I used a system like that but it was to read card info instead and it wasnt random

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 25, 2026, 6:50am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/33 "2026-11-25T06:50:38Z")

</div>

im thinking more of using a class to store the intents and then idk how but run conditionals and percents on them and stuff to get an output of a single intent(i will then store this enemy behavior class on the enemy). Anyways lemme explain this in this way. Cycle attacks are like this:  
Buff → Attack → Attack → Attack -\>Attack → Buff and on and on.  
Percent attacks would be like this:  
Debuff → 50% to attack/50% to block.  
Phase attacks would be like this:  
Attack → block on and on but when the enemies health is below 20% it switches to Debuff → Attack and then on and on

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 25, 2026, 7:18am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/34 "2026-11-25T07:18:49Z")

</div>

> [@TheGooberEarth](#):
>
> Thanks for your continued support man!

Your welcome!

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 25, 2026, 7:52am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/35 "2026-11-25T07:52:06Z")

</div>

I have something I wanna run by @VoxelMaster64.  
How would I make custom enemy behaviors? My strategy would be to create an arrow function that is attached to my enemy.  
Then I would run it every turn. The function would output a return value of enemyIntent which I would save to both currentIntent and all intents. After it finishes I would change my enemies private index by one. Is there a better way to do it?Also here is my code for all the stuff I mentioned:

```typescript
enum Intents{
    Attack,
    Debuff,
    Buff,
    DestroyElement,
    CreateCurse
}
interface EnemyAction{
    intent:Intents
    identifier?:number|Element
}
class Enemy {
    health: number
    enemyBehavior:()=>{}
    private index: number
    currentEnemyIntent:EnemyAction
    allIntents: EnemyAction[]
}

```

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 26, 2026, 1:58am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/36 "2026-11-26T01:58:18Z")

</div>

your doing the arrow function wrong, you want the type to be `() => void`. And it might depend on how many enemies are going to be fighting per round. If there is one enemy, it might be like:

```typescript
class EnemyCard extends Entity {
    ...
}

enum Intents {
    Attack,
    Debuff,
    Buff,
    DestroyElement,
    CreateCurse
}
interface EnemyAction {
    intent: Intents
    identifier?: number | Element
}
class Enemy {
    health: number
    enemyBehavior = () => {} // type is () => void
    cards: EnemyCard[] = []
    
}

/*
array of all the behaviors, maybe save
each index to a enum if needed, but
enemyBehaviors[0] may be a simple bot
(e.g. only attacks) and enemyBehaviors[15]
may be a complex boss
*/

/*
if you want to reuse a function from enemyBehaviors, you could do 
let enemyBehaviors = [
    () => {...},
    () => enemyBehaviors[0]()
]
*/

let enemyBehaviors = [
    ()=>{
        ...
    },()=>{
        ...
    },
    ...
]

let enemy: Enemy

// Maybe in another file?
class Player {
    cards: PlayerCard[]
    function clickCard(card: number) {
        cards.removeAt(card)
        enemy.takeTurn()
    }
}

```

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 26, 2026, 6:32am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/37 "2026-11-26T06:32:32Z")

</div>

oh yeah I fixed that also I don’t need entity since I’m deciding to have 0 overlaps so its kinda goneeeeeeeee

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 30, 2026, 2:10am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/38 "2026-11-30T02:10:29Z")

</div>

WAIT WHAAA-

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/9/89d84dbb49c0af392cda3a9277c3472a53a58cc1.png)

@ScriptScraper is part of the teammmm!?!?!"!?!?!?!?!?1?! Lez GOOOOOOO

also uhmmm @TeddyB can you make some fire music please I would like a piece like "Exordium " by Clark Aboud

linke here

[![](https://img.youtube.com/vi/b4hqq5u5Y94/maxresdefault.jpg "Exordium") ](https://www.youtube.com/watch?v=b4hqq5u5Y94)

---

<div class="post-metadata">

**Author:** ![Hulahoop](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hulahoop/32/37375_2.png) [@Hulahoop](https://forum.makecode.com/u/Hulahoop)\
**Post date:** [November 30, 2026, 3:55am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/39 "2026-11-30T03:55:21Z")

</div>

I didn’t know that there was a vote sorry @TheGooberEarth. May I be artist or musician though?

I have experience in real life music if that helps? And experience in pixel art as you already know, Just not alot of experience for art. I’m good if there is a reference?

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [December 1, 2026, 5:52am UTC](https://forum.makecode.com/t/elemental-rebooted-devlog/47313/40 "2026-12-01T05:52:42Z")

</div>

hmm I kinda assembled it a while ago…ill ask you the same thing as what I asked teddyb to make and I’ll pick the best one(the other song might still get used)

[Previous page](https://forum.makecode.com/t/elemental-rebooted-devlog/47313.md?page=1)

[Next page](https://forum.makecode.com/t/elemental-rebooted-devlog/47313.md?page=3)
