# Ranting about upgrade randomization

**URL:** https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233
**Category:** Arcade
**Created:** [March 3, 2025, 2:44am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233 "2025-03-03T02:44:34Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)
#### Post date: [March 3, 2025, 2:44am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/1 "2025-03-03T02:44:34Z")

</div>

before i even get started, LOOK AT THIS.

 ![Screenshot 2025-03-02 141449](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/8/c8e4384448702ab71fdbee67bf0ac7974ddd87d9.png)  
 ![Screenshot 2025-03-02 141503](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/c/8c50213739c40a66eae55550ce859bfa1985b426.png)  
 ![Screenshot 2025-03-02 141509](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/f/5fcd54cdf69c62d33716f53900d05b888d4403a8.png)

that line of code was so long i had to take multiple screenshots to get it all. anyway, onto my main rant.

## RANDOMIZED UPGRADES _ **SUUUCCCKKK** _ TO CODE, DUDE.

and what do i mean by that, you ask? well, i had to create 3 different rarities (common rare epic) and sort NINE different upgrades into them. five in common, three in rare, one in epic. i had three upgrade slots that i needed to fill, so i had to.. _INHAAAAALLLEE…_ make nine different sprites, use reference images for some of the weapons, create separate lines of code for EVERY SINGLE UPGRADE, make names for all of them that would fit in the screen as one single line, make three different random number generators from 1 to the number of upgrades in each rarity, and on top of all that, copy and paste the code THREE TIMES. one for each slot. so that all comes together to make a three-slot upgrade randomizer. the code is held together by popsicle sticks, elmers glue and prayers, but it **works.** miraculously enough, it works. i… i want to not exist anymore.

---

<div class="post-metadata">

### Author: ![ADM\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adm_f/32/19808_2.png) [@ADM\_F](https://forum.makecode.com/u/ADM_F)
#### Post date: [March 4, 2025, 3:17am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/2 "2025-03-04T03:17:28Z")

</div>

Can i talk to you about our lord and savior arrays?

> [@Learning the advanced tab in Makecode Arcade](https://forum.makecode.com/t/learning-the-advanced-tab-in-makecode-arcade/34163):
>
> Hello Fish here, I’m here to talk about the advanced tab in Makecode! while you can code some cool stuff without it using it can take your games to another level (mostly Functions and arrays) this isn’t meant to be a end all be all for everything here but more so a starters guide to using these blocks play_button Arraysplay_button Functionsplay_button Images and Animationsplay_button Text and Console In short arrays are AWESOME and if you didn’t know how to use them i hope you do now it can be so useful to keep info i…

if you give each value in a array a name or some way for the game to recognize then it will be much easier to get done  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/a/1/a11e4d9a57c98b5e3ff9d0f15787425506542dff.png)

---

<div class="post-metadata">

### Author: ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)
#### Post date: [March 4, 2025, 3:17am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/3 "2025-03-04T03:17:29Z")

</div>

Have you heard of arrays? They can store more than one value so you don’t have to make giant if conditions like that, Instead you can just use a array to have a index point to a option.

---

<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: [March 4, 2025, 3:29am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/4 "2025-03-04T03:29:12Z")

</div>

Hate to be that guy, but this is what arrays are for…  
Then again, I have been wanting an excuse to tell @richard that having the ability to create Classes in blocks would be pretty cool! Idk if that’s something an extension could add, but I’m certainly not good enough at the block syntax to make such a thing.

---

<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: [March 4, 2025, 3:31am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/5 "2025-03-04T03:31:47Z")

</div>

You can get “class-like” functionality by using the **Sprite Data** extension, which lets you add attributes to sprites. In combination with functions, you essentially can create child classes of the Sprite class.

---

<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: [March 4, 2025, 1:20pm UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/6 "2025-03-04T13:20:49Z")

</div>

I specifically use classes to avoid using sprites, just because they are such a hit to fps! I don’t think that my rat extermination game could handle 200+ rats at 400 fps if they were all sprites. It’s kinda disappointing, but finding alternatives to sprites is a lot of fun!

---

<div class="post-metadata">

### Author: ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)
#### Post date: [March 4, 2025, 6:47pm UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/7 "2025-03-04T18:47:50Z")

</div>

GUYS HOW THE F(ifty percent off!) DO ARRAYS WORK

---

<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: [March 5, 2025, 12:56am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/8 "2025-03-05T00:56:17Z")

</div>

Here is a horrible example that doesn’t explain anything whatsoever:

> **[very bad example of how arrays work (blocks)](https://arcade.makecode.com/S19727-04335-06394-04572)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I’m sure you will be able to figure out arrays just by looking at the code and won’t have any problems at all because I’m so good at not explaining anything!

PS: @ADM_F literally sent you a whole write up like a few messaged above this! The least you could do is read it!!

---

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [March 5, 2025, 9:50pm UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/9 "2025-03-05T21:50:50Z")

</div>

woah how long were you inactive blud

---

<div class="post-metadata">

### Author: ![Justasmallcoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/justasmallcoder/32/24428_2.png) [@Justasmallcoder](https://forum.makecode.com/u/Justasmallcoder)
#### Post date: [March 5, 2025, 9:50pm UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/10 "2025-03-05T21:50:51Z")

</div>

Please share game when done it looks complicated and I love complicated games!

---

<div class="post-metadata">

### Author: ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)
#### Post date: [March 6, 2025, 12:27am UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/11 "2025-03-06T00:27:53Z")

</div>

Around 4 to 5 months? But I’m just gonna go inactive again, So… Yeah.

---

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [March 6, 2025, 1:32pm UTC](https://forum.makecode.com/t/ranting-about-upgrade-randomization/34233/12 "2025-03-06T13:32:24Z")

</div>

oooof sad. see ya around!  
PS: in apr we are expecting a makecode arcade update so u might wanna stick around for a bit
