Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

Dev Log 204

Forum Index > Core > Announcements >

Pages: 1234

Well, we've had an interesting past couple of weeks, haven't we? Not for the better, either. Sorry for the delay - again - we've been informed that there's a fair chance that the sickness that I've had is COVID-19, and if I'm showing signs of it, and Niet lives with me... Well, yeah. I've been spending most of my time in bed and the rest of it waiting until I can sleep next, Niet on the other hand seems to be relatively fine aside from a slight sore throat... The lucky git. c': So that aside, let's get in to it - Q: Will the scouring tournament scoring and scour daily task criteria be adjusted as a result of these changes? How so? A: So, just for reference, all this boils down to is that you can send "a scour" out and it can basically 'self-repeat' up to 12 times (so, for 12 hours, max). This isn't a 12-hour scour. This is 12 individual scour missions - the only change here is that you don't have to come back every hour to pick them up and send them back out, you only need to come back after 12 hours - the drawback here is that yeah... That's a long time. They're gonna need to rest ^^ As this is a 'buff' that everyone gets access to, there's no need to change any numbers - the daily task criteria is literally just "send a scour out". I don't think "1" needs lowering xP That said, we are looking at the tournament scour goal because we're wondering if we even want to keep it in or not. We'll likely have an answer on that front in a day or two so it will be included in Niet's next update regarding it - or perhaps in the changelog, depending.
Q: Could there be hotkeys for releasing Pokémon? A: There could be, certainly - are we going to do it? At this time, no. While it's not a 'ridiculously high' number or anything like that, we still consider the number of accidental releases to be too high. Until we can figure out a way to do something like this that wouldn't result in *more* accidental releases, we're not willing to do it. So, in short - it's in the cards, the card just isn't being played yet.
Q: (Re-worded from last time due to my misunderstanding - sorry pixelkitty!) Will the Ultra beast quest be more streamlined / less painful / less expensive? A: I am going to assume that you mean on the reboot as you did mention seeing the idea of this in one of the reboot threads - please do correct me if I'm wrong (and I'll answer in the thread instead if it's related to PFQ itself xD). I can't really talk about late game things when we haven't really touched on the early game, but taking from your question I can definitely say this - we have made mistakes with PFQ and we openly acknowledge this, sadly, some of those things are things that can't change now, so they serve as fairly harsh lessons learned for us. We will be taking those lessons and will be aiming to do better. This should result in things being more streamlined / less painful etc.
Q: Could Meltan's evolution requirement be the same as the Zygarge cell collecting or Totem sticker collecting? A: To break this down, the question is effectively can an evolution be the same as a forme change. Sadly, the answer to that is no, that will not be possible / the case.
Q: Will it be possible to keep area for preferences for Pokémon already in existence? A: That would be a no, if this is indeed how we move forward with this, as that code would be removed. While that is / was the plan, do note that plans are always subject to change based on player feedback - and we have seen player feedback on that front. Nothing's set in stone or necessarily will or won't be done as of yet and it is still being worked on :)
Q: How will this timer function for the new scours? A: Honestly, there was a little bit of 'back to the drawing board' on that front because maybe a player wants to send out a tired Pokémon (see Cramorant) - there could be certain items that a player would have a higher chance of getting if the Pokémon was tired, for instance. It will be a binary thing, it either will be tired or won't be, but details on that are still being figured out. As we figure things out, we'll let you know more.
Q: With scour revamps, can chances for things be changed? A: Certainly. We have more planned aside from the functionality of it for the player, but we'll get to that once we're done here. Step by step :)
Q: How long will scours be down for maintenance? A: Magic eight-ball reads: "Ask Again Later". So, I actually went to a magic eight-ball website and genuinely got this from it and... Well, it's the correct answer. I'm mildly upset at this. We'll know more later and can hopefully make a better educated guess at the downtime for scours.
Q: With plans changed, has there been any thought to some of the Fakemon from PF1 that haven't made it over (yet, at least)? A: Yes - and no. To put it simply, some things haven't been brought over for quality reasons (as in they would need re-designing) and some haven't been brought over for what amounts to 'legal reasons' - sadly it boils down to the same reason we don't take designs from people anymore, without signed paperwork there's no reason they can't tell us to 'take it down' and since we've no proof, we have to oblige. At that point, it's not us being punished, but the users.
Q: How will Cramorant be affected by the new to-be scouring system? A: As above, I mentioend the tiredness functionality. Just send it out when it's tired :D So, same as now, just not percentage - only binary. If it's tired, hey presto! c:

Not much to say aside from what's already been said. I'm coughing up a storm over here and I've got medication to help me keep everything in check. Well - 'medication'. It's just cough medicine to ease my throat, doesn't really help with everything else but it's the coughing that's the worst for me right now so, eh. Maybe I'm being a bit too nonchalant about it but I seem to be overall okay. If things get worse then I know what I need to do so it's all good. I'm gonna go curl up in bed now. Niet'll post in a wee bit, he's just poking away at some stuff and I honestly don't want to hang around at this moment xD I hope you're all having lovely days and taking care of yourselves <3
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
It me. I'm okay. For now. Yay. Time for a quick update: If you opted out of providing your date of birth on signup, then your join date will be used as your "anniversary" for the purpose of birthday rewards. This will apply from your first anniversary onwards, and you get the same birthday rewards. It's just celebrating the anniversary of your account, rather than that of your birth!
I'm gonna talk a bit more about the Scour update, since it's still being planned out. I kinda coded myself into a corner with Cramorant, but that's okay! Plans evolve and adapt, and this has become an opportunity for improvement. As Garth mentioned, tiredness will still be a thing, sort of. Rather than being a vague percentage (that honestly has been buggy since Scouring was first added to PFQ...) it will be a simple yes/no status. A Pokémon that is well-rested will have better chances of finding rarer stuff. But here's a key thing to remember: you don't always want to find rarer stuff. I remember when we had an event that required a certain item from the Scour Areas, everyone was working very hard to max out all of the scour bonuses! But they were actually hurting their chances of finding the specific item they needed, because it was classed as a more common item. Increasing your chances of finding rare stuff means less chances of more common things! Quick tip: if you want to specifically find an item that's classed as "common", sending a Pokémon to a disliked area may yield better results for you. Hopefully, this will be made clearer with an actual loot table. To that end, I will be simplifying a lot of the systems that go into Scouring. This should also make it more obvious what Uzumi's Bonus does for your scour results. I'll try to give a summary here and hope it makes sense! There are different "tiers" of results. Those tiers start from "nothing", and include "berries", "credits" and so on for each group of items. The exact percentages for these "tiers" is what varies depending on many factors, including Scour Boosts, preferred area and so on. Within each tier, every item has an equal chance of appearing - although this may change in future updates, to allow for things like variety in what Scour Areas yield which items (for example, Fire Stones may appear more often in the Volcano than the Ocean). Uzumi's Bonus grants a percentage chance that the tier of item you find is actually one tier higher. So for a 20% Uzumi Bonus, if your Pokémon would have found Nothing, it has a 20% chance of instead finding Berries. That's how that boost works. Of course if your Pokémon already found a Box, then Uzumi's Bonus doesn't have anything to boost it to so it won't apply in that case.
It's a small dev log post from me today. Most of my attention has been on more back-end things, trying to find out what's still causing lag and eliminating it. It's slow progress but still progress. Thank you for your patience. Dev Log Discussion
Clip from Pokémon anime, re-lined by me
-- OMNOMNOM!
Featured story: Injustice Feedback welcome!
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
Very quick and minor update: Pokémon that have had their Egg Groups updated in Generation 8, have now been updated here. Trapinch, Ralts, Hawlucha, Bergmite, Noibat and their evolutionary families have been updated.
Sadly, there's been a lot of background work that's been going on so not much in the way for Niet to really say, however - he's found a topic that he wants to talk about that's somewhat relevant so we can do a thing~ Q: Does the 48 hour cooldown for a particular Pokémon kick off after 'using up' 12 scour missions? A: Here's the beauty of putting forward ideas you're presently working on - such questions bring forward new ways of working things. I brought this up to Niet and he found that to be a bit off, because there was, at the time, no in-between. And that's silly. So to allow for said in-between, he figured if we're to keep the 48 hours as the total, then you send the Pokémon out for 12 and then let it rest for 36. So a single '1-hour scour' = 3 hours rest, totalling 4 hours. This is also a bit of a buff to the original concept since a 12-hour scour would no longer need 48 hours to be waited, but 36 instead. The idea is that you *will* be able to send out tired scours, by the by - and in some cases, you may actually want to do that. Say if you're looking for certain items in the 'lower tiers', as an example.
Q: What 'tiers' of scour loot are there - order, which item for which tier etc. A: I can't really go through everything because I would have to provide you with a loot table to answer such questions which... I don't think is the best idea in this post. With it changing to be a *proper* loot table as well, it would be a bit pointless in the long-run. What I can tell you with ease is that the current 'loot table' is a bit on the nebulous side which actually makes answering such things kind of awkward. For instance, accessories are kind of separated by scour areas - but evolutionary items are not. Effectively what we're doing is making it more uniform and so that it makes sense - we'll also, as mentioned, be providing players with the loot table, so that they can make decisions on what they want rather than sending scours out into the present fog of uncertainty and just kind of getting 'whatever'.
Q: How long will this take, do you think? Curious as to how long I have to do things like Totem collection. A: Well, for the reason provided, it doesn't matter! Not only is that not changing but, fun little tidbit - Totem sticker collection is, oddly, not affected by tiredness. I said we'd made weird decisions in the past, I think? Well, if I didn't, I'm saying it now. Either way, I do hope that information is useful! That aside, to answer the meat of the question, Niet says that he thinks it should be prepared by the end of the month. Might be sooner, might be later. That's not a hard deadline. It really depends on how things go. If there are certain breakthroughs or hold-ups then we'll say something o7
Q: Is the current COVID-19 pandemic going to affect the site? A: Generally speaking, no. In theory, as far as where we work from and such, it's not changed at all. That doesn't change people on-staff getting sick, however. As mentioned, we think that I was sick with it (/ still am? Either way, I am feeling a *lot* better, I'll mention a bit about that later) and that I was basically cautioned to be prepared to contact emergency services if I developed respiratory issues. So, with me it was a case of 'maybe'. I know that, at minimum, one of our staff members certainly do have it, tests have been done and they confirmed it. This obviously changes whether or not they can do things and does alter the amount that ultimately gets done.
Q: Can receiving 'nothing' be removed from scour returns? A: Yes. I'll explain why it is there to begin with to add a bit more meat to this sad bone of an answer. So, the thing with scours is that they are, by design, a printing press. This is free money (for the most part), the only cost being "time", which... Isn't very much. So, to balance this out the rewards have to be scaled appropriately so you don't wind up with the amulet coin spinning wheel from PF1 which was so broken beyond belief. Interestingly "nothing" is a part of that balance. For other larger budget MMO games, I've often come across mechanics of upgrading that not only have a chance to fail, but a chance to lower the upgrade-level of the item. While it is frustrating, there is a reason that these mechanics exist. Now that said, "should it be removed" - that's a slightly different question to "can it be"... But we're going to steer towards "yes", so long as it's understood that this isn't necessarily going to be going towards anything big.
Q: Can an 'action' option be made for the trainers? A: Do you mean re-posing the trainer sprite? That would mean literally redoing everything, so over time... Like if our artists have nothing else to work on, yeah, maybe! If you mean an animation, that would be a "no" - sorry!
Q: How long do you think scours will be down for maintenance? A: Should be no more than a couple of days - just enough to make sure that everything is working. Of course, any issues will lengthen this time and any 'everything going fine' will speed the time up.
Q: How will scour results appear? A: We haven't got to the user interface side of things yet so we couldn't tell you. That's something that'll be mentioned when Niet gets around to designing that element of the upcoming change.
Q: Would you replace Ravyne from the bonus counters? Since Blank Banshee appears to have a new sona, it seems a bit weird to be the only one not linking to a user! A: Bit off-topic but hey fair xD While it is admittedly a bit odd, the circumstances around 'Ravyne' as a character were... Interesting. However, 'Ravyne' is no longer a person on the site and only exists as that character. I asked how best to explain the situation to Blank Banshee and he told me this: "Ravyne was given as a character to Pokéfarm to use as they see fit" I don't think I can explain it any better than that, honestly.

So I said I'd quickly touch on me feeling better and such. I'll keep it short - I'm coughing a lot less and when I do it no longer shakes my entire body (best way I can explain it, it really hurt x: ), I have my voice back, my sense of humour is still trash and that's about it, really. The odd headache here and there and I'm a tad fever-ish but it's nothing particularly debilitating. Nothing else to really say aside from I hope everyone is well and staying safe <3 That said, I'll pass you on to Niet and go open up DLD#6~
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
Most of my work recently has been on back-end stuff, nothing particularly visible but essential to ensure the site keeps running smoothly. So I don't have anything new and shiny and exciting to share today, but instead I want to talk about how we handle something: passwords. Passwords are, obviously, very important. They keep your entire account safe, so it's essential that we keep them secure. We store passwords as "hashes" - the basic idea is that the code takes what you type in, and mangles the data in some way such that it's absolutely impossible to get it back. When you then go to log in, it takes the password you entered, mangles it in the same way, and checks to see if it gets the same result. To give an extremely simplistic example, let's say your "password" is two numbers: 4 and 6, and the "hashing" is just adding the numbers together, in this case 10. The server saves "10" in the database, but has no idea what your password actually is. When you then log in with 4 and 6, it does the same thing and gets the same result, so it lets you in. But if you just have the result of "10", you have absolutely no way of knowing what numbers went into that. Was it 3+7? 1+9? -123+133? Who knows! Now that's not the best example because you could just give 3+7 and the server would let you in because it still gets the result of 10. But in the real setup the calculations are much much more complicated than that and finding a different input that produces the specific output (called a "collision attack") is basically impossible. All of this is to say that, the only way to get into your account is to actually have your password. If it's sufficiently strong of a password, it's perfect. Unfortunately, people are bad at picking passwords - myself included! There are still many people that use the password "password" or "12345" (and if I've just said your password here, go change it...) and a lot of people use passwords that can be guessed, or use the same password on multiple sites. That last one is particularly dangerous. If just one of those sites gets compromised - if just one of them leaks your login information due to a security problem - then every single site you use those login details for is at risk. There's a website you can use to check for this: https://haveibeenpwned.com/ is a site that collects every single known data breach, and allows you to search for your email address to see if your data has been leaked anywhere. If your email shows up in that list, and you use the same password there as in other places, then you're at risk and should change your passwords immediately. As for making stronger passwords, I would strongly recommend a Password Manager. Most browsers have one built-in now, so you don't even need to download/install extensions. Personally, I use Chrome's password manager, which lets you right-click any password input and select "Use suggested password". This password is then saved to your Google account so you can use it on any device you're signed in to - be it your PC, phone, etc.. This means that not even I know my own passwords! Tough to get any more secure than that. Of course this system isn't perfect. If you want to log in at a friend's house, you'd need to fiddle around a bit. In my case I'd have to get my phone, go into the password list, display the password and type it in. But that's the cost of good security! It's definitely worth the extra effort to ensure that my accounts are safe. Oh and one more thing: absolutely positively never ever tell anyone your password. Not even your closest friend. If they have your password, they can do anything they want and it will look like you did it - and we would hold you responsible as the account owner. Whatever convenience you think you're getting by letting your friend log in for you ("Can you check my Scours for me?" would be one example), it's not worth destroying your security for. Please don't do it. Hopefully this post helps some of you improve your online security and help prevent future issues that could happen due to weak passwords or bad security practices. Stay safe! Dev Log Discussion
We're back again with work underway but not much to really say about it right now, so Niet's going to talk about the mindset of a programmer - the idea being helping others to see the progress of 'fixing' a problem that might occur for him. Perhaps it'll be a bit insightful and maybe even helpful to some, who knows. But it's better than silence ^^' As always, I'll be answering questions posed in the last Dev Log Discussion thread - Q: Are there any other layers of security that you're considering implementing? A: Yes and no. We've considered a lot of things due to recent ongoings. I'll actually cover a couple juts so you can see where our issues lie - Let's start with the basics, two-factor authentication. On paper, looks good. Relatively secure. Requires personal information - something we avoid collecting. So if we do this, we have to go back on that which at this point is very impractical. 2FA also typically requires a third-party to be involved, for example, to send a text message for the verification. Again, something we can't really do. E-mail verification! So, I'll be candid. If someone's password isn't good enough here, then typically speaking, that person's not going to have a good enough password elsewhere either. Including on their e-mail. Obviously this isn't a fair global generalisation, myself as an example - I care about my email so I give it a stronger password but when I register for a game that I think I won't care about (and typically don't) then I use a very weak password that is not the same as anything else that I do care about. So, you know, not 100% an accurate statement, but still. On that note, I want to tell you this - from my time working as a Webhost Technician and Niet's time working as the guy who literally makes the Webhost's staff have the tools that they need to do their job... E-mail has no inherent security. It's just a plain text file on a server. E-mails can be intercepted from the point of being sent and this can lead to things such as tricking people who are doing wire transfers and having them send the money to a completely different account. This isn't a fault of anyone involved in terms of their account security - this is just a result of e-mail being e-mail. Frankly. It sucks. There was also a suggestion about altering via email of potentially unauthorized access to an account. How do you determine that? And how do you make it accurate enough that you don't just immediately delete the e-mail because "Oh yeah I get these all the time"? Moreover, that is again, a manner of tracking an individual which... We don't want to do. Even the PokéWalker that we have on this site doesn't track you - it just tracks distance travelled. If I may, See GDPR, the reason we didn't have to change anything that we were doing is because we didn't do any of that to begin with and we don't plan on starting now. And we're definitely not sending physical keys. We're not a bank. xD All-in-all we are thinking about the things we can do but things like these aren't really worth it. They also don't stop you leaving yourself logged in and your "FRIENDS" stealing all your stuff. We've lost a lot of hours to that happening and people trying to blame us for their friends' bad behaviour. While I certainly enjoy this part of our job (sarcasm), it's really "friends" that need a slap upside the head.
Q: How come you're giving us this information? A: Two reasons - First, it's just good information to have. It really should be common knowledge given the technological era that we're living in but no one really seems to talk about this? From my perspective, it's what I'd refer to as 'should be common knowledge' (and it is, for me), but it evidently isn't common knowledge to the general public. Sadly, it seems a lot of people don't know the most basic of things when it comes to internet safety, sadly in more ways than one. As people who run a website with a mixture of people joining it, all the way from "young" to "old" and everything in-between, why not put this information out there and hopefully make people safer? If someone already knows this, no skin off their back, and if someone didn't know it then it's good information to pass on :) Secondly, yes. Something happened. I won't go in to too much detail but... We lost a lot of time over it. Using that website which Niet provided ( https://haveibeenpwned.com/ ) we were able to determine that each person affected appeared on this. We entered the e-mail that they signed up with to find this out. We found out who it was and ultimately dealt with them but it was a fair amount of time lost. It wasn't difficult, just time consuming, but something that was worth spending the time on for obvious reasons. This is why we decided to raise awareness in the hopes that if someone does get "pwned" again in the future, their issues lay only on the specific platform that they were pwned on, and it doesn't spread elsewhere.
Q: Regarding the scours update, are the rates changing? A: Broadly speaking, no, but as mentioned previously with us changing the 'nothing' in to at least the smallest of prizes... I guess technically the answer is 'yes'. But... No, the rates are remaining the same overall, if we increase rates so one person gets more things then everyone gets more things, thus making anything that is "rare"... Less rare. And in some cases, worthless. We've got enough of those issues going on as it is ^^'
Q: When the new 'mon drop, could there be a notification in the PokéDex that announces that things have been released? A: I don't know why we would need that when we have a news thread that announces when we release things. Why not just subscribe to the relevant thread? here it is for you :)
Q: Do we know when scours will be down? A: No - we're just going to take them down without saying anything and any Pokémon in scours at the time are going to be secretly sent for genetic testing. :p We'll say something in advance, I promise xD
Q: You mentioned that totem stickers are not affected by tiredness. Are zygarde cells also not affected? A: Same system, so same answer ^^ They are also not affected.
Q: With the new scour system, are you going to be adjusting how tiredness works? A: Yes. It would be a little bit silly not to do that. The current way that tiredness works would not work very well with the new way that Scours are going to work. Everything about it is changing, not just one aspect.

Uh. Not much to really say in terms of what's going on. I'll admit that I find a dark humour in that everyone is now copying what I do on a daily basis but it's apparently called "social distancing" and "self-isolation". Not sure how I feel about that. On a somewhat more vague topic, have you seen that people assume weird things where they have no basis to? Just look at the news for 10 seconds to see an example of this. It's bizarre. Just... Stay safe, everyone. And do try not to join the ranks of 'The Assumers' xD Well, that all outta the way, I guess it's Niet's turn to say something. Unless I keep talking then he'll never get to say an
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
I wanted to do something a little different today. I'd like to talk about the programmer's mindset in general. How a project goes from initial concept to finished result, with all the steps in between. Before anything else, I will say that the Scour update is in progress, it's just taking a fair bit longer than I would have liked due to Scours being one of the very first features to be implemented in PFQ, and hasn't really been touched since. It's an older code, but it checks out. So I am working on it, but it'll be a little longer. Thank you for your patience. Now on to the story! I was playing a game called Opus Magnum. It's a puzzle game in which you "program" autonomous arms with simple instructions to make a complex machine that performs alchemy. Fantastic game, definitely worth playing. Within that game is a mini-game, designed to give you a much-needed break from programming. Programming is an extremely intensive mental activity, and it's very important to take breaks to prevent burn-out, and the mini-game does just that. It's a Mahjong-like game played on a hexagonal board, where you have to match pairs of tiles to remove them. You can only match tiles that are "open", ie. not surrounded by other tiles. There's other quirks too, such as a limited number of wildcards. The Metal tiles must be matched with a generic "base" tile and even then only in strict order. There's also "Life" and "Death" tiles, which must be matched with each other rather than themselves. Finally there's the "Gold" tile, which is always in the centre of the board, matches by itself without a pair, and usually marks the end of the game as you clear the board. The board is always solvable, but the challenge comes in that often you have several choices for which pairs to match, and matching the wrong pair can lead to becoming stuck as there isn't a free tile to match. After playing a few rounds, I wondered if it would be possible to have a program solve it. A program would be able to simulate moves to figure out what would happen. It could work out which moves would lead to success, and which would lead to getting stuck. This sounded cool, so I got to work. The first challenge was figuring out how to represent the board in code! A square grid would have been easy, you can just use simple coordinates for that. But when your grid is a hexagon, there isn't really a convenient coordinate system for that. Each cell would need to be aware of its six neighbors, to determine if they were empty so that it could figure out if it was playable. I decided to represent the board as a list of rows. This meant that instead of being like this:
O O O O O O O O O O O O O O O O O O O
The board would instead be handled like this:
O O O O O O O O O O O O O O O O O O O
This makes it easy enough to determine left/right neighbors, but up-down would be a little trickier. I broke that down further into the top half and bottom half of the board, shifting the X coordinate differently according to which half the code was looking at, and the problem was solved. Each type of tile was then represented by a letter or number. The element tiles would have their initial as their letter. Metals would have the number indicating their position in the order they must be matched. Simple enough. I can now provide the board as input to the program, by writing out the letters of the board in order. So far, so good. Then I had to actually solve the board. When approaching a problem, there are two possible scenarios: - You know how to solve the problem, or - You can break down the problem into smaller problems. In the second case, you can repeat as many times as needed, until all the pieces individually fit the first case. I didn't know how to solve the board, but I instead worked out how to frame it as a problem I could solve. In this case, I made it into a "path-finding" problem. Bit of a sideways leap there, but it makes sense: - The layout of the board is the "point" you're currently at. - The "destination" is an empty board. - Making a match moves you from your current board to a new board. - Winning the game involves finding a set of moves that leads you on a path to the empty board. There are plenty of path-finding algorithms out there, but many of them didn't really work in this case. After all, each step would remove two tiles from the board, so it wasn't really possible to measure "how close to solved" the board is, all moves are equal in that regard. This means all the "fancy" and efficient path-finders wouldn't be able to handle this very well. Instead, I went for a simpler and more naïve algorithm, the Depth-First Search. DFS basically involves picking a path, and charging straight ahead. If it works, great! If it gets stuck, it backs up until it finds another choice, and charges headlong into that new path instead. Repeat over and over until you find the solution (or run out of paths, but the board is always solvable in this game). I set about implementing this, and by sheer luck the board I tested it with presented its solution relatively easily. Unfortunately, after a few boards, I ran one and it seemed to get stuck. Other boards took just seconds to run, but this one was running for several minutes with no result. In the example illustration above, I showed a hexagon of size 3, but the real game uses one of size 6, and there's a total of 53 tiles to be removed. As they're removed in pairs (except the Gold tile), that's 27 moves to win. Sometimes you'll have only one option for a move, but more often than not there'll be several options available to you. Even if we assume there's only 2 moves available at once, that's still 226 paths - that's 67,108,864 options to check, and the real number was much, much higher! Of course the program will stop if it happens on the right solution, but if it keeps taking wrong paths, that can take a very, very long time! Clearly something had to be done. Until this point I hadn't really considered what order to check paths in, it just picked one and went with it, exploring all options. After adding some debugging code so I could see what paths were being taken, I noticed that the program was using a Wildcard very early in the game, which led to it getting stuck when the Wildcard was actually needed, very late into the game. It was trying so hard to get to the solution, but it would need to evaluate billions of game states before it realised, maybe it shouldn't be consuming that Wildcard so early. In this case, the solution was to add a priority system. Before picking a path, it would sort the options based on the move being made. Moves that didn't use a Wildcard would be prioritised over moves that did. This worked well, because most of the time a Wildcard would only actually be needed if you were close to being stuck. This fixed the issue for that board, and it solved in seconds again. This ran happily for a few more boards, and then it got stuck again. Back to debugging, I found that in a rare case, all of the tiles of a particular type were "playable" at the same time. This meant that a total of 28 ("=8 choose 2") moves were available for that tile alone! And as many of them led to similar situations, it was having to check the same boards quite a lot of times. This is because I hadn't implemented any kind of memory of where it had already checked. I had just assumed that different moves would lead to different boards, but this is quite obviously not the case. If you have two moves available, independent of each other, doing A then B would lead to the exact same result as doing B then A. And if "A then B" was already determined to lead to failure, then there would be no point in even trying "B then A" since we already know the outcome. This turned out to be fairly simple to solve, thankfully. Just remember every board that has been checked. Since the program stops when the solution is found, if we ever encounter a board that has been encountered before, then it must be a failure and so we can just skip straight to the next option. This "pruning" was the real time-saver, and after that I had no problems with the program taking too long to solve boards, even after solving hundreds of them.
This is quite typical of the development process. You have a problem, you throw together an attempt to solve it. At some point, it'll start to work, until it doesn't. When it breaks, you figure out why it broke and how to solve it. Eventually, it'll either work perfectly, or it'll work well enough that it either doesn't break, or nobody notices it breaking. Programming can be a very intimidating thing, but if you're interested in getting started, then the best advice I can give is get started. The hardest part of any project is the "figuring out how to start" phase. And the best solution is to just do something, and fix it when it breaks. Eventually you'll go back and make the start better, but so long as it works you're all good.
So that was step one. I had a program that I could tell what the board looked like, and it would tell me what sequence of moves would let me clear it. But I wasn't done. Step two was simple enough. I fed the sequence of moves into another program that would move the mouse and click on the appropriate positions to actually solve the board automatically. Saved me having to do it myself. No issues there. Step three was the real challenge: I wanted to have the program figure out what the board was, without me having to tell it. This was a challenge I wasn't prepared for! But I just applied the process of breaking it down until I could in fact solve it. My first attempt at this was to get the images from the game files, but unfortunately they weren't simple sprites like I had hoped. They were made of various layers to produce a beautiful visual result. So no luck there. My second attempt was to grab a section of the tile from the screenshot, and match it against a "database" of tiles. If it didn't recognise a tile, it would show it to me and I would tell it what it is. The idea being, eventually it wouldn't need to ask any more. This also failed, as it would be asking me for tiles I'd identified several times already. Turns out, the tiles had some subtle variations to make for a beautiful aesthetic. Unfortunately, totally impractical for my attempted solution. Time to break out the big guns. Each tile has a unique symbol in its centre. I reasoned that if I could identify that symbol, I could identify the tile. So step one, Edge Detection. This is an easily solvable problem, after a quick Google! For each pixel of the tile, compare its brightness to the eight surrounding pixels. Recolour the current pixel according to the total difference. This results in a dark grey image, but the symbol in the cell would appear very bright, surrounded by an almost black edge. Then came the challenge of figuring out which symbol had been found. Due to the game using nice graphics, with fancy lighting effects, every symbol matched was subtly different. This is something I had never had to solve before, and I had no idea how to break it down! But Google had my back. The algorithm I wound up using was "Peak Signal-to-Noise Ratio". I don't know what it's for, or how it works, but I did work out how to apply that to an image. Since the image was already grey, it didn't have colours - it had "intensity". This could also be compared to the "amplitude" (strength) of a signal. The "signal" would then be the sequence of pixels. I implemented the maths involved - barely understanding any of it - and ran a test. I had an example of each symbol that I had identified manually, and the code would run this PSNR algorithm against each one. Where the images matched, that would be "Signal", and where they differed, that was "Noise". Peak Signal-to-Noise Ratio, therefore, would be the image that had the most matching and the least difference. And there we go! The reference tile that was the closest match for the tile being examined, was the tile! So I chained the programs together: identify, solve, complete. I set it running, and it ran for hours, solving hundreds of boards, completely automated with no mistakes. That was incredibly satisfying. Seeing the results of my work come together was the best feeling I'd had in quite some time. ... I still don't understand how PSNR works, but it didn't matter. It worked.
I hope you found this interesting to read. If you did, let me know! And if you didn't... also let me know so I know not to do this again :p I just thought it might be interesting to share "the developer mindset" through a thing I did. Dev Log Discussion
Niet's been busy plucking away at the scour updates and other little tidbits, but I'll let him get to talking about that - sadly, things are more complicated than initially thought - and they were already thought to be complicated. x: In any case, I'll run through the questions that were posed in the last DLD~ Q: How will any security updates affect someone who is consistently active day after day? A: I'd wager that upon initial update you may need to log in again but other than that, should be fine - reason for that being, let's assume that someone else is also logged in but just hasn't done anything yet, if we do the update and then allow them to remain logged in, thus bypassing the new update... That doesn't really work! All this other party would have to do is maintain their 'logged in' status and they could do whatever they wanted. Beyond that, it should be business as usual.
Q: If a scour is now approximately 12~ hours, would a not-yet-totemed pokemon simply gather the 5 stickers, and then 7~ items? A: Gathering the stickers is a chance, so there would be 12 chances to gather a sticker - if all 5 are collected then no more beyond that would be picked up and the remaining slots would function as normal.
Q: Any updates on the other project? A: Yes, but I'll leave that to Niet.
Q: Any plans to update / rework S/A/M variants for some of the earlier PokéFarm exclusives? What would the timeline for that look like? A: I guess the best answer I can provide to that is that we could definitely look at it. I can't speak for Sei or anyone else but... Let's presume that the answer is "no" for the sake of argument here - if any were to be pointed out as potentials for needing a new eye on them, so to speak, then I don't see why they wouldn't get looked at! We have an entire page dedicated to looking at sprites with ease (among other things - dw, without any crazy loading shenanigans! :p Well-optimised things are a thing of beauty c': ) so it would literally take a few mouseclicks and a couple keyboard presses to look at any Pokémon or PFQ Exclusive lines that are put forth for consideration :)
Q: Are there plans to fill up/standardize contest decorations/dress-up scores or berry requirements for contest stats that are more limited compared to the others? A: No - if they were all standardised, there would be no difference between any of them aside from the bar you have to fill and the aesthetic of the accessories, effectively. Some are simply more challenging than others, as it stands. This doesn't mean it's out of the question, mind you, there could come a time where we add more accessories that wind up fitting a category that you feel needs more. This will not be a "hardline" for us to follow, though.

I've honestly nothing to really say today, I'm a little disenfranchised with the world at the moment. Things are a real mess. If I were to want to say anything more on that front, I'd probably have to gather my thoughts so they're more coherent. Without getting in to it, in simple terms - BLM. Here's Niet for ya.
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
Today I'm here to talk about how plans... don't tend to go to plan. You may have noticed that we haven't had the big Scour update that I promised. As it happens, it's not nearly as easy as I thought it would be (and I thought it would be quite hard already). As I've been working through the code - slowly, mind you, as it's some of the oldest code on PFQ and has gained tangential features such as Totems/Zygarde and more - I've been finding all sorts of small things that make it actually quite difficult to process multiple Scour missions, or more accurately to retroactively do them. Conditions change. Let's suppose there's an Uzumi bonus day going on, and you send your Pokémon out for 12 hours, but by that time the date has changed and there's no bonus any more. What happens then? It would need some kind of system to remember that there was an Uzumi bonus, how much it was, and how many of the retrieved missions were during that time. And while that's technically possible in most cases, it gets even more complicated if there's two Uzumi bonus days back-to-back. See, the data is only overwritten when a new bonus day starts, so right now Uzumi isn't active but the data shows "active on June 7th with +26% power". That's fine, the system can work with that. But if we had another Uzumi day, it would overwrite that and the data wouldn't be there any more. It wouldn't be possible to retroactively apply it. Now, that's fairly minor, really. All it does is give better chances at rewards. But I've seen how seriously you guys take even the smallest boosts to chances! This is something I know a lot of people will care about. So it needs to be figured out. I'd need to do something to make that work. I don't know what yet but I'll work on it. Similar issues arise when it comes to the Totems or Zygarde. As they gain more Stickers/Cells in an area, the chance gradually decreases (since there are fewer there to find). This would have to be preserved in the process of retrieving missions, to ensure the probabilities work as intended. Then of course there's the matter of the UI side of things. How do I go about displaying up to 12 missions' worth of rewards? If I add a separate system for that, then I'm going to need a separate system for special effects such as forme changes. Oh and forme changes! Cramorant can change with every mission, alternating between formes. How would that work? Would it flip 12 times? I've already got a "solution" planned for how its Gorging forme would work with the new system, but even just changing is more complicated! And what about the special case of Tornadus, Thundurus and Landorus scouring together to try and find a Reveal Glass? How would that one work? It would need to have some way of checking how long they've been going together, so you can't have one going for 12 hours and then just add in the other two at the last minute to get the full opportunity... So that needs more work. As you can see... a seemingly simple promise of "you'll be able to 'bank' Scour Missions and retrieve them all at once, so that you don't have to be online every hour to get them"... It's really much more complicated than I anticipated. So I can only apologise for the delay on this, thank you for your patience, and keep on working at the problem until it's either solved, or I determine that it's really not possible (in which case, there'd be more apologies and a re-plan).
Someone asked if there was any news on the new project, to which the answer is: yes! It's been very helpful to prevent burn-out, as if I hit a wall with one project then I can hop over to the other and make some progress there, then come back to tackle the original problem again. A lot of back-end structure has been established, making code a lot easier to work with. I'm going to give a couple of code samples - I don't expect you to understand it, but I'm trying to illustrate just how much better the new stuff is.

Getting a player's Starter

PFQ

$player = User::getByName("Niet"); $stats = UserStats::get($player->id); $starter = PokemonSpecies::get($stats->starter); echo $starter->name.($starter->formename ? " (".$starter->formename.")" : "");

New version

$player = UserProfile::getByName("Niet"); $starter = $player->starter->species; echo $starter->getFormattedName();
This one is made possible by the fact that much of the data is accessible via "lazy-loaded" properties of game objects. Requesting the "starter" triggers the lookup, so it's only ever loaded if it's actually needed. It also abstracts away the internal data structure with the "getFormattedName()" function, so I don't have to worry about whether or not it has a Forme name.

Check if a player has an item, and consume it if so

PFQ

$player = User::getByName("Niet"); $item = Item::getByName("ThunderStone"); // THIS is why I can't fix the item name! if( $player->getItem($item)) { $player->useItem($item); }

New version

$player = User::getByName("Niet"); $item = Item::get("evolution-stones/thunder-stone"); // It's fixed here :D $inventory = $player->getInventory(); if( $inventory->contains($item)) { $inventory->remove($item); }
This one is more about legibility. PFQ's function names aren't great. "getItem" is used to mean "get how many of an item is owned", and is not to be confused with "receiveItem" which gives the player an item. The new version uses a separate inventory manager system, with less ambiguous functions named "contains", "add" and "remove". It also highlights a problem with PFQ's code, that things are too closely tied to their human-readable names. The new version has a machine-readable ID (that's still programmer-readable) that is independent of the name you get to see. This means items can actually be renamed without breaking everything! The current inventory code includes a database lookup. This is why forum posts with large inventory tables are the first to get hit with "this post took too long to process" when the site gets busy. With the new and improved inventory manager, that data is only loaded once, no matter how many times you then query specific items. This makes it much, much more efficient.

Receive a Custom Sprite event reward

PFQ

$sprite = CustomSprite::get(EventEaster2018::EXEGGCUTE); $species = PokemonSpecies::get($sprite->formeid); $cs = Pokemon::newEgg($species, null, [ "userid" => $user->id, "ot" => $user->id, "stage" => "pokemon", "fieldid" => Field::TRADE, "fieldpos" => null, "location" => "trade", "name" => $sprite->name, "source" => Pokemon::SOURCE_EVENT ]); $user->addToDex($cs); // add manually due to haxy spawn $cs->update("customsprite",$sprite->id); $cs->addTimelineEntry("create", "Pokémon obtained from Easter 2018!"); $cs->addTimelineEntry("obtain", "Pokémon received from Doug by {USER:".$user->id."}");

New version (simulated equivalent)

$sprite = EventEaster2018::getCustomSpriteReward(); $cs = Pokemon::create( $sprite->species, $this->profile, PokemonSource::EVENT, null, [ "stage" => PokemonStage::POKEMON, "custom_sprite" => $sprite, "nickname" => $sprite->name ] );
Here the major improvement is one of hindsight. Originally PFQ's code only ever intended for newly created Pokémon to always be Eggs placed in your Party. There's special code in place to handle if your Party is full (that triggers the "move something to your fields" pop-up). However, it was never intended to receive hatched Pokémon (which is why it's called "newEgg"). It also needs to get created without an owner, and then reassigned to you, because otherwise it will check your Party and find no space - the bypass is needed in order to get into your Collection Area without issues. This then requires the Dex entry to be manually added afterwards, and that in turn requires it not to be a CS yet (because CSes don't typically count towards your Dex entries) so that gets pushed back to afterwards and retconned. It's a real mess and a great example of how PFQ's gradual feature creep has left the code difficult to work with. The new version, on the other hand, can be built with all that knowledge in mind. Pokémon still default to being created as Eggs, but that can be overridden with the "PokemonStage" property. There's a lot less data that needs to be passed, as well, since it can much more intelligently figure out what to do based on what it's given. When I talk about how PFQ's code is difficult to work with and the new version's is better, this is the kind of thing I mean.
So that's all very interesting (I hope!) but I'm sure you're also interested in some front-end stuff. Things you can actually see. To that end, here's a comparison of the screenshot I shared way back when this project was first announced, and how it looks now. (Click to open fullsize)
  • Old
  • Current
One thing you might notice right away is that it says "Party" but that looks suspiciously like a profile page... That's because I've deleted the Party page. I've noticed that most users never actually look at their Party page, always going to their Profile instead. And really, it made no sense to have two separate pages to do basically the same thing. So now the "Party page" is your Profile, just that the big portrait is replaced with your Quest list. Some more minor adjustments include the re-addition of brown to the colour scheme, and buttons now respond to skin colours. The NavBar has also been reworked to have bigger buttons, with text labels clearly visible, which is much nicer to use - especially on desktop as things were looking very empty up there. As far as mechanics-based changes go, interacting with Pokémon is now done via a "Pet" button rather than feeding magical berries that appear out of nowhere from an infinite source. Separately, you will be able to feed berries to your Pokémon to gain a small amount of EXP outside of the interaction system, for when you need to boost it yourself - maybe to reach a high evolution level target, or for quicker levelling in general. This feeding will use berries from your inventory as Consumables, giving much more value to them and the Berry Garden feature. And what about that new button? What does it say? "Pet/Hold All". That's right. There's a button that lets you interact with the entire party in a single click. It is slower than you might be able to do manually, but the effort involved is much less. Just click the button, wait for the progress bar to fill, and done! I hope you like what you see here. While I won't really be taking suggestions at this early stage, I'm happy to answer questions on the project. Dev Log Discussion
So today I have a little something to talk about! Niet has his bit, too, but for a change, I get to talk a little bit about something :p That being... Streaming for the site. Now, it hasn't been done in some time and is new for some people, but it's not new for us. We used to do it more often in the past and when we moved houses (yes, multiple), things changed and admittedly we just never wound up getting back to it. Around November / December last year, I mentioned that streaming isn't limited to just me doing it, and if anyone else wanted to, they're welcome to stream and interact with the community. That stuck for a bit but - well, that was 7+ months ago. And honestly, I figured I probably should get back to it a little bit. I used to do it once a week and with things as they are right now, I could do that again if I wanted - but... I also want to leave the door open for others. So, the first stream that we did was one that I knew our own Novie had been wanting to do for some time now. And I know there are others interested in doing some streaming, too (meaning staff members). She did some spritework, showing off some revamps that are being planned and some "doodles" ( yeah, right, Novie. doodles. Sure. Mhm. A finished art piece is now a "doodle" :squint: :P ) and all in all, a fun time was had. I was very tired and actually dozed off in my chair by the end of things. Niet had to wake me up c': Basically, what I'm saying is that there is the intention of these streams happening more often, and it'll be different hosts. I won't necessarily always be there but I'm always available if any of the streamers would like a hand. This may raise a concern for people who aren't interested in the streams - which is fair enough, it was voiced in the thread and I have been thinking about this since we're starting these things up again. So... While talking this through with Niet, we came to the idea of an "opt out" sort of thread-system, specifically for the "News"-section. If you don't want to see updates on a topic, or you don't want to see that little flashy? Simply opt out! At current time the idea is that it will be under "Thread commands" since that is the appropriate place to put such an option, but this will apply for all News threads. If something doesn't interest you then you can basically tell the site you don't wanna hear about it. This will not be available immediately however, but is actively being worked on and should be available within the next couple of weeks. All that said, time to move on to the questions -- Q:Does the Uzumi bonus apply on the day the scour is retrieved? A: Yes - that's actually the exact problem that Niet was talking about in his last post! :D
Q: Would the scour daily task change per the discussion on scours changing? A: Yes, as the base thing changes, so too should things relating to it. Otherwise it just falls completely out of balance. That said, that won't be happening but I'm going to let Niet explain that one since that's his bag of tricks.
Q: How many berries could we feed a Pokémon from our inventories? A: How many do you have? 9,728, you say? Well... That many. Do it. Feed that Pokémon. You monster. Silliness aside, you can just feed them all of them if you wanted (as the dumb joke implies). I wouldn't recommend it, though - you need at least one to be able to re-plant the berries, after all!
Q: Are all Berries going to be consumables? A: Yes.
Q: Are the four berry tabs being combined in to one or are they remaining separate? A: Garthic: [relays the question to get an answer] Niet: "Iunno." Garthic: "...But you're the developer!" Niet: "Yeah, I haven't decided yet." Please help me fight him.
Q: As Berry and Nature preferences aren't going to be visible on the party page, where is that information going to be instead? A: As it is no longer particularly pertinent information, it will be visible where it's important. That being the summary of the Pokémon itself and your Fields. This would also apply to any other feature where this information would be important - for example, if we decided to make Nature effect scouring somehow then it would definitely be shown when you pick a Scour Pokémon. c:
Q: Does the "click all" button function like the "harvest all" in that it's easier, but slower? A: Yes. Uh, don't really know what else to say to this xD That's exactly how it works.
Q: Is there a way to keep the "scour for 1 hour" with the scour changes? A: (As before, scours aren't changing - see Niet's post after this for more info). I'll be honest, I don't know why you think that option was slated to be lost. The plan wasn't that it was being removed xD Nobody ever said that c:

I've already sorta talked about what I would've wanted to. I guess I'll just sorta say that the stream was really enjoyable and everyone was lovely. Thank you to everyone who stopped by, even if just for a minute. I just want to take a second to also appreciate everyone who spoke and interacted with us - the artwork that people made was so heartwarming and amazing. Thank you all <3 That said, I'm going to let Niet do this thing o/

Pages: 1234

Cannot post: Please log in to post

© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page