Programming Pokemon Online replay player

Status
Not open for further replies.

Blue Kirby

Never back down.
is a Top Tutor Alumnusis a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Smogon Discord Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnusis a Past SPL Championis a Three-Time Past WCoP Champion
Just posting to say that this is nothing short of amazing. As someone that has a handle on what it takes to put something like this together, I'm really impressed that you've done it in such a short amount of time. Even in its current form, it has the potential to change the way we do a lot of things around here.

Thanks a bunch for all the effort, I hope you keep going with this! Now I feel like doing some programming of my own...
 

a fairy

is a Tournament Directoris a Site Content Manageris a Community Leaderis a Community Contributoris a Smogon Discord Contributoris a Contributor to Smogonis a Top Smogon Media Contributoris a Dedicated Tournament Hostis a Social Media Contributor Alumnus
Community Leader
I've been looking at your thread since you made it, and never found the time to post. I would normally make this a long post of how I love it, but I'm on an iPad...

So yeah, this is awesome. Mad props to you.
 
Found another bug here.

http://pokemon.aesoft.org/replay-kreker-vs-sharktamer--2011-08-21

Forretress uses surf instead of cloyster, then the replay stops.

In this battle, the reflect graphic stays up for the whole battle.

http://pokemon.aesoft.org/replay-sharktamer-vs-BSOD--2011-08-21

This replay has the same problems as the first, with it getting confused about who is actually making the moves. It doesn't stop, but the problem is still there.

http://pokemon.aesoft.org/replay-Dallas-vs-sharktamer--2011-08-21

EDIT: Actually, it does stop after turn 2.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Found another bug here.

http://pokemon.aesoft.org/replay-kreker-vs-sharktamer--2011-08-21

Forretress uses surf instead of cloyster, then the replay stops.

In this battle, the reflect graphic stays up for the whole battle.

http://pokemon.aesoft.org/replay-sharktamer-vs-BSOD--2011-08-21

This replay has the same problems as the first, with it getting confused about who is actually making the moves. It doesn't stop, but the problem is still there.

http://pokemon.aesoft.org/replay-Dallas-vs-sharktamer--2011-08-21

EDIT: Actually, it does stop after turn 2.
This has been fixed, but I'm disappointed at coyotte508. :| The reason it failed was that the replays apparently lie about which player is which.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
The reflect problem is still there. I did notice that when my reflect wore off, it actually said the opponents had instead.
Fixed.

I'm annoyed at PO for capitalizing your name as "sharktamer" in some cases and "Sharktamer" in others. >_>
 

Nails

Double Threat
is a Community Contributoris a Tiering Contributoris a Social Media Contributor Alumnusis a Community Leader Alumnusis a Battle Simulator Moderator Alumnusis a Past SPL Championis a Three-Time Past WCoP Champion
it would be cool if the replayer could display % hp remaining while hovering over a poke ball like it does on po. and i'm bringing up sds's point about +2 instead of 2x, since it's how the sim lists it and how people are used to seeing it (and the .7x drives me crazy).

my earlier post of something to the effect of "this is incredibly epic" still applies

edit: it would also be cool if you could upload a log (just the text) without having to have the file saved, watching a battle on your player is way cooler than reading a log.
 

Oglemi

Borf
is a Top Contributoris a Tournament Director Alumnusis a Site Content Manager Alumnusis a Community Contributor Alumnusis a Researcher Alumnusis a Tiering Contributor Alumnusis a Top Smogon Media Contributor Alumnusis an Administrator Alumnusis a Top Dedicated Tournament Host Alumnus
it would be cool if the replayer could display % hp remaining while hovering over a poke ball like it does on po. and i'm bringing up sds's point about +2 instead of 2x, since it's how the sim lists it and how people are used to seeing it (and the .7x drives me crazy).

my earlier post of something to the effect of "this is incredibly epic" still applies
I'd also like to point out it's also how it's mentioned in our analyses, not just how it is on PO.

Keep at it aeo, it keeps getting better and better and better...
 
So i'm just assuming that this replayer doesn't recognize the old Japanese names. I had a few great logs from wayyy before BW came out, so they all have their Japanese names. To fix this, should I just change all of the names to English in the logs? Or is there an easier, less tedious way?

But again, this is amazing Aeo :D
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
edit: it would also be cool if you could upload a log (just the text) without having to have the file saved, watching a battle on your player is way cooler than reading a log.
This will be possible eventually.

it would be cool if the replayer could display % hp remaining while hovering over a poke ball like it does on po. and i'm bringing up sds's point about +2 instead of 2x, since it's how the sim lists it and how people are used to seeing it (and the .7x drives me crazy).
I'd also like to point out it's also how it's mentioned in our analyses, not just how it is on PO.

Keep at it aeo, it keeps getting better and better and better...
At this point, a fairly decent number of people who haven't played pokemon are watching these replays, so I don't want "+2 Accuracy" to be the only option. How many people actually know that "+2 Accuracy" is 5/3x accuracy?

I can change the .7x to .67x.

I could make "+6 Atk" an option to display instead of "4x Atk". But a principle of UI design is that options should only implemented for stuff that's really important.

Here's the problem with having things as options, in general: The option button will be as big as the pause button, even though the pause button is far more important. People watching replays on someone else's computer, or a casted replay on YouTube, could be seeing things they're not used to. On the other hand, if you force it a certain way, people will get used to it eventually. And most of the time, there is a correct answer - having an option is just a programmer's way of saying "I'm too lazy to figure out which one it is". Options should only be for things for which there are a significant number of people who want either side and are willing to dig through an Options menu to find it.

The example I usually like to give is: Opera 9 had an insanely customizable UI, Chrome 1's UI was barely customizable, but Chrome quickly became much more popular.

Okay, so, here's what I'm going to do.

First, I'm going to change stuff like 0.7x to .67x and 1.3x to 1.33x. To me as a designer, it looks uglier that way, and to me as a mathematician, there isn't low enough difference between boosts to justify the extra decimal place, but in practice, people get bothered when "0.7" means "2/3", so I'm changing that.

Second, three people have asked for boosts in the form of "+1" instead of "1.5x" by now. That's not something I can ignore.

One possibility is that I could use "2.5x Atk (+3)". That would make the statbar look pretty crowded, but it's a possibility.

The other possibility is to actually change it to say "+1" instead of "1.5x".

Before I do that, though, I'd like an opportunity to debate about it a bit more.

If you don't know the relationship between multipliers and stages (and while most Smogonites do, you probably don't know the obscure ones: how accurate is Close Combat against +4 evasion, without looking it up?), I'd argue that it's more important to know the multipliers.

The multipliers tell you how much damage you'll do, how fast you are... The stages just tell you whether or not your move will have an effect if you keep on using it (protip: just memorize "4x" - 4x: the new +6?).

The reasons I've heard for stages are just "I'm used to it" and "Smogon uses it in other places". Is there a reason that doesn't boil down to "that's how it's always been done"?

So i'm just assuming that this replayer doesn't recognize the old Japanese names. I had a few great logs from wayyy before BW came out, so they all have their Japanese names. To fix this, should I just change all of the names to English in the logs? Or is there an easier, less tedious way?
It will recognize the old Japanese names eventually.

Currently, I have a shim for some of the more popular gen 5 pokemon:

Code:
	var pokeNameTable = {
		Birijion: 'Virizion',
		Terakion: 'Terrakion',
		Agirudaa: 'Accelgor',
		Randorosu: 'Landorus',
		Urugamosu: 'Volcarona',
		Erufuun: 'Whimsicott',
		Doryuuzu: 'Excadrill',
		Burungeru: 'Jellicent',
		Nattorei: 'Ferrothorn',
		Shandera: 'Chandelure',
		Roobushin: 'Conkeldurr',
		Ononokusu: 'Haxorus',
		Sazandora: 'Hydreigon',
		Chirachiino: 'Cinccino'
	};
It's a stopgap until I update my generator for pokedex.js to be able to lookup Japanese names. If you'd like, you can give me code for some other gen 5 pokemon and I'll just paste it in.
 

Seven Deadly Sins

~hallelujah~
is a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
If you don't know the relationship between multipliers and stages (and while most Smogonites do, you probably don't know the obscure ones: how accurate is Close Combat against +4 evasion, without looking it up?), I'd argue that it's more important to know the multipliers.
Evasion starts at 3/3, so +4 evasion is 3/7 hitrate or ~43%. And regardless, people that play Pokemon should know this anyway, so dumbing it down is just a crutch that people who play don't have while they're playing.

The multipliers tell you how much damage you'll do, how fast you are... The stages just tell you whether or not your move will have an effect if you keep on using it (protip: just memorize "4x" - 4x: the new +6?).

The reasons I've heard for stages are just "I'm used to it" and "Smogon uses it in other places". Is there a reason that doesn't boil down to "that's how it's always been done"?
The issue is that literally every single other method of Pokemon and Pokemon resource does it this way, and consistency is important when battlers have gotten used to the way stage boosts work. There's an extent to which the "I think it's better" argument doesn't trump the "your target audience is used to the original format" argument, and in the case of consistency with other sources, such as analyses and simulators, I'd say this is one of them.

(if it wasn't clear, this was me advocating for "The other possibility is to actually change it to say '+1' instead of '1.5x'.")
 
At this point, a fairly decent number of people who haven't played pokemon are watching these replays, so I don't want "+2 Accuracy" to be the only option. How many people actually know that "+2 Accuracy" is 5/3x accuracy?

I can change the .7x to .67x.

I could make "+6 Atk" an option to display instead of "4x Atk". But a principle of UI design is that options should only implemented for stuff that's really important.

Here's the problem with having things as options, in general: The option button will be as big as the pause button, even though the pause button is far more important. People watching replays on someone else's computer, or a casted replay on YouTube, could be seeing things they're not used to. On the other hand, if you force it a certain way, people will get used to it eventually. And most of the time, there is a correct answer - having an option is just a programmer's way of saying "I'm too lazy to figure out which one it is". Options should only be for things for which there are a significant number of people who want either side and are willing to dig through an Options menu to find it.

The example I usually like to give is: Opera 9 had an insanely customizable UI, Chrome 1's UI was barely customizable, but Chrome quickly became much more popular.

Okay, so, here's what I'm going to do.

First, I'm going to change stuff like 0.7x to .67x and 1.3x to 1.33x. To me as a designer, it looks uglier that way, and to me as a mathematician, there isn't low enough difference between boosts to justify the extra decimal place, but in practice, people get bothered when "0.7" means "2/3", so I'm changing that.

Second, three people have asked for boosts in the form of "+1" instead of "1.5x" by now. That's not something I can ignore.

One possibility is that I could use "2.5x Atk (+3)". That would make the statbar look pretty crowded, but it's a possibility.

The other possibility is to actually change it to say "+1" instead of "1.5x".

Before I do that, though, I'd like an opportunity to debate about it a bit more.

If you don't know the relationship between multipliers and stages (and while most Smogonites do, you probably don't know the obscure ones: how accurate is Close Combat against +4 evasion, without looking it up?), I'd argue that it's more important to know the multipliers.

The multipliers tell you how much damage you'll do, how fast you are... The stages just tell you whether or not your move will have an effect if you keep on using it (protip: just memorize "4x" - 4x: the new +6?).

The reasons I've heard for stages are just "I'm used to it" and "Smogon uses it in other places". Is there a reason that doesn't boil down to "that's how it's always been done"?
I would agree that it is, "that's how it has always been done," but would argue the implications of that. It has always been done in stages because the game has trained us to think that way. When you think, "what does my Excadrill need to be at to KO this 40% Gliscor?" you answer, "Oh it needs to be at +4," because of the way you boost stats. Each move boosts stats by stages, which we then translate in our heads into percentages.

I think if, hypothetically, you were making a new game based on Pokemon, or a new concept entirely, then it would make sense to change it. It's a clean break; you can do what makes more sense. But this player is built to use the current implementation of online battling: it uses the log file from Pokemon Online. When you hover your mouse over the sprites in PO, it lists stat boosts in stages. Given that, and given how deeply entrenched the competitive community is with the concept of stages, I think it makes sense for the player—which is meant to function solely as an extension of the battle log—to use the same format. It becomes very jarring otherwise. And while I agree that non-players would be much more comfortable with multipliers, I think the percentage of viewers who will be non-players is going to be very small.

And while I agree with your rant on options, I would argue that Chrome's eventual dominance over Opera came about for different reasons.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
The issue is that literally every single other method of Pokemon and Pokemon resource does it this way, and consistency is important when battlers have gotten used to the way stage boosts work. There's an extent to which the "I think it's better" argument doesn't trump the "your target audience is used to the original format" argument, and in the case of consistency with other sources, such as analyses and simulators, I'd say this is one of them.
I would agree that it is, "that's how it has always been done," but would argue the implications of that. It has always been done in stages because the game has trained us to think that way. When you think, "what does my Excadrill need to be at to KO this 40% Gliscor?" you answer, "Oh it needs to be at +4," because of the way you boost stats. Each move boosts stats by stages, which we then translate in our heads into percentages.

I think if, hypothetically, you were making a new game based on Pokemon, or a new concept entirely, then it would make sense to change it. It's a clean break; you can do what makes more sense. But this player is built to use the current implementation of online battling: it uses the log file from Pokemon Online. When you hover your mouse over the sprites in PO, it lists stat boosts in stages. Given that, and given how deeply entrenched the competitive community is with the concept of stages, I think it makes sense for the player—which is meant to function solely as an extension of the battle log—to use the same format. It becomes very jarring otherwise. And while I agree that non-players would be much more comfortable with multipliers, I think the percentage of viewers who will be non-players is going to be very small.
You both have good points, and I know an overwhelming majority when I see one. I've changed the replay viewer to display stages.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Another update:

IE7, IE8, and IE9 support!

(If you use IE9 and it froze in the middle of certain replays, that has been fixed.)

IE9
- crashes on console.log unless you press F12 first

IE8
- doesn't support string.trim()
- doesn't support rgba colors

IE7
- doesn't support [a,b,c,] list notation
- doesn't support margin-top on the first element

Technically, I knew about the IE7 list notation bug and the IE8 rgba bug, and also technically, I know they're not so much bugs as just lacking features you'd expect every browser to have.
 
I think it might be a good idea to fill in the pokeball icons under each players name to 6 on both side. If less than 6 pokemon were revealed on a side, then fill it with blanks.

It kinda gives away who the winner of the battle is.
 

Pocket

be the upgraded version of me
is a Site Content Manager Alumnusis a Team Rater Alumnusis a Community Leader Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnus
^hmm, yea, I second that. Nice suggestion, sharktamer.

I personally liked the multipliers instead of stages for status boosts, because they were more meaningful, but either representation is fine in the end.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Recent changes:
- Aqua Ring is now supported
- Graphics have been added for Safeguard, Seed Flare, Air Slash, and Air Cutter

I think it might be a good idea to fill in the pokeball icons under each players name to 6 on both side. If less than 6 pokemon were revealed on a side, then fill it with blanks.

It kinda gives away who the winner of the battle is.
Fixed.
 
494:0 Bikutini
495:0 Tsutaaja
496:0 Janobii
497:0 Jarooda
498:0 Pokabu
499:0 Chaobuu
500:0 Enbuoo
501:0 Mijumaru
502:0 Futachimaru
503:0 Daikenki
504:0 Minezumi
505:0 Miruhoggu
506:0 Yooterii
507:0 Haderia
508:0 Muurando
509:0 Choroneko
510:0 Reparudasu
511:0 Yanappu
512:0 Yanakkii
513:0 Boappu
514:0 Baokkii
515:0 Hiyappu
516:0 Hiyakkii
517:0 Munna
518:0 Mushaana
519:0 Mamepato
520:0 Hatoopoo
521:0 Kenhorou
522:0 Shimama
523:0 Zeburaika
524:0 Dangoro
525:0 Gantoru
526:0 Gigaiasu
527:0 Koromori
528:0 Kokoromori
529:0 Moguryuu
530:0 Doryuuzu
531:0 Tabunne
532:0 Dokkora
533:0 Dotekkotsu
534:0 Roobushin
535:0 Otamaro
536:0 Gamagaru
537:0 Gamageroge
538:0 Nageki
539:0 Dageki
540:0 Kurumiru
541:0 Kurumayu
542:0 Hahakomori
543:0 Fushide
544:0 Hoiiga
545:0 Pendoraa
546:0 Monmen
547:0 Erufuun
548:0 Churine
549:0 Doredia
550:0 Basurao
550:1 Basurao-A
551:0 Meguroko
552:0 Warubiru
553:0 Warubiaru
554:0 Darumakka
555:0:H Hihidaruma
555:1 Hihidaruma-D
556:0 Marakacchi
557:0 Ishizumai
558:0 Iwaparesu
559:0 Zuruggu
560:0 Zuruzukin
561:0 Shinboraa
562:0 Desumasu
563:0 Desukan
564:0 Purotooga
565:0 Abagoora
566:0 Aaken
567:0 Aakeosu
568:0 Yabukuron
569:0 Dasutodasu
570:0 Zoroa
571:0 Zoroaaku
572:0 Chiraamii
573:0 Chirachiino
574:0 Gochimu
575:0 Gochimiru
576:0 Gochiruzeru
577:0 Yuniran
578:0 Daburan
579:0 Rankurusu
580:0 Koaruhii
581:0 Suwanna
582:0 Banipucchi
583:0 Baniricchi
584:0 Baibanira
585:0 Shikijika
585:1 Shikijika-Summer
585:2 Shikijika-Autumn
585:3 Shikijika-Winter
586:0 Mebukijika
586:1 Mebukijika-Summer
586:2 Mebukijika-Autumn
586:3 Mebukijika-Winter
587:0 Emonga
588:0 Kaburumo
589:0 Shubarugo
590:0 Tamagetake
591:0 Morobareru
592:0 Pururiru
593:0 Burungeru
594:0 Mamanbou
595:0 Bachuru
596:0 Denchura
597:0 Tesshiido
598:0 Nattorei
599:0 Giaru
600:0 Gigiaru
601:0 Gigigiaru
602:0 Shibishirasu
603:0 Shibibiiru
604:0 Shibirudon
605:0 Riguree
606:0 Oobemu
607:0 Hitomoshi
608:0 Ranpuraa
609:0 Shandera
610:0 Kibago
611:0 Onondo
612:0 Ononokusu
613:0 Kumashun
614:0 Tsunbeaa
615:0 Furiijio
616:0 Chobomaki
617:0 Agirudaa
618:0 Maggyo
619:0 Kojofuu
620:0 Kojondo
621:0 Kurimugan
622:0 Gobitto
623:0 Goruggo
624:0 Komatana
625:0 Kirikizan
626:0 Baffuron
627:0 Washibon
628:0 Uooguru
629:0 Baruchai
630:0 Barujiina
631:0 Kuitaran
632:0 Aianto
633:0 Monozu
634:0 Jiheddo
635:0 Sazandora
636:0 Meraruba
637:0 Urugamosu
638:0 Kobaruon
639:0 Terakion
640:0 Birijion
641:0 Torunerosu
642:0 Borutorosu
643:0 Reshiramu
644:0 Zekuromu
645:0 Randorosu
646:0 Kyuremu
647:0 Kerudio
648:0:H Meloetta
648:1 Meloetta-S
649:0 Genosekuto


Also, I thought that displaying 1.5x, 2x, 2.5x and so on was really a great idea, and not everyone using the replay machine knows the exact boost/value conversion (you lucked out in this forum though)
 

Blue Kirby

Never back down.
is a Top Tutor Alumnusis a Site Content Manager Alumnusis a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Smogon Discord Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnusis a Past SPL Championis a Three-Time Past WCoP Champion
Yeah, I agree with coyotte. For something that's potentially so valuable as a teaching tool, I don't think displaying 0.7x instead of -1 was such a bad idea. Ultimately, it's just a preference thing though, isn't it? You'll never be able to please everybody, that's for sure -- don't feel bad if you don't bend on every little nitpick. This is a great tool either way, it's a shame people aren't more thankful for your time. Ahh, the life of a software deveoper. :)
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Top