Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 05:14:01 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsCrystallogame, a puzzle game on crystallography!
Pages: [1] 2
Print
Author Topic: Crystallogame, a puzzle game on crystallography!  (Read 2649 times)
mtarini
Level 1
*


View Profile WWW
« on: December 23, 2020, 10:14:06 AM »

Hello all. We are trying to design a educational game that has the explicit purpose of making players understand the principles making crystallography work.

We don't have a precise idea of the gameplay yet, but the general idea is to put the player in the place of the computer trying to guess the 3D arrangement of atoms producing a given X ray diffraction pattern. We are still exploring!


[image]

We hope to keep this log-up-to date but no promise.
« Last Edit: February 19, 2021, 11:22:53 AM by mtarini » Logged

Warballs! · spherical fierceness · 1P · free · arena fighter · challenging
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #1 on: December 24, 2020, 04:19:19 AM »

I like the science behind this very much. But I imagine trying to derive what atoms to move to achieve a certain interference pattern will be frustrating. I'm curious how you'll solve the gameplay aspect.

And maybe I underestimate human's capacity for pattern recognition and you involuntarily train a new generation of scientists who don't need computing power to make sense of electron microscopes
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
JobLeonard
Level 10
*****



View Profile
« Reply #2 on: December 24, 2020, 10:25:29 AM »

Oh this looks really interesting, following!
Logged
mtarini
Level 1
*


View Profile WWW
« Reply #3 on: December 29, 2020, 07:55:04 AM »

But I imagine trying to derive what atoms to move to achieve a certain interference pattern will be frustrating. I'm curious how you'll solve the gameplay aspect.

We are curious too Wink

We have no clear ideas yet, but potential directions are:

(1) to quantize the possible positions, so for example each atom can stay in point of a grid (so that you either you get it absolutely right, or absolutely wrong;

(2) viceversa, allow for any position, but make the system tolerant when it comes to determine if the player guessed it right; and, independently

(3) help players out of frustration giving the powerups that make the problem easier for them. Read below.


A premise: we think we will the players gain, at a certain points in the game, powerups, things of various nature which help them to solve puzzles in more difficult levels (that is, levels). Simple levels, like "guess the relative positions of just two atoms" (i.e. position just one atom) can be solved with just trial and error (maybe):



The relationship between the relative positions of two atoms and the relative interference pattern in not intuitive, but maybe it can be learned by players.

A basic example of powerup, would be the crystal nature of the sample, meaning that atoms are repeated:


A module is repeated in a 2x2x1 pattern. We will need more repetitions, probably. Oh, don't mind the interference patterns in this early screenshot: they are completely bogus

Repeating atoms in a "crystal" pattern is what crystallography is (in realty) all about, so this powerup will be acquired early in the game.

Another example of powerup would be to gain the ability to rotate sample (and puzzle) like you see in the examples above.

One of the objectives of the game is exactly to illustrate why these things are important IRL, so it's good that the player cannot solve the more complex levels without them!

An example of a more advanced powerup would be (we are just imagine) to gain "DNA sequencers" which, as an effect, reveal the linear ("primary") structure. So basically rather than moving individual atoms freely in 3D space, the player would be bending a small "chain" of atoms each staying at prescribed distance from the other. This could reduce the space of solutions considerably. But this is all in the future. Right now, we just want to experiment and see if an interesting puzzle can be made using the basic mechanisms.
« Last Edit: December 29, 2020, 10:15:07 AM by mtarini » Logged

Warballs! · spherical fierceness · 1P · free · arena fighter · challenging
mtarini
Level 1
*


View Profile WWW
« Reply #4 on: December 29, 2020, 08:00:41 AM »

Mini update.

We are in the process of recreating the real-world interference patterns as a fragment shader:


An example with just three atoms.

You see previous versions of this shader in action in a few of the screenshots above.

This is probably correct now (as far as we need in a game).
The next step is to compute the effect the crystal repetitions directly in the formula, instead of by brute forcing each repetition as a separate occurrence. This is necessary for efficiency!

Luckily, we have experts on crystallography in the team!  SmileyHand Thumbs Up Right
« Last Edit: December 29, 2020, 08:21:33 AM by mtarini » Logged

Warballs! · spherical fierceness · 1P · free · arena fighter · challenging
JobLeonard
Level 10
*****



View Profile
« Reply #5 on: December 29, 2020, 08:43:57 AM »

Quote
This is probably correct now (as far as we need in a game).

A few years from now: "Breaking news! Small indy game development team accidentally invents easy way to implement a quantum supercomputer, quoted as saying 'it was the only way to implement the final puzzle in the game'"
Logged
GabrielePrinciotta
Level 0
*



View Profile
« Reply #6 on: January 02, 2021, 03:19:00 PM »



Hi everybody.

I'm part of the dev team and I wanted to share some new features.

Basically all of the effort right now is to find out if the pattern generated by x-ray diffraction is somehow intuitive. To do that, first of all, we have to get closer and closer to the real diffraction effect. As said in the old post, a great part of that is the crystal lattice, which repeating the same cell "amplifies" the effect making the pattern somehow more clear.

So we added the generation of cell repetitions, changing the formula that produces the procedural texture and making the player drags and drops not only an atom, but also its corresponding repetition (except a "pivot" atom, the blue one, that has to keep its positions in order to make sense of the math behind the formula). Only the red cell in the center is interactive. We will modify some graphics to make the interaction more clear to the player.

We also added a "zoom" parameter that changes the render texture zooming in and out.

The second "room" that you can see also in previous post should be the solution room, where there is already the solution of the puzzle in the current level and it will be hidden from the player (we're not sure at all about the interface, so this solution will probably change). Right now the solution room has old atom generation and you can see how a completely random disposition produces only noise. 
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #7 on: January 03, 2021, 03:44:40 AM »

I suspect that intuition will come with knowing what you're doing and why doing X leads to Y.

So on the one hand that will mean having a really clear tutorial and going all in on the educational aspect of the physics involved. On the other it's the presentation of those physics models and the interface for interacting and inspecting the results, like the zoom functionality. What other ideas do you have so far?
Logged
mtarini
Level 1
*


View Profile WWW
« Reply #8 on: January 05, 2021, 01:13:20 PM »

Quote
I suspect that intuition will come with knowing what you're doing and doing X leads to Y.

The game must feature some texutual explaination, but we are afraid of making it boring. We would like to let the player learn by experinenting. A typical "learn by doing" tutorial.

For example, in the first "tutorial" levels, some "back-story" text will mention that there is some self interference phenomenon of the x-rays taking place, but the game jusy challenge the player to move a single atom in a plane (a second atom is there but cannot be moved). Hopefully, after a while you know how the pattern is created, by trial and error, for example you learn that the closer the two atoms are, the denser and more packed the stripes, ans so on.

These first levels will not feature rotations, or crystal repetution, just a x-y position of a second atom.

That's just tentative, we don't have a complete design yet.
Logged

Warballs! · spherical fierceness · 1P · free · arena fighter · challenging
JobLeonard
Level 10
*****



View Profile
« Reply #9 on: January 06, 2021, 02:49:32 AM »

Make sure you have "escape hatches" for learning though - you don't want people to hit a wall because they can't reverse engineer something that took real physicists years to figure out Wink
Logged
GabrielePrinciotta
Level 0
*



View Profile
« Reply #10 on: January 17, 2021, 03:46:25 AM »



Hi, this is an example of gameplay of one of the first levels.

You can see the effect of playing with some of the power-ups, but ideally at this point of the game the player shouldn't have them.

It was important to implement a solution validation procedure that doesn't care about which atom you move to one of the correct positions (basically the order doesn't count). There are also other simmetries that we will have to care about but we will discuss it in the next post.
Logged
GabrielePrinciotta
Level 0
*



View Profile
« Reply #11 on: January 17, 2021, 04:13:08 AM »

Investigating the symmetries of the patterns! Symmetries (that is invariance of the 2D pattern with respect to some 3D transformation of the atoms) is a problem for us because it means wrong solutions that are indistinguishable from correct ones!





Logged
JobLeonard
Level 10
*****



View Profile
« Reply #12 on: January 17, 2021, 12:33:03 PM »

Isn't that a matter of requiring whatever3D transformation isn't an invariance as part of the puzzle?
Logged
mtarini
Level 1
*


View Profile WWW
« Reply #13 on: January 17, 2021, 04:21:51 PM »

Isn't that a matter of requiring whatever3D transformation isn't an invariance as part of the puzzle?

Yes. The plan is to accredit victory when the 3D patterns match... up to any valid symmetry. For that, we need to have a complete understanding of all the symmetries (invariances) at play, and include them in the procedure to detect the matching. We overlooked the "x,y,z to -x,-y,-z" symmetry at first, and there might be more of them. There will be even more symmetries or almost symmetries when crystals are considered.
Logged

Warballs! · spherical fierceness · 1P · free · arena fighter · challenging
JobLeonard
Level 10
*****



View Profile
« Reply #14 on: January 17, 2021, 11:48:18 PM »

Sounds like you're learning more about the science involved in the process of making this game!
Logged
GabrielePrinciotta
Level 0
*



View Profile
« Reply #15 on: February 02, 2021, 08:40:40 AM »



Hi everybody!

There was a little pause in the development, but recently we made some graphical upgrades.

First of all the diffraction pattern on the wall has now a circular "falloff effect", to mimic the projection of the cone of x-rays.

Secondly, the slider that changes the wave length influences the color of the x-rays emission, probably it's not realistic at all, but at least it follows the real light spectrum.

Finally, we improved the emitter 3D model.     
Logged
GabrielePrinciotta
Level 0
*



View Profile
« Reply #16 on: February 19, 2021, 08:52:50 AM »







Working on the shop (where you buy upgrades) and the level selection screen! The shop could be an important section for the educational part of the game, so we want to add an "Info" section for every upgrade!
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #17 on: February 19, 2021, 09:41:59 AM »

Nice! Also one way to ensure gradual progress
Logged
GabrielePrinciotta
Level 0
*



View Profile
« Reply #18 on: March 12, 2021, 10:25:26 AM »



We want to convey that how interference pattern depends on the frequency of the X-ray,
so we are experimenting with some element in the 3D scene that reveals to the user the shape of the waves
being used (which players can control, when they get the corresponding power-up).

The 3D models are just place holders, they will be improved!


In addition you can see at the top-right corner we added a timer for calculating bonus points!


Also the level generation is now procedural, the only things that are set in the level are the number of atoms and in which plane the atoms are moving (at the end the player will have to move the atoms in the whole 3D space, inside certain limits, making the puzzle more challenging). The positions of the solution atoms is completely random instead. These aspects are in development though, we are stiil working on the definition of level progression and level design.     
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #19 on: March 16, 2021, 01:34:56 AM »

Even as placeholders that already looks like a good addition!
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic