MGGA – Introduction to Variables

Full Video –

https://youtu.be/VSRB2hP12nA

Variable Definition –

https://en.m.wikipedia.org/wiki/Variable_(computer_science)

SwiftPlaygrounds –

https://itunes.apple.com/ca/app/swift-playgrounds/id908519492?mt=8

Variables are snippets of code which store a value of any random thing in your program or game. It’s used by game developers to dictate what object in a game does what to where and when, all things that are defined by Variables.

Looking at previous episodes, the Guards are their complete own variable, and Shopkeeps would be their own variable, the player character is their own variable, townspeople are their own variables, a door is a variable, and just about anything is a variable which is defined the developer. That way you can code further things to say Door193 will only unlock with Key039 and not any other key in your pack.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s