Saturday, February 1, 2014

Step 1

Week 1 (January 29-February 1) — Fundamentals

To do:

To learn:


To deliver:


  • Basic app with text of the story in it


Summary of what I learned:

Definitions of terms
  • function - smaller and re-useable chunks (D.R.Y. = don't repeat yourself)
  • variable - a placeholder for values that I will use throughout my app.  This can be letters, numbers or underscores, but can't begin with a number nor contain a symbol or any other symbols. They are also case sensitive and only exist within the scope of each individual funcion
  • event - an action that the user does to interact with the app
  • listener - a value that is waiting for the user to act a certain way before it outputs something
A few resources I found during my work
  • http://docs.coronalabs.com/api/library/system/pathForFile.html
  • http://docs.coronalabs.com/guide/data/readWriteFiles/index.html
  • https://www.youtube.com/watch?v=nXb7UHVarAQ
  • http://coronalabs.com/blog/2011/07/29/how-to-use-xml-files-in-corona/
Questions/concerns/things to come back to
  • How is the text organized?  
    • How does the app know to which object I'm referring to? 
  • How can I reference .txt or .xml files so I don't need to copy an paste all the actual text I want in to the code?
  • How do I get the terminal simulator to work? I get the following error:
  • What is the necessary format of the .XML file to be in for the app to pick it up?

My functioning code so far: 

(https://drive.google.com/folderview?id=0B406rJ0oHVzZY0p2SkxCTFFKTWs&usp=sharing)


local physics = require( "physics" )
physics.start( )


local background = display.newImage( "background.png" )
background.x = 160; background.y = 195



local storyText = display.newText( "THE CONSTANT TIN SOLDIER", 160, 150, "Georgia", 20)
storyText:setFillColor( .169,.169,.169 )



No comments:

Post a Comment