Skip to content
Coding Fanatic
  • Android Development
  • News and Reviews
  • Road2Pro
  • Tutorials
  • Services
  • About

Kick That Boulder to Your Heart’s Content

  • March 1, 2017January 10, 2018
  • by Richard Clarke

My interest in programming started as a kid playing video games. Certain games just had this appeal that I couldn’t shake. I grew up with the Pokemon series from the beginning and even then I had an eye for improved features across the games.

In Yellow version, there were puzzles that could be solved by using Pokemon to push boulders around the map in order to discover hidden areas and items. The problem was players had to pause the game and select the Pokemon, and the ability “Strength” every time they push the boulders.  So players were pausing and selecting repeatedly to push boulders one space at a time.

Fast forward to fall of 2000 when I got Silver version. In addition to music and new companions to catch and train, the developers at Game Freak also revamped the “Strength” feature. In this version, once a player selects the ability, they can automatically push a boulder just by walking up to it. This small change saved me minutes of gameplay and made me feel like I was the Hulk kicking boulders around the map.  Very cool.

What does boulder soccer have to do with programming? It’s all about the use of methods. Methods are groups of statements that perform a task in code. They are reusable and are probably the best way to condense code. In the earlier example, players invoked the method responsible for “Strength” (let’s call it strengthMethod for now). In the first generation of games, players first approached a boulder, entered the menu, chose the Pokemon with the ability, selected “Strength”, then finally, invoked strengthMethod() and pushed the boulder one space

Game Freak made this task much simpler by editing the source code to allow the player to invoke the strengthMethod() as long as they had first selected the Strength ability from the menu. Perhaps there was a second method responsible for checking if the player has selected the ability before allowing free boulder kicking.

do{

//Insert code for invoking the strengthMethod()

}while (strengthIsSelected);

In summation, methods are a great way to group together statements that can perform a task. They can make a program more interactive by allowing users to execute this task to their heart’s content. Especially with Boulder Soccer.

-CF

Related

Loops all around! Loops all around!
Time to return to Android, 100 Days of code 1 of 100
Richard Clarke
Richard is currently a developer using Java and Android Studio to build custom applications for Android. Richard tutored in mathematics at Montgomery College, and worked in Information Technology before entering the Software Development industry as a Quality Engineer.
Java Loops Methods Pokèmon Programming

Related articles

Loops all around! Loops all…
My story is complete…ish
Interactive Fiction: (F)Funny (U)Unreal (N)No…
Interactive Fiction: A Fun Program…
Falling Through and Landing on…
Condensing Your Code with Variables,…

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • GitHub
  • YouTube
  • X
  • Instagram
  • LinkedIn
My Tweets

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • X
  • GitHub
  • LinkedIn
  • YouTube

Archives

Theme by Colorlib Powered by WordPress