Naturally Occurring Elements Game Primer Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Naturally Occurring Elements Game Primer Tutorial

Naturally Occurring Elements Game Primer Tutorial

You can look at life from a lot of different viewpoints. Reading Biology Fifth Edition by Campbell Reece Mitchell (ISBN: 0-201-52262-4) helped crystallize these thoughts for us, thanks, and provided for todayโ€™s gameโ€™s background image, as well, so double thanks. In biological terms, letโ€™s for now ignore subatomic particles, we could look at life (on Earth) from the viewpoints โ€ฆ

  • atomic level (eg. oxygen)
  • molecular level (eg. DNA)
  • organelle level (eg. cell nucleus)
  • cellular level (eg. smooth muscle cell)
  • tissue level (eg. smooth muscle tissue)
  • organ level (eg. stomach)
  • organ system level (eg. digestive system)
  • organism level (eg. tiger, consisting of many organ systems)
  • higher levels (eg. populations, communities, ecosystems)

Todayโ€™s biological game jumps from the โ€œorganism levelโ€ down to the โ€œatomic levelโ€ regarding human beings, asking the user, in laypersonโ€™s terms, โ€œwhat goes to make us upโ€.

Like with Body Systems Quiz Game Primer Tutorial, as shown below, all the gameโ€™s HTML elements involve CSS position:absolute property styling, as a few other games have recently, actually. This time though, it is more of a stretch to describe what we do as โ€œoverlayingโ€ as such, but more the placement of HTML elements so that they do not โ€œoverlayโ€ (ie. clash). Those things we donโ€™t want to โ€œclashโ€ are โ€ฆ

  • a contextual background image, the dimensions of which we know, so can plan the position:absoluteโ€˜s left and top properties for โ€ฆ
  • a Google Charts Pie Chart initially showing the proportions of unknown elements but infilled with element names as the game progresses โ€ฆ and โ€ฆ
  • some headings โ€ฆ and โ€ฆ
  • a select โ€œdropdownโ€ element consisting of those elements we know of in life and nature and the laboratory (ie. in biology), that are shown in the Periodic Table

โ€ฆ so, as you can imagine, in all likelihood, the user is asked to name the 11 most abundant elements that go to make up the human body in the order from most prevalent to least prevalent, selecting their choice from that select โ€œdropdownโ€ element and having a score (as an h4 element) be appropriately updated. As per usual with our biology and anatomy and physiology games recently, we add an option to โ€œgive upโ€ to allow the game to proceed, and learn, while moving on to the next question.

Weโ€™re so sorry, Uncle ?

We hope you get something out of todayโ€™s liveโœ‚run of our โ€œHuman Body โ€“ Naturally Occurring Elementsโ€ game (or quiz). The HTML and Javascript and CSS is atomic_level_human_bodyโšซhtml for your perusal.



Previous relevant Body Systems Quiz Game Primer Tutorial is shown below.

Body Systems Quiz Game Primer Tutorial

Body Systems Quiz Game Primer Tutorial

โ€œRegionalโ€ click (or touch) web application functionality doesnโ€™t have to be always done via an HTML map element thangthing. Today, as an alternative methodology, we โ€ฆ

  • start with a useful โ€œBody Systemsโ€ image โ€ฆ thanks to HLTAAP001 Recognise healthy body systems TAFE NSW
  • set it up as the document.body background: url(โ€˜body_systems.jpgโ€™) no-repeat; background image
  • โ€œoverlayโ€ a โ€ฆ
    1. position:absolute property
    2. z-index
    3. background-color:transparent

    โ€ฆ HTML table element โ€œgridโ€ on top

  • add HTML table elementโ€™s cellsโ€™ onclick event logics that work on the scoring for the โ€œBody Systems Quizโ€ game we have for you today
  • an HTML select โ€œdropdownโ€ element gets randomly selected with a โ€œBody Partโ€ for which the user then (and features the use of data attributes to store associated data items) โ€ฆ
  • clicks (or touches) (a โ€œBody Systemโ€ arrowhead representing) one of the HTML table elementโ€™s cells (but looks to the user as the original background image showing โ€œBody Systemsโ€), triggering the scoring analysis logic for todayโ€™s โ€œBodyโœ‚Systems (of Body Parts) Gameโ€ whose HTML and Javascript and bit of CSS source code body_systemsโšซhtml is there for your perusal

You may wonder, from this, whereโ€™s the relationship among โ€ฆ

  • Body System
  • Body Part
  • Grid Reference (ie. HTML table elementโ€™s cellsโ€™ IDs)

โ€ฆ established? Again, as you may be really sick of by now with us, nothing more complicated data structure wise, than a โ€œBody System:Body Parts List (comma separated):Grid Reference List (comma separated)โ€ array, as exemplified by the snippet โ€ฆ



var b_s=["Cardiovascular:heart,blood,vessels:3_2,3_3,5_2",

...

];

When taking a look at todayโ€™s HTML and Javascript and bit of CSS source code body_systemsโšซhtml you may notice โ€œthe bit of CSSโ€, literally โ€ฆ



<style>

td { width: 10%; height: 10%; border: 0px inset red; }

</style>

โ€ฆ and wonder, whatโ€™s the go with the 0px bit of โ€œborder: 0px inset red;โ€? Well, itโ€™s a reminder back to how we โ€œdebuggedโ€ the โ€œGrid Referenceโ€ array data we collected. When developing this web application, we had, for debugging purposes, this CSS as โ€ฆ



<style>

td { width: 10%; height: 10%; border: 1px inset red; }

</style>

โ€ฆ and just during that period we had a way to tell in which HTML table elementโ€™s cell a โ€œBody Systemโ€ arrowhead would fall. It may not be to your liking to leave such โ€œkludgesโ€ in live code, and often weโ€™d agree, but if something is such an obvious code โ€œattention seekerโ€, we actually find leaving such โ€œpeccadillosโ€ in instructive into future revisits of such code.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Tutorials and tagged , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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