Tales of the Rampant Coyote

Adventures in Indie Gaming!

“Valence Electrons, First-Person Shooter”

Posted by Rampant Coyote on May 7, 2014

I vaguely remember high school chemistry. I remember working out the formulas, figuring out how you got molecules sharing electrons or whatnot. I guess I better remember the term “covalent bonds” rather than really understanding what it means. It’s been a while.

So, sadly, I haven’t been much help with my daughter’s homework for that class. Brenna has been on her own… and doing pretty well, apparently. I guess she’s got a better head for chemistry than either of her parents. That’s pretty awesome.

But – finally – I had the chance to help her out. They had a project in the class to create a game based around principles learned in one of their units covered this year. Or – I guess – to adapt a game / game style to reinforce principles learned in class. Something like that. Anyway – Brenna asked for my help. She wanted to do something different from everybody else. She wanted to turn it into a video game.

So we worked together on it. She had to come up with the questions, and did some of the art. I threw together bits and pieces of content packs and tools that I had to create a game in Unity. I can’t say this is ready for prime-time or anything like that, but on the plus side – I began to memorize the valence levels of various atoms as I tested the game, so that’s something… 🙂

Anyway, the students were all supposed to set up their game, announce the unit they were covering, and what kind of game it was. So they were saying things like, “The Periodic Table, Bingo,” and “Covalent Bonds, Jeopardy.”  It got to Brenna’s turn, standing beside her laptop, and she announced:

“Valence Electrons, First-Person Shooter.”

Well, it sounds like it was kind of a hit in the chemistry class. Kids were lining up to play. Not everyone got a chance to play in her class period, but the teacher kept the games up each period, and apparently the entire 8th period class played the game.

From a gameplay perspective, it… well, as a gamer, it kinda sucks. Originally I had envisioned more active enemies, moving around and shooting back as you missed them or got the wrong answer. But not only did we not have enough time, but with the time limit in place, I thought it would distract from the real point of the game. Someone who knew their valence electrons shouldn’t lose the game or get a bad score because their first-person shooter skills aren’t up to snuff.

So the gameplay serves the purpose of the game, as a mildly entertaining educational tool. That’s probably a definition of good gameplay right there. At least, that’s my story and I’m sticking to it. I did randomize the enemy’s atomic signature so that players couldn’t just memorize the order of the answers. Brenna and I both wanted the doors to vary the action a little bit, and to ask some more interesting questions.

The 3D Sprite code… I’m not familiar with anything in stock Unity to do this, but it was ridiculously easy to code. All you have to do is a call to set the facing of the visual in the direction of the player. We did that because I really didn’t want to try and make 3D models based on Brenna’s artwork.  Hey, it worked for Doom…. 🙂

The game is played first-person shooter style… you use the WASD controls on the keyboard to move around. To shoot an enemy with your “electron distributor”, you aim at it with the “X” crosshair, and shoot by pressing the number key equal to the number of valence electrons needed to balance the atom (the symbol above its head). So Xenon (Xe) has 8 valence electrons, so you would aim at an Xe – labeled enemy and press the “8” key to shoot it. Shoot it with the wrong number of valence electrons, and you will lose a health marker. Lose all 5 health markers, and its game over.

To open a door, you need to clear out all the enemies before the door, and then step close to it. You’ll be asked a chemistry question. Answer 1-4. Get the answer wrong, and you’ll lose a health. Get it right, and the door opens.

And there’s a princess at the end of the level. If you get to her, you get a score bonus based on your time (+1 point per second remaining on the clock, up to 120), and +10 points per health remaining. Each enemy defeated is worth 5 points, and doors opened are worth 20.

What? You wanna play it? Are you masochistic? Or are you just good at chemistry?

The game is really not much more than a Game Jam effort, the equivalent of a (looong) day of development. And if you don’t know your periodic table and valence levels, it’s going to be a lot of trial and error (I’ll add a cheat sheet to the comments). But if you want to, you can play it here. You will need the Unity web player (which will automatically be linked to if you don’t have it installed):

 

valence

 VALENCE

Anyway, I feel like I did my duty as a geek game-developer daddy.


Filed Under: Design, Geek Life - Comments: 4 Comments to Read



  • Rampant Coyote said,

    And here are the answers to everything – all my daughter’s work….

    Enemy questions
    1. Xe. Answer: 8
    2. Ca. Answer 2
    3. B. Answer 3
    4. He. Answer 2
    5. Cl. Answer 7
    6. Na. Answer 1
    7.Mg answer 2
    8.P answer 5
    9.Fr answer 1
    10.Se answer 6
    11.Si answer 4
    12.Te answer 6
    13. V answer 2
    14.At answer 7
    15.Ge answer 4
    16.Bi answer 5
    Doors
    1. How many orbitals does sublevel p have?
    a)2 b)3 c)8) d)7
    answer: b)
    2. Valence electrons are the same
    a) in families b) in rows c) in compounds d) in mixtures
    answer: a)
    3. In transition metals, valence electrons
    a) are the same as families b)have all the same charges c)do not vary d)vary
    answer: d)
    4.how many orbitals does the s sublevel have?
    a) 3 b) 5 c)1 d)2
    answer: c)
    5. How many orbitals does the f sublevel have?
    a)8 times as many as the s sublevel b) double the amount of d sublevel c)half of the number of transition metals. d) half the number of Lanthanoids
    answer: d)
    6. What happens when the number of electrons equal the number of protons
    a) the charge is zero b)the atom is more likely to react with transition metals c) the charge changes depending on the number of neutrons d) Magic!
    answer: a)
    7. In quantum theory, Heisenberg’s uncertainty principle is:
    a) Electrons are both waves and particles until you observe them b) the more you know about an electron’s position, the less you know about speed. c). the orbitals of the electrons
    d) what explains the electron’s position in space
    Answer: b)

  • Charles said,

    Final score 175. I’m not quick enough looking up the answers, oh well. Also 1 for Fr is nice!

    OK here’s the question everyone wants to ask but doesn’t have the guts…

    When’s dis on Steam? 🙂

  • Rampant Coyote said,

    My guess… probably before Frayed Knights! >:(

  • Anon said,

    That kid turned out good.
    Sell the other ones.

    😉

top