1. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!
  2. Welcome to Smogon Forums! Please take a minute to read the rules.

Programming Pokemon Online replay player

Discussion in 'Technical Projects' started by Zarel, Aug 16, 2011.

Thread Status:
Not open for further replies.
  1. Amarillo

    Amarillo
    is a Tiering Contributor Alumnusis a Contributor Alumnus

    Joined:
    Nov 26, 2010
    Messages:
    726
    Well.. this is pretty awesome. Great job!

    BTW, are you sure you fixed the part where you get an extra pokeball if an action happens to an already fainted pokemon? I also got that same error at turn 5: A lulzy ru battle
  2. Aerrow

    Aerrow hunter
    is a Site Staff Alumnusis a Team Rater Alumnusis a Forum Moderator Alumnusis a Smogon Media Contributor Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnus

    Joined:
    Nov 24, 2009
    Messages:
    1,557
    Wow, this is really, really, cool!
  3. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
    I've introduced animated sprites. Some pokemon don't actually have animated sprites, and very few have back sprites... :| So they'll sort of be "mixed in".

    If you guys want animated back sprites, go make them. <_<

    Well, I mean, I fixed it when drain happens to an already fainted pokemon. Now I fixed it for gems and most other things, too, but I can't guarantee it'll be fixed for every action.
  4. Chieliee

    Chieliee

    Joined:
    Sep 26, 2010
    Messages:
    1,811
  5. RedGalaxy

    RedGalaxy

    Joined:
    Jan 13, 2011
    Messages:
    47
  6. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
    Fixed.

    Fixed.
  7. Rewer

    Rewer
    is a Tiering Contributor Alumnus

    Joined:
    Mar 15, 2009
    Messages:
    1,051
    WOW

    Really amazing. I'm stunned.

    GJ aeo.
  8. Swaggersaurus

    Swaggersaurus I DON'T NEED A MAN
    is an Artist Alumnusis a Forum Moderator Alumnusis a Smogon Media Contributor Alumnus

    Joined:
    Jan 8, 2008
    Messages:
    4,790
    this is such a great little piece of kit, gj!!
  9. Amarillo

    Amarillo
    is a Tiering Contributor Alumnusis a Contributor Alumnus

    Joined:
    Nov 26, 2010
    Messages:
    726
    Oh, I don't know much about programming >.> Sorry if I sounded, you know, too condescending. I just thought that all of those would be put into a single code. As other people already said, this is fantastic work.
  10. Snunch

    Snunch
    is a Forum Moderator Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnuswon the 8th Official Smogon Tournament

    Joined:
    Jun 23, 2010
    Messages:
    1,074
    This is amazing, best thing since Obi's pokemon AI. The only thing I can recommend is displaying a percentage over the HP bar. The huge amount of effort and detail really shows, job very well done.

    Out of curiosity, what language did you use?
  11. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
    Heh, no worries, I didn't take it in a condescending way.

    By the way, I like how your pokemon are named like in Pokemon Special. ^^

    I see you're using the praise-feedback-praise sandwich. ;)

    Amusingly enough, while most of the other things I haven't done are coding issues, the reason there's no HP bar percentage yet is for design reasons: I haven't thought of a good place to put it where it doesn't look ugly.

    JavaScript (jQuery) for the graphics engine, and PHP for the converter. The graphics engine is some pretty nice code (although not very commented), and the converter is the worse spaghetti you'll ever see.

    Here's what the converter looks like:

    http://aesoft.org/pokemon/converter.src.php

    And here's what the graphics engine looks like:

    http://aesoft.org/pokemon/battle.js

    If you click "convert again" under a replay, you can see what the converter looks like in action.
  12. Tyranitarphantom

    Tyranitarphantom

    Joined:
    Aug 6, 2008
    Messages:
    397
    I don't know if someone has said this already, but Healing Wish and Lunar Dance don't restore properly. It only shows restoring 50% HP, when it should be all. Because of that, I'm lead to believe that Wish itself may only show healing 50% HP, rather than 50% of the Wisher's HP

    http://aesoft.org/pokemon/replay-CORCO-vs-PhD-Test--2011-08-14 to demonstrate the Healing Wish problem
  13. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
    Again, when reporting bugs, please link to a replay that experiences them.

    That's true, but that's because PO replays don't store information such as the Wisher's HP.

    I've been talking to coyotte, the creator of PO, and the next version of PO (will be released in a few days) will have replays with that kind of information.

    Here's a test game played using a prerelease version: http://aesoft.org/pokemon/replay-Stormclouds-vs-aeo--2011-08-18

    It has more accurate recoil values.
  14. DanLite

    DanLite

    Joined:
    Jul 25, 2007
    Messages:
    85
    Maybe heighten the HP bars and add text with an outline?

    [​IMG]
    In xx/yy form (open)
    [​IMG]
  15. Pocket

    Pocket Apo, the astronaut's best friend >:3
    is a member of the Site Staffis a Forum Moderatoris a Tiering Contributoris a Contributor to Smogonis a Team Rater Alumnusis a Community Contributor Alumnus
    Doubles Co-Lead

    Joined:
    Dec 22, 2004
    Messages:
    8,580
    At first I was apprehensive about animated Pokemon spirtes, but that demo sealed it - animated sprites are good shit.

    I was pleasantly surprised when Darmanitan's back-sprites were moving :d

    Thanks, aeo.
  16. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
    Wow, that actually looks pretty nice.

    I doesn't look like it fits the rest of my design, though. :/

    I added HP a different way. Do you like it? I'm not entirely satisfied with it, so I'm quite open to suggestions.

    I got my animated sprites from Arkeis. I'm going to run gifsicle on them to make sure they run at the same speed on all browsers (and probably slow them down) as soon as I can.

    Arkeis's site is also the only place I've found back sprites. He didn't have a "download all sprites" button, so I just grabbed some OU pokemon and some other pokemon I recognized and uploaded them:

    http://aesoft.org/pokemon/sprites/bwbackani/

    If anyone has a more complete collection of back sprites, that'd be great.
  17. DanLite

    DanLite

    Joined:
    Jul 25, 2007
    Messages:
    85
    I like where you put the HP, it fits nicely and is easy to see. The only thing I'd change is make the text shadow offset "1px 1px" instead of "1px -1px" to make it more cohesive with the rest of the design (imagining the light source is at the top of the page).
  18. Fried Rhys

    Fried Rhys

    Joined:
    Aug 16, 2009
    Messages:
    532
  19. Super Mario Bro

    Super Mario Bro All we ever look for

    Joined:
    Jan 2, 2010
    Messages:
    1,159
    I tried uploading a log of two other people playing (not myself) and this message came up:

    "Error: Replay file must an English Pokemon Online replay file."

    Help?
  20. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
    Fixed.

    That's the error message I give when there's no line that says:

    "Battle between <A> and <B> started!"

    Could you upload your replay somewhere? Megaupload, perhaps?
  21. Super Mario Bro

    Super Mario Bro All we ever look for

    Joined:
    Jan 2, 2010
    Messages:
    1,159
    Alright, here you go:

    http://www.megaupload.com/?d=LEX41SGQ
  22. Zarel

    Zarel Not a Yuyuko fan
    is a member of the Site Staffis a Battle Server Administratoris a Programmeris a Pokemon Researcheris an Administrator
    Creator of PS

    Joined:
    Aug 16, 2011
    Messages:
    1,757
  23. Stellar

    Stellar dreams and adventure
    is a member of the Site Staffis a Super Moderatoris a Community Contributoris a Battle Server Admin Alumnusis a CAP Contributor Alumnusis a Researcher Alumnusis a Contributor Alumnusis a SPL Winner
    Orange Islands

    Joined:
    Jul 4, 2008
    Messages:
    3,506
    I'm really liking the moving sprite update. This is looking better and better by the day. Great work so far!
  24. D-Nite FTW

    D-Nite FTW

    Joined:
    Jun 3, 2011
    Messages:
    56
    Um.....i cant view any of the replays.....i press play and nothing happens at all. is it my computer that's unable to play to play it or something wrong with the site?
  25. david stone

    david stone Fast-moving, smart, sexy and alarming.
    is a Site Staff Alumnusis a Smogon IRC AOp Alumnusis a Programmer Alumnusis a Super Moderator Alumnusis a Researcher Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Aug 3, 2005
    Messages:
    5,150
    What license is the source code released under? Is it free and open source software or proprietary?
Thread Status:
Not open for further replies.

Users Viewing Thread (Users: 0, Guests: 0)