jaylach Posted May 30, 2009 Share Posted May 30, 2009 Hi Everyone, First off, let me apologize now if my Science/Chemistry lingo is incorrect. I'm not really a science guy, unfortunately. Now, on to the question! I'm currently writing a puzzle game for the Xbox that's based on Science/Chemistry. The goal is to create as many molecules (or compounds, whichever is correct, lol) as you can in a given time limit. You also have to do this while fighting against your Enthalpy (just like in the real world, some molecules give off heat while others absorb it..). It's a pretty simple concept, actually So, here's the question I have. In my code, I need to be able to refer to these molecules.. And since they are dynamically generated (by the user), I need to know how to order the elements in said molecule. For instance, how do I know that H2O is correct and not OH2? I've looked through a bunch of lists of naturally occurring compounds, and I just can't seem to find any rhyme or reason to the way the symbols are ordered. It would make sense that they would go by Atomic number, however that's not correct (see: CH4). I was also thinking maybe it could be alphabetically, but that's not right either (see: NH3). And, finally, I thought maybe it was ordered by the number of atoms (H2O - 2 H and 1 O)... but again, not right (see: NH3 and H2O). So, the question I have is.. how are these things ordered? Is there any logic to it I could apply in my code to make sure I'm building the molecule (behind the scenes) correctly? Any help, advice, or pointers in the right direction would be greatly appreciated. Thanks!! P.S: For those interested, you can see a very early alpha video of the game here: (Shameless plug, I know.. sorry!! hehe ) Link to comment Share on other sites More sharing options...
hermanntrude Posted May 30, 2009 Share Posted May 30, 2009 in general, the least electronegative element goes first. However, sometimes the order is changed in order to give some information about the structure of the compound involved. chemical nomenclature depends on the class of chemical you're naming and the context within which you are naming it. Link to comment Share on other sites More sharing options...
ydoaPs Posted June 18, 2009 Share Posted June 18, 2009 From the video, it looks like an analog to lewis structures rather than chemical formulas. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now