Quick links:
Contents:
You may have heard some of your colleagues on other teams bragging about their advanced field of "anti-game" theory, with their negation of chess. Well, our crack team of Gizmologers has recently discovered a new field that could revolutionize the study of Gizmology. Not only that, but it presents a generalization of the previous research in anti-game theory, to show how neutral games can in fact be made up of positive- and anti- elements. This new field is known as "Quantum Gizmodynamics." We would like you to improve your Gizmoball game by implementing some aspects of Quantum Gizmodynamics.
As with the original Gizmoball assignment, some aspects of this amendment have been left intentionally vague. You will need to make and document some reasonable assumptions and interpretations of this specification.
The first thing you will need to do, if you have not already done so, is implement the ability to have multiple balls, which can have varying diameters and masses. By default, balls still have a diameter of .5L, but you must additionally support sizes other than .5L. You should have a way to edit the size of a ball in your GUI, and you should add a new optional 'size' property on the ball tag in the XML save file to specify the diameter of the ball in L.
Additionally, balls should be able to have mass differences. Gizmoball mass is measured in gmu (gizmo mass units), and the default mass of a ball is 1 gmu. Your file loader and saver should support an optional property on the XML ball tag called 'mass', which is the mass of the ball in gmu. You should also allow a way of setting the mass of a ball in your GUI. Collisions between balls should conserve momentum according to the ball mass.
Absorbers now should hold a FIFO queue of balls. When a ball enters an absorber, it becomes the "last" ball in the absorber. When the absorber is triggered, it releases its "first" ball.
Here is the extended XML Schema gb_level_amend.xsd that includes the two new optional properties for ball: size and mass. Your amended version of Gizmoball must be able to load and save XML files that conform to this schema. The only difference in this new schema is the addition of these two optional attributes to ball:
<xs:attribute name="size" type="xs:float" use="optional" /> <xs:attribute name="mass" type="xs:float" use="optional" />
Like flippers and absorbers, balls now have an action (that can be triggered via a gizmo connection or a key stroke, like all other actions): they decay. When a ball decays, it splits into two recently-discovered particles called a "posiball" and an "antiball", each with half the mass (but the same size) of the original ball. This event conserves momentum, but releases an energy equal to m*L2/s2, where m is the mass of the ball. After a ball decay, both the posiball and the antiball have the same speed as the original ball in the direction of the original ball's travel vector. In the direction perpendicular to the original ball's velocity, posiballs always go right, and antiballs always go left (with respect to the original ball's velocity).
When a ball decays, all connections targeting the ball are replaced with connections targeting the posiball, and all connections triggered by the ball will be replaced with connections triggered by the antiball.
Posiballs and antiballs should be displayed in a manner visually-distinct from standard balls and each other.
Posiballs and antiballs interact with their environment just like any other ball, with one caveat: if a posiball and an antiball collide, and together they have more kinetic energy than m*L2/s2 in their center-of-mass frame (where m is the sum of the masses of the posiball and antiball), then the posiball and antiball merge into one normal ball. This event conserves momentum and mass. It absorbs however much energy is needed to make the collision completely inelastic (in other words, all the kinetic energy in the center-of-mass frame). A posiball from one ball's decay may combine with an antiball from another ball's decay. In the event that the posiball and antiball were differently-sized, the resulting ball has the arithmetic mean of the diameters.
As you recall from 8.01, the center-of-mass frame's velocity is equal to the total momentum of the two balls, divided by the total mass of the two balls.
If the posiball and antiball collide without enough energy to form a ball, they instead bounce normally off of each other.
When posiballs and antiballs combine, any connection to or from either the posiball or the antiball is replaced with a connection to or from the new ball.
None yet.