Wednesday, April 8, 2015

The Purge

Want to get the Shiny Starters? Shiny Zorua? Shiny legendary dogs? Shiny Mew? or any other shiny pokemon in the game? Adopt them today using SnD coins! Click here for more info.

Visit the PTD: Pokemon Center - a place to trade pokemon, get your Daily Code, adopt Pokemon, view your items and change your avatar!

Welcome to the Sam and Dan Games Developer Blog!

PTD2 Trainer Pass! Get it today!

A great way to support us while getting amazing rewards!

So let's talk about what you get:
  • Increased chance for Shiny/Shadow pokemon to appear in the wild
  • No ads while you play the game
  • Get a copy of shiny giveaway pokemon automatically every week
  • Faster Breeding - Breed with only one visit instead of 2, essentially breed something everyday!
  • Faster Leveling - Get twice the experience on every battle!
  • Giveaways for pass holders only
You get all of this for only $1.99! One time payment! Get it today!

The Purge
Why can't I play the game? What is this purge that Sam keeps talking about in Twitter? Is my account going to be purged? Will you purge my account? Those are the questions on everybody's mind.

I'm here to answer. For years now the PTD1 and 2 database (where all the user accounts, pokemon, trading information are stored) has been pilling up without any sort of maintenance done on them. The result is databases FULL of data that is no longer used and all it does is slow everything down.

A week ago the servers just couldn't handle it anymore and strange problems started occurring in the game. After talking to my webhost's support team. They told me the problem resided in my side, it was not a hardware issue, and so the PURGE started.

Over 6 months ago I created a code that will write down everybody who logged in ptd2 and stored it in a list. The purpose was that after 6 months we would purge out any other inactive accounts. After talking it over with Dan we decided to also save accounts that had bought the trainer pass or had snd coins (even if they hadn't played for 6 months.)

This would ensure that players that are active can have an even faster experience and all server problems can be resolved a lot quicker.

However one does not simply purge millions upon millions of pokemon in one day. It is a process that takes planning and more importantly TIME.

So I set about creating a script that would automate the whole process. My first attempt could only delete 10 accounts every 20 seconds. We have 7 million account! Lets do the math!

First lets figure out how many attempts it would take if you only do 10 at a time. So 7million divided by 10 = 700,000. That's 700,000 attempts at 20 seconds per attempt. How many seconds is that?

700,000 times 20 = 14,000,000 seconds! Now how many days is that? 14,000,000 seconds / 60 (seconds per minute) /60 (minutes per hour)/24 (hours per day) = about 162 days!

So at that rate the whole purge would take about 162 days!!!!!!

So I worked on making the whole thing faster, instead of deleting a whole account at once I would go thru each database and delete each one individually. This turned out to be a much faster method (can handle over 3000 entries per 10 seconds and many times even more!), but it will still take some time.

So what I will do is update you on how many databases are left to purge that way we can keep track and see how close we are getting. Please not that some databases are smaller than others so some will go a lot faster, some might take a whole day.

So please bare with me and give a moment of silence to all the purge pokemon. Thank you!

Until then I will be working on Designing Champions TD, that means figuring the game out so that we have a clear idea of how long it will take to finish. My hope is that we can finish Champions in 6 months! What do you think?

PTD 2 - Trainer VS Complete!
  • Pick your avatar (100%) - from the ones you have unlocked
  • See more opponent info (100%) - See their wins and their trainer ID
  • Win Streak Mechanic (100%) - Win 7 battles before losing 3 to win a random TM from 10!
  • Win Streak TM Rewards (100%) - Win one of the following Hone Claws, Dragon Claw, Psyshock, Calm Mind, Toxic, Bulk Up, Venoshock, Sunny Day, Rain Dance, Earthquake
Purge Progress Complete!

(Most PTD2 Data is finished, except for trading data which will be last and shouldn't take very long, because all data is held at one server I can't re enable PTD2 until everything is done.)

Complete PTD1 Pokemon Storage Database 5 - about 25 million entries
Complete PTD1 Pokemon Storage Database 6
Complete PTD1 Pokemon Storage Database 7
Complete PTD1 Pokemon Storage Database 8
Complete PTD1 Pokemon Storage Database 9
Complete PTD1 Player's Items Database
Complete PTD1 Player's Achievements Database - about 200k entries
Complete PTD1 Player's Game Corner Database - about 546k entries
Complete PTD1 Player's Daily Codes Database - about 549k entries
Complete PTD1 Player's Pokedex Database - about 4 million entries
Complete PTD Player Account's Database - about 7 million entries
Complete PTD1 Trading Center Database - about 211k entries
Complete PTD2 Trading Center Database - about 600k entries

I'll be updating this during the day as the process moves from database to database. Thank you for your support!