Sunday, September 10, 2017

RGEE Update #1


RGEE uses image waveforms.
They can really eat up your graphics card texture size limit. So to work around this, i made it so when the width exceeds the limit, it just put the excess right below!
(Something like this)
When i was redoing the waveform generation code, i realized it would't work forever. So now, when it exceeds the texture limit height, it will then just squash it vertically. Retaining time accuracy without much visual loss!
1024x1024 texture for a 2-minute song still looks pretty good!
I don't think a 512x512 graphics card would even get to this point, but you can at least still make out the beats!
There is probably a better system that could be done, but i'm just particularly fond of this!

RGE Engine Story

I figure i might as well start blogging about my projects. I've done so much and plan to do so much that it's probably no good to keep it all secret.
Today i'll share my story on RGE Engine, a rhythm heaven-style game/engine with an editor. You can find it's current progress here: Github Link

This is a project of mine that has been going on for quite a while, and it has many predecessors. One of which is Custom Karate Man, which you can find on my youtube channel!
The Custom Karate Man engine was just programmed for karate man, there was no room for different types of games.

After i got tired of Custom Karate Man, I would try to make a good framework for more rhythm heaven games. First attempt ("Rhythm") was simply a more modular code base, i then realized that wasn't the most clean solution. Second attempt, i tried and succeed at making a new lua sandbox enviroment, in which i started work on cloning Cheer Readers alongside RGEE ("Rhythm 2").

Through both of my attempts, i also added Waveforms, made a neater "Node" system which does not rely on a single-level array, and made a beat-finder that makes it dead easy to add new songs.


That leads us to the RGE Engine, i've been working on and off. And it was always sort of planned to be released eventually but i never shared much about it.

But now, i've been re-inspired to work on it again, and progress is good! That's where i am today.

I would love your feedback and any future rhythm game makers to come check it out! (Still in the middle of revitalizing it though.)

Sunday, April 9, 2017

My Mac Thoughts

I love Macs, i really do.
Apple was a big part of my childhood. These amazing devices were extremely well made, and could do anything you wanted them to do! I'd play with the amazing software it shipped with or play a bunch of the free computer games at the time.

When i got my own macbook, i would end up doing tons of things with it. At first, i was pretty big into Minecraft, and i would play on servers, and even run my own! I installed mods frequently, and even made some recordings with the built in QuickTime Player!

Later on, Snow Leopard would lose a lot of support, which is frankly kinda sad. Snow leopard was pretty lean, and it had all the features you would always end up using. When i had to move on to Mavericks, i would just change things to the way they were in snow leopard. I would change the finder sidebar to the same layout it had by default (Who could find "All Files" useful?). I would remove the notifications bar, as it was taking up space compared to the much more useful spotlight tool. And i would remove launchpad from the dock.

It was pretty clear OS X was changing, it became more bloated with redundant features, while also becoming much more restrictive and losing support for a lot of features and formats that would still be pretty useful today (Native Midi support for example).

It's not all too bad, as a lot of the phenomenal design of OS X still exists in mac OS today. But apple continues, changing the software around for the worse in my opinion. It's a good thing theres tons of amazing third-party software out there for mac.

These are just many of my nitpicks. Macs are still pretty amazing, but just aren't as great as they used to be, in my opinion.

Thursday, February 23, 2017

How small can you store Pokemon EVs?

How many permutations can Pokemon EVs have, and how small can you store them?
There are 6 stats (hp, atk, spatk, def, spdef, spe), each of which have the range of 0-252

There is a maximum of 510 points to be used for all the stats, so that would dramatically lower the amount of permutations.

If we didn't have this limit, it would be easy to figure out how many permutations EVs would make.
253^6 or 253x253x253x253x253x253
Which would be: 262254607552729

I had no idea how i could calculate in the strange limit of 510 points, and couldn't really find much answers.
So i instead just brute forced it and got: 10362121
That's a dramatic difference, and would definitely well translate to storage.

I find that it fits within 3 bytes.
24-bits or 3 bytes = 16777216
That means we save three bytes compared to how EVs are regularly stored, which is 6 bytes for each stat.

Loading it now becomes another problem. The data is now numbered by what permutation it is and you can no longer find out what stat spread you have without some brute force matching.

We could use a look-up table that stores each combination.

10362121*6
(number of indexes) * (the 6 bytes for each stat)
Which is:
62172726 bytes
60715.5 kilobytes
59.2 megabytes

(Not even counting pointers!)

Needless to say, the trade-off is probably not worth it.

Friday, December 9, 2016

Eviolite Champs: Gen 7!

With the release of the new generation (Which is extremely fun by the way.), i decided i would update my eviolite program with all the new pokemon!

Here is all the gen 7 pokemon that get higher defense stats than their evolutions thanks to eviolite:
Cosmoem > Solgaleo | Def: *196* > 107
Cosmoem > Solgaleo | SpD: *196* > 89
Cosmoem > Lunala | Def: *196* > 89
Cosmoem > Lunala | SpD: *196* > 107
Sandygast > Palossand | Def: *120* > 110
Popplio > Brionne | Def: *81* > 69
Popplio > Brionne | SpD: *84* > 81
Type: Null > Silvally | Def: *142* > 95
Type: Null > Silvally | SpD: *142* > 95
Morelull > Shiinotic | Def: *82* > 80
Morelull > Shiinotic | SpD: *112* > 100
Bounsweet > Steenee | Def: *57* > 48
Bounsweet > Steenee | SpD: *57* > 48
Stufful > Bewear | SpD: *75* > 60
Mudbray > Mudsdale | Def: *105* > 100
Crabrawler > Crabominable | Def: *85* > 77
Crabrawler > Crabominable | SpD: *70* > 67
Charjabug > Vikavolt | Def: *142* > 90
Charjabug > Vikavolt | SpD: *112* > 75
Hakamo-o > Kommo-o | Def: *135* > 125
Brionne > Primarina | Def: *103* > 74
Brionne > Primarina | SpD: *121* > 116
Litten > Torracat | Def: *60* > 50
Litten > Torracat | SpD: *60* > 50
Dartrix > Decidueye | Def: *112* > 75
Dartrix > Decidueye | SpD: *105* > 100
Jangmo-o > Hakamo-o | Def: *97* > 90
Rowlet > Dartrix | Def: *82* > 75
Rowlet > Dartrix | SpD: *75* > 70

This generation only has one pokemon that can surpass its evolution with eviolite though!
Type: Null > Silvally | BST: 628 > 570
Def: *142* > 95
SpD: *142* > 95

(Previous Champ) Porygon2 > Porygon-Z | BST: *607* > 535
Def: *135* > 70
SpD: *142* > 75

As you can see, it's more than enough to beat porygon-2! Therefore we have a new eviolite champ!

Sunday, August 21, 2016

The Mega Mewtwo Challenge

I've been messing around with the idea of stats in pokemon.

Both Mewtwo X and Y have the highest base stat total out of all the pokemon, but i wonder, could any Pokemon effectively beat them in stats?

Mega Mewtwo X:
HP: 322
ATK: 385
DEF: 205
SP ATK: 313
SP DEF: 205
SPEED: 265
+127 in full EVs
+186 in full IVs (31*6)
Full Stat Total: 1822-2008 (Variance is in IVs)

Pikachu:
HP: 180
ATK: 115
DEF: 85
SP ATK: 105
SP DEF: 105
SPEED: 185

Now at first glance Pikachu doesn't seem like it could be a very strong pokemon, but there happens to be a special item for Pikachu, the awesome Light Ball!
When held, pikachus attack and special attack are doubled!
So if we strategically add full EVs to these specific stats, we'll get a higher stat total!

Pikachu (EVs and IVs):
HP: 180 + 31 = 211
ATK: 115 + 31 + 63 = 209
DEF: 85 + 31 = 116
SP ATK: 105 + 31 + 63 = 199
SP DEF: 105 + 31 = 136
SPEED: 185 + 31 + 1 = 217

Now, we'll add a Nature! Natures increases one stat and decreases another by 10%.
Since multiplying adds more the bigger the number is, we will choose the attack stat, as it is the largest of the two stats.
Then we decrease the defense stat, because it's the lowest stat out of all of them, therefore we lose less.

Pikachu (Lonely nature, with Light Ball):
HP: 211
ATK: 209 * 1.1 * 2 = 458
DEF: 116 * 0.9 = 104
SP ATK: 199 * 2 = 398
SP DEF: 136
SPEED: 217
Full Stat Total: 1273-1536

And here we have the full stat total of Pikachu!

While it doesn't reach the stat total of Mega Mewtwo, the attack stat we built up is more than enough to take a lot of pokemon down in just a couple hits, provided it doesn't get hit itself!

Porygon-2:
HP: 280
ATK: 165
DEF: 185
SP ATK: 215
SP DEF: 195

SPEED: 125
+127 in full EVs
+186 in full IVs (31*6)
Full Stat Total: 1478

The Eviolite Champ returns! Eviolite multiplies defense and special defense by 1.5, so here we'll use the same techniques and see if we can't get higher.

Porygon-2 (Sassy nature, with Eviolite):
HP: 280 + 31 + 1 = 312
ATK: 165 + 31 = 196
DEF: (185 + 31 + 63) * 1.5 = 418
SP ATK: 215 + 31 = 246
SP DEF: (195 + 31 + 63) * 1.1 * 1.5 = 475

SPEED: (125 + 31) * 0.9 = 140
Full Stat Total: 1569-1787

Picking up where Pikachu left, we're definitely closer. It isn't over yet though, because 2 abilities effectively increase it even more!

Download: On switch-in, increases Atk or Sp. Atk by 1 stage based on the opponents weaker stat.
1 stage is 1.5, and since this is activated on switch-in, this is effectively a free boost!

ATK: 196 * 1.5 = 294
or
SP ATK: 246 * 1.5 = 369
Stat Bonus: 98 or 123

Analytic: 1.3x power on attacks when moving last.
From my research, i found out multiplying move power is like multiplying the attack stat. 1.3 is less than 1.5, so it sadly doesn't reach as high as Download does!

These may prove useful in different situations, but we got the highest total up to 1910, thats crazy close!


Tuesday, July 12, 2016

List of Eviolite Champs

So, i'm a fan of pokemon.
Using Pokemon Showdown's data, i did something pretty cool.

For those who don't know, Eviolite is an item that raises the Defense and Sp. Defense by 50% only for pokemon that have an evolution.

So i searched for pokemon that could replace their evolutions using eviolite!

Here is all the pokemon that get at least one defense stat higher!



And here is all the pokemon that get a greater base stat total as a result!

Doublade > Aegislash | BST: *547* > 520
Def: *225* > 150
Gligar > Gliscor | BST: *514* > 510
Def: *157* > 125
SpD: *97* > 75
Wurmple > Silcoon | BST: *227* > 205
SpD: *45* > 25
Wurmple > Cascoon | BST: *227* > 205
SpD: *45* > 25
Electabuzz > Electivire | BST: *560* > 540
Def: *85* > 67
SpD: *127* > 85
Misdreavus > Mismagius | BST: *507* > 495
Def: *90* > 60
SpD: *127* > 105
Rhydon > Rhyperior | BST: *567* > 535
Def: *180* > 130
SpD: *67* > 55
Magneton > Magnezone | BST: *547* > 535
Def: *142* > 115
SpD: *105* > 90
Porygon2 > Porygon-Z | BST: *607* > 535
Def: *135* > 70
SpD: *142* > 75
Magmar > Magmortar | BST: *565* > 540
Def: *85* > 67
SpD: *127* > 95
Nincada > Shedinja | BST: *326* > 236
Def: *135* > 45
SpD: *45* > 30
Scatterbug > Spewpa | BST: *232* > 213
SpD: *37* > 30
Klang > Klinklang | BST: *529* > 520
Def: *142* > 115
SpD: *127* > 85
Weedle > Kakuna | BST: *220* > 205
SpD: *30* > 25
Caterpie > Metapod | BST: *222* > 205
SpD: *30* > 25
Scyther > Scizor | BST: *580* > 500
Def: *120* > 100
SpD: *120* > 80
Dusclops > Dusknoir | BST: *585* > 525
Def: *195* > 135
SpD: *195* > 135

Probably most notable is Porygon-2, as it gets the highest total out of all of them and even passes the pseudo-legendary mark!