Thursday, March 17, 2016

XMLReader Practice and Splitting strings


The Xml reader is the assignment of the information given to the project in the Xml.
Notes for the future:

  • The Reader requires System.Xml;
  • Reference the Xml Doc and load it from file location
    • File location can be either a local file or HTTP URL
    • You can paste the local file location in a browser to get a URL
  • Use loops to iterate through nodes.
  • Check if the nodes you have is the node you are looking for.
  • Set a default value in case the node cannot be found.
  • Most methods are returned as strings.
    • float.Parse
    • For multiple numbers in the text, split the string and assign the array values.

Xml Practice

XML is a file extension for an Extensible Markup Language (XMLfile. Values can be changed within the game during run time...even as the game is played. It would also be a great tool to give designer in order to tweak the scene without even looking at the code or over-writing another's work.

Note: The comments (in green) are counted as nodes.

Thursday, March 3, 2016

Unity Particle set-up

The material for the star particle was imported as a texture and added to a new material with the shader: Particles/Alpha Blended. The color can be changed in the scene

The particle system is setup to have a longer life time and low amount of stars that will blink in and out. I plan on implemented multiple Sub Emitters that will have different alphas and colors and life spans.
The goal is to not have the background overwhelm the gaming experience.


Adobe Illustrator.

Using Adobe Illustrator, I created a star that would be used as a particle in the background. I began by placing the rulers at the center, creating a square, using the curve tool, and then rotating the square. I added a radial gradient from the center, added an outer-glow and an inner-glow.

I left the color neutral so that it can be changed in Unity based on the needs.

Idle screen creation

For the idle screen, we wanted it to look like the screen saver that bounces around the screen. First, using ViewportToWorldPoint, I found the right upper corner and lower left corner of the camera bounds so the particles could not leave the region. Using randomization and while the next wall was not the previous, the particle would pick a random wall and lerp to any point along that wall, over a period of time.