Inspiration
I have always been very conscious of the litter we create in the environment and the fossil fuel energy sources we use. I thought the best way for children who may not immediately realize the negative effects of climate change is to reinforce that renewable energy sources are key. So what better than a video game to help them be aware?
What it does
Geared toward children and tweens, the app is pretty simple at its core. The user can control a jumping sprite using the spacebar, gaining or losing points based on the object it comes into contact with in the air during its jump. For example, if the sprite comes into contact with an oil barrel, the user will see the points tally drop, and vice versa for solar energy and other renewable energy sources. The app also provides helpful information about the harms of nonrenewable energy sources.
How I built it
I used code.org's block code to build the game and control the character, and also designed the sprite behind the scene.
Challenges I ran into
This code has 570 lines, so evidently, there were a LOT of errors. One example was the control of the collectible objects, that had to move left to act as though the sprite was moving forward and then reset all the way to the right with a random y-position. Another was the contact between the sprite and collectible objects, and I had to get the coordinates right for both and enable the latter to reset to the right.
Accomplishments that I'm proud of
It was a long ordeal and I struggled with it, so I'm glad my project came to fruition in the end! I hope the impact can match the effort I've put into it. My biggest accomplishment was the UI design, which I feel was minimal and doesn't have too much detail.
What I learned
I learned that it's always important to make a plan before beginning to code. Initially, I didn't know where to begin, but once I made a sketch in my notebook, everything panned out perfectly and I had a structured and streamlined vision that I executed in code, albeit with various errors.
What's next for Energy Resource Game
Coding this in pygame or another high-level programming language would be an even greater accomplishment. Additionally, I'd like to make this a Role Playing Game to greatly enhance the user experience and attractibility.
Built With
- blocks
- game
- javascript
Log in or sign up for Devpost to join the conversation.