Friday, October 20, 2017

Everything Wrong With Nancy Drew: Danger by Design

I'm now taking suggestions for "Everything Wrong With Nancy Drew: Danger by Design"! Leave a comment if you've got some good ideas!

I'm going to leave this up as my newest blog post over the weekend, just to make sure people don't miss it.

Thursday, October 19, 2017

Star Wars: Rogue One

My wife and I got to see Star Wars: Rogue One recently. I thought it was okay, but my wife disliked it. She thought the casting and the story was off. I didn't like casting for the male lead, but I think the rest of the casting was fine.

I haven't seen the original trilogy since I was, uh...seven? The movie was more or less a big homage to the original trilogy, and it ends about ten seconds before the original trilogy begins. I'm thinking a fair amount of material went over my head, simply because I don't know the original trilogy.

I'm more familiar with the prequel films, which came out when I was in high school. I distinctly remember that the bad guys had the plans for the Death Star in Episode 2: Attack of the Clones. That, um...kind of contradicts the premise of this movie. Doesn't it? Like, the bad guys had the plans for this thing finished, a long time ago. Maybe that was just a prototype, and not finished plans.

The ending to the movie was rather sad. All of the interesting, new characters had to die, in order to preserve the series' continuity.

Wednesday, October 18, 2017

Timed Strategy Game (Part 4)

I'm probably not going to even try to program a timed strategy game for months, but I might as well keep figuring it out, while I'm on a roll!

Most of the games has a library or knowledge center. These provide stat boosts, general in groups of 1%. So, you can increase farm production by 1%. You can increase maximum farm capacity by 1%. You can decrease the amount of time it takes to build a farm, by 1%. That seems good to me. Decrease the time and resources needed to build a place, or increase production.

Since knowledge centers are so useful, I'm going to have them relatively expensive to build. Let's have it be "80% of the maximum resource cap, if you have four buildings", to build a knowledge center. To get a particular piece of knowledge...I don't know what'd be reasonable. Normally, the knowledge center runs off a fifth resource tile, a type of currency which only gets spent in the knowledge center. But that's usually paired with training grounds and infirmaries, which I won't have in the game...

Maybe I'll just be mean, and have the knowledge center require something outrageous like six times what a normal building makes. You want to increase farm production by 1%? Great, give me the cap of six full farms. With non-resource tiles, it can cost three times what it normally does.

To prevent it from being TOO unfair, you'll be allowed to deposit resources and such into the knowledge center, even if you don't have enough to purchase a knowledge upgrade. So you can slowly get enough to purchase upgrades.

I'm going to stop here, because this sounds like a good enough framework for this sort of game. I've only got two more ideas for possible features. They're both

1. A store. You buy equipment for your hero and such. A piece of equipment basically has the same effect as a knowledge upgrade.
2. An army. Yeah, I don't like the idea of building an army to fight other players. But what if it's to fight monsters and stuff? That could be better.

Tuesday, October 17, 2017

Timed Strategy Game (Part 3)

In addition to resources, there's usually a home base or a palace that you have to upgrade. The palace can never be deconstructed, and you can never build anything to a level that's higher than your palace's level. So if you want level 2 buildings, you need a level 2 palace. If you want level 3 buildings, you want a level 3 palace.

There are also walls around the camp, which fill the same purpose. Basically, when you finish upgrading all your resource tiles, you upgrade the walls and the palace to advance to the next level. There's normally a whole host of other things you need to keep up, but maybe I'll keep it simple with just the palace and the walls.

The walls and palace require a lot of resources to build, and I can't see the pattern here, besides "palace requires way more than walls do". Let's go with "walls = 50% of the maximum resource cap, if you have four buildings" and "palace = 90% of the maximum resource cap, if you have four buildings". The resource cap is four times a building per hour, so that's times 8 for a wall, and times 14.4 for a palace.

How long should it take to make them? If I average out the times of all four buildings, it's 37.5 seconds. Palaces are a big deal, so let's say a palace is twice that, or 75 seconds. Let's say walls takes 50 seconds, or 2/3 of a palace. Their time can both increase by 30% each level, the same rate that normal building times increase at.

There's normally an army building aspect to the game, which involves training five types of troop so they can get resources and fight other players, but I don't like that aspect of those games, so I'm not gonna include one. That is, um...like, half the game. You can get equipment for your hero, but your hero is only good for quests.

Monday, October 16, 2017

Timed Strategy Game (Part 2)

Continuing from yesterday, the guide I had doesn't say how much each building produces, so let's skip over to a Mobile Strike guide. It starts at 50 per hour, and goes up by 50 each level, until you reach 1000, at which point, you have to be super-invested in the game, because it takes a week to build anything. Yeesh.

Math is difficult, so I'm going to go with 60 per hour, which works out to 1 per minute. I guess it's easy and makes sense, if that increases by 60 every level. So a level 1 farm makes 1 crop per minute, a level 2 farm makes 2 crops per minute, a level 3 farm makes 3 crops per minute, and so on.

Timed strategy games generally have a cap on how many resources can be created. I guess the idea is to prevent people from, say, turning off the game for a week, then logging into have a giant amount of resources. Since I'm thinking of having 15 resource tiles, I'm going to go with a cap of "the amount a building makes per hour, times four". Once a building hits its cap, it stops producing resources.

To demolish a building, it's usually the time you took to make the building, divided by two. That works fine on lower levels, but not so much on higher levels. I don't want to penalize players for redoing their layouts, so I think I'll make building demolition something like 30 seconds.

I have no idea if these numbers make the game too hard or too easy. They obviously make the game easier than their freemium counterparts, and I'd rather have the game be too easy than too difficult! I feel like Level 20 is a good ending point, so that can be where the game ends.

Sunday, October 15, 2017

Timed Strategy Game (Part 1)

I talked about doing a game like Mobile Strike a while ago. Paul says it IS possible to do a timer in Ren'py, so theoretically, it's possible to program a game like that!

The good news is that all the in-game statistics are available online. That website is for Vikings: War of Clans instead of Mobile Strike, but same basic game. How can I adapt the way their game works?

There four resource buildings (Farm, Lumber Mill, Mine, Stone Quarry) that you can build, on 25 squares. I kinda like that setup, because if it was 24, people would build six types of each building and stop there. 25 changes the strategy a bit. For my game...let's go with 15. Four types of buildings, fifteen spots you can put them.

The building cost appears the same for each building. That is, Level 1 requires 50 resources from each of the other three buildings. Level 2 is 85, level 3 is 145, then 250, 420, 840, 1700, 3400, 6750, 10500. Looks like sometimes it doubles, but not all the time. Doing math, it's generally in the 40% to 50% range that it increases. (That is, you take the previous level and divide by 0.4 or 0.5). My game isn't going to be a freemium game, so let's make it easier. Let's go with a 20% increase with each level.

The time it takes to create a building is much longer. Level 1 is one minute, Level 2 is two minutes, level 3 is 4, 8, 20, 35, 90, 150, 270 and 540. 8 to 20 and 35 to 90? That's way more than doubling! It eventually reaches the point where it takes more than 12 hours to upgrade a single building. Again, my game isn't going to be freemium, so let's go with a more reasonable 30% increase.

The amount of time differs by ten seconds, depending on which building you're making. Huh. I never noticed that. That's kind of neat! So let's say Building 1 starts with 30 seconds, building 2 with 35, building 3 with 40 and building 4 with 45.

Saturday, October 14, 2017

Scheduling

I'm trying to spend an hour each day, working on the Mermaid Game. The plan is to write the entire game, then program it, and then do all the artwork and stuff.

The problem is that I don't have a lot of free time. Basically, I can only work when the baby is asleep. And I've sort of got other work to do, during those times. Housework is the number one priority, but I've also got my YouTube channel, a ton of books to read, and translating stuff from Latin, or else I'll totally forget the language. And there's this blog, obviously.

Last week, I tried making myself a to-do list, and it was not super successful. There were three days when I did no work at all on the Mermaid Game. But hey, I finally edited and uploaded all the Phoenix Wright 6 videos! I just gotta watch them all and come up with titles and descriptions. There are 83 videos for Case 5, by the way. It's a long case.

This next week, I'm going to try a different schedule. Like, Monday is house cleaning and game writing. Tuesday is YouTube recording and game writing. You know, a schedule like that. I'm pretty sure the house cleaning will get out of control and throw off my schedule, but maybe it'll work.

Friday, October 13, 2017

Ren'Py Character Name Generator

I'm writing a mermaid game in Ren'py. I thought it'd be neat, if people got to pick the mermaid's name from a randomly generated list. I asked people on Twitter for good mermaid names, and I got twelve names that I liked for the main character.

Programming the name generator was a nightmare. It took at least an hour. I'm going to post my programming here, just in case someone else is going to try something similar. This should save them a lot of headache!

My comments are in #s. For the sake of this example, the player can pick one of two options, which are taken from a list of four possible names.

---

#First, I assign a random number, from 1 to 4, to each name option.

$ Heroine_name_option_1 = renpy.random.randint(1, 4)
$ Heroine_name_option_2 = renpy.random.randint(1, 4)

#Then, I check to make sure they don't match. If they do, the game goes through the randomizer again.

label Heroine_name_randomizer_check:
if Heroine_name_option_1 == Heroine_name_option_2:
$ Heroine_name_option_2 = renpy.random.randint(1, 4)
jump Heroine_name_randomizer_check

#Both options now have a different number.
#Now I change each number into a specific name. 1 is Nancy, 2 is Bess, 3 is George, 4 is Deirdre.
#I had to do it this way, because the in-game randomizer only works with numbers.

if Heroine_name_option_1 == 1:
$ Heroine_name_option_1 = "Nancy Drew"
if Heroine_name_option_1 == 2:
$ Heroine_name_option_1 = "Bess Marvin"
if Heroine_name_option_1 == 3:
$ Heroine_name_option_1 = "George Fayne"
if Heroine_name_option_1 == 4:
$ Heroine_name_option_1 = "Deirdre Shannon"
if Heroine_name_option_2 == 1:
$ Heroine_name_option_2 = "Nancy Drew"
if Heroine_name_option_2 == 2:
$ Heroine_name_option_2 = "Bess Marvin"
if Heroine_name_option_2 == 3:
$ Heroine_name_option_2 = "George Fayne"
if Heroine_name_option_2 == 4:
$ Heroine_name_option_2 = "Deirdre Shannon"

#Now the player can pick one of the two options.

menu:
"What is the character's name?"
"[Heroine_name_option_1]":
"Now your name is [Heroine_name_option_1]
jump next_scene
"[Heroine_name_option_2]":
"Now your name is [Heroine_name_option_2]
jump next_scene

#But wait! There's no way for you to know whether the player will pick option 1 or 2.
#My first instinct was to make both variables the same, and just use one of them. You know, "if player selections [Heroine_name_option_1], then [Heroine_name_option_2] becomes the same as [Heroine_name_option_1]"
#But there doesn't seem to be a function for "Change [Variable 1] to equal [Variable 2]".
#I could do it, by changing the names back into numbers. Set one of them to one, and a do a simple loop of "Do they match? If no, add one. Repeat until they do match". Then change from numbers back to names again. But that's kind of tedious.
#So I just added a third variable, [Heroine], which will equal [Heroine_name_option_1] or [Heroine_name_option_2], whichever one the player picks.
#But again, there doesn't seem to be a function for "Change [Variable 1] to equal [Variable 2]". So I was forced to write out all the possible answers, when making [Heroine] the default name, no matter which option the player chooses.

menu:
"What is the character's name?"
"[Heroine_name_option_1]":
if Heroine_name_option_1 == "Nancy Drew":
$ Heroine = "Nancy Drew"
if Heroine_name_option_1 == "Bess Marvin":
$ Heroine = "Bess Marvin"
if Heroine_name_option_1 == "George Fayne":
$ Heroine = "George Fayne"
if Heroine_name_option_1 == "Deirdre Shannon":
$ Heroine = "Deirdre Shannon"
jump next_scene
"[Heroine_name_option_2]":
if Heroine_name_option_2 == "Nancy Drew":
$ Heroine = "Nancy Drew"
if Heroine_name_option_2 == "Bess Marvin":
$ Heroine = "Bess Marvin"
if Heroine_name_option_2 == "Pearl":
$ Heroine = "Pearl"
if Heroine_name_option_2 == "Angel":
$ Heroine = "Angel"
if Heroine_name_option_2 == "Deirdre Shannon":
$ Heroine = "Deirdre Shannon"
jump next_scene

#From now on, I use [Heroine] in the script. The program replaces it with the name the player chose.

Thursday, October 12, 2017

Tax Reform (Part 3 of 3)

The new tax reform plan says it will get rid of personal and dependency exemptions, which are on lines 6 and 42 of the tax form 1040. This will be replaced with a larger standard deduction.

So what does that mean, in simple terms?

On the tax form now, you have to figure out how much money you made this year. Then you take away $6,300 for yourself, and an additional $6,300 for your spouse, if you have one. That's called the "standard deduction".

Then, you get to take away $4,050 for every person who lived with you that year and whose expenses you paid for. For most people, this means their spouse, their children, sometimes roommates or live-in relatives. When you take off money for someone who lived with you, it's called an "exemption".

Please note, I'm oversimplifying here; the rules for exemptions can get really complicated, really quickly, if you go into non-relatives, children of divorced parents who share custody, and college kids whose parents pay the majority of their expenses.

To summarize, you figure out how much you made that year. You subtract the standard deduction, then you subtract the exemptions. What's left over is the amount of money you pay taxes on.

Well, subtracting two different things is unnecessarily complicated, so they're gonna combine the standard deduction and exemptions. Instead of doing them separately, you'll just subtract $12,000 for yourself and $12,000 for your spouse. That's it.

I think this is a great plan, just because exemptions are complicated, especially when two different people claim the same child; that almost always leads to a huge, emotionally charged mess. I'm glad they're doing something to improve exemptions, even if that something is "get rid of them entirely". There are other

I did the math on my family, a married couple with two children. The new tax plan gives us $3,300 more in tax-free income. Hooray! But a married couple with more than two dependents would get a bigger tax break under the current system. The average family has less than two children; the birth rate for 2016 somewhere around 1.82528 children per woman. Since most people don't have more than two dependents, that means most people would save money under the new plan.

The tax reform plan also deals with business tax law, but I don't know anything about business tax law. My experience is only with personal tax law.

Wednesday, October 11, 2017

Tax Reform (Part 2 of 3)

The new tax reform plan says it will remove some exemptions, deductions and credits. It doesn't say which one will be removed, so again, it's hard to judge whether the plan is good or bad.

Things could go a few ways. They could get rid of the line items that are least commonly used. They could get rid of the line items that are least popular. They could combine similar line items, like lines 8a and 8b. They could go through every line of the tax form and flip a coin for each one: heads we keep it, tails we remove it. (Hopefully they won't go the coin toss route.)

President Trump says he wants to the tax form to be one page long. I'm thinking that's the general goal they're aiming for, with this statement. They want to remove half the lines on the tax form, so it goes from two pages to one page. They might try adapting the shorter, Abridged Tax Form (1040-A), too.

The tax reform plan lists three things they plan to get rid of, for sure. That's the death tax, the generation skipping transfer tax, and the alternative minimum tax. I'm only familiar with the third one. It's, uh, a complicated tax which was designed for super rich people. The main problem with the AMT is that it still uses the 1960's definition of "super rich". They never updated it, to adjust for inflation. So there's a lot more people who have to pay it now, even though they would have been exempted under the original plan. As you can expect, the rich people who pay the AMT don't like it, while the poor people who don't have to the AMT like it.

The plan names a few things that they will not get rid of. Basically, they're keeping everything which would be political suicide to remove. They're keeping the charitable contribution deduction; the government isn't going to charge people, for giving to charity. They're keeping the mortgage interest deduction; they're not going to charge people for owning houses. They're keeping the Child Tax Credit; they're not going to charge people for feeding their kids.

The Child Tax Credit is actually going to be increased, although it doesn't say how much it's increased to. The Advanced Child Tax Credit will stay the same. They're planning to add a non-child dependent tax credit of $500. I'll talk more on dependents tomorrow.

There's also a section that says, in general, the tax reform plan will have something for retirement plans and education. There are currently two different education credits, which have totally different rules that don't match each other at all. It's not clear how they'll be affected. They could keep the educational credits as they are now, they could combine the two, they could make a new one; all we know is that there will be something for education. Same goes for retirement. Again, they're keeping things which would be political suicide to remove. They're not going to charge you for going to school; they're not going to charge you for saving for retirement.

Tuesday, October 10, 2017

Tax Reform (Part 1 of 3)

I worked for the IRS this year, so I'm interested in the current tax reform plan. They finally released some details of the plan, so I thought I'd do an analysis of it on this blog.

First are tax brackets. There are currently seven tax brackets; they basically determine how much a person pays in taxes. For example, if you made under $9,325 in 2017, you're taxed at 10%. If you made over $9,325 and under $37,950, you're taxed at 15%. If you made over $37,950 but under $91,900, you're taxed at 25%.

It's more complicated than that, but that's the general idea. Some people are tax-savvy, and they'll play around with their incomes to their advantage. Like, if my YouTube business made $30 above a tax bracket break, I would totally buy $60 of games in December, to bring my income down a level and avoid paying the higher tax rate.

The new tax reform plan will reduce the number of tax brackets from seven to three. People in Bracket 1 pay 12%, people in Bracket 2 pay 25% and People in Bracket 3 pay 35%. The dividing lines between the brackets are ??? and ???.

That's right. They haven't decided where the brackets will be. This makes it rather hard to determine if it's a good idea or not. Like, it could be that each bracket has 33% of the population in it, and it could be that two brackets have 1% of the population, with the remaining 98% in the third bracket. Those are two wildly varying plans, and they're both possible at this point. So I'm going to withhold judgment on this proposal, until we get more information.

Columbus Day

Yesterday was Columbus Day in America. It's a holiday designed to celebrate Christopher Columbus, who discovered the Americas about 525 years ago. In recent years, there has been a push to change the holiday, because Christopher Columbus did some evil things. Some people think it should be Indigenous People's Day instead, while others think it could be a more generic Founder's Day.

Interestingly enough, Columbus Day originally had nothing to do with Columbus. It was actually Italian Heritage Day, back in the 1800's. It started when Italian-Americans noted that other Europeans had their own holidays, like the Irish with Saint Patrick's Day and the Scottish with Saint Andrew's Day. They wanted their own holiday, like everyone else.

I'm told their first choice was Saint Francis' Day (October 4), since he's a popular Italian saint and patron. But Americans shot down the idea of celebrating Saint Francis' Day, saying it was "too Catholic". The Italians switched to Christopher Columbus, since he was more or less the only person who was Italian, not a religious figure and relatively well-known/popular with mainstream Americans. Washington D.C. is named after the guy, after all. It was probably the best person they could have picked! But even then, groups like the Ku Klux Klan lambasted the holiday as overtly Catholic, and they worked to have it suppressed.

I heard this history from a member of the Knights of Columbus, which is a Catholic fraternity that was founded around the same time. They had similar reasons for choosing Columbus as their figurehead, instead of a saint.

I wonder how the Columbus Day thing is going to play out in the future. Maybe they'll change the holiday to something else, maybe they'll add another holiday, or maybe it will get demoted from a federal holiday to a local holiday, depending on where you live. I'm told Italian-Americans in New York City still celebrate it as an Italian Heritage holiday, and they are dead-set against having it removed from the calendar.

Monday, October 9, 2017

Murder on the Orient Express

I did a walkthrough for Murder on the Orient Express, before the Agatha Christie book publishers forced me to remove all my Agatha Christie-related videos. One or two people have mentioned that I would like the upcoming movie:



I'm not sure I can watch this movie, without being distracted by the detective's magnificent mustache, every five seconds.

The plot of the book is that someone is murdered on a train. No one can leave the train, so it's essentially a locked-room murder mystery. As the detective investigates, he learns the victim is a really horrible person, whose crimes include kidnapping the Lindbergh baby. Since he's such a bad guy, pretty much everyone has a motive to kill him. So...whodunit?

The video description says "One man must race against time to solve the puzzle before the murderer strikes again." This makes it seem like there could be multiple deaths! In the book, there's only one murder.

Sunday, October 8, 2017

Electoral College

I know I've talked about the electoral college several times this past year, but this past election has highlighted some major problems with the system we use to elect a President. I think we need to change the system. It made more sense in the 1700's, when there were more than two viable Presidential candidates per election, and it was impossible to have same-day results on Voting Day. Those things are no longer the case.

Recently, I saw someone argue that the electoral college should allot votes proportionately. That is, if you win 40% of a state's votes, you get 40% of that state's electoral college votes. This is opposed to the "winner take all" scheme, which is currently in effect in all states (except Maine and Nebraska).

I like this suggestion. It seems like a good in-between, between the current system and simple popular vote. It's mainly the same as the popular vote, except it tries to preserve the distinctions between different states, which the original system does. This system would make votes in all states important, as opposed to the current system which highlights swing states and popular vote which highlights the states with the most citizens.

When it comes to political primaries, the earlier states tend to have proportional voting. They also tend to be smaller. The larger states come later, and they tend to be winner take all. I'm told there are several reasons for this:

1. There are more candidates in the earlier part of the primaries. It's massively unfair to have "winner take all" competitions at the point when over ten people are running.
2. This system favors candidates who are in it, for the long run. It prevents a flash in the pan or momentum candidate from stealing the nomination.
3. It's more important to have the large states, with more votes, towards the end of the primaries, when it's more of a race to see who gets the minimum number of votes first.
4. The large states are "safe states" in the general election, so their input isn't as important.

I would also like to see changes made to the primary voting system. "Don't spread it out over six months" would be a good start. Also "no giving party insiders votes that count way more than votes from normal citizens".