In this video in my series Learn Programming and Game Development with Lua I introduce functions in Lua.
First I demonstrate a simple function that returns a single value.
Then I demonstrate returning mulitple values from a function.
#programming #gamedevelopment #gamedev #lua #love2d
Link to the code from this tutorial on GitHub:
https://github.com/CharlesKirkSD/Lear...
00:00 - Start
00:06 - Introduction
00:44 - Writing Our First Function in Lua
02:41 - Function Structure: Discussion of the structure of a function.
03:55 - Returning Multiple Values from a Function: Introduction - In this second example we look at returning multiple values from a function
04:15 - Returning Multiple Values from a Function: Color Components - Introduction to color representation in computer graphics.
04:23 - Returning Multiple Values from a Function: Adding Colors - Writing a function that adds colors
05:12 - Returning Multiple Values from a Function: Outputting the values returned from the function - Demonstration of using the print function to output the return values from a function that returns multiple values.
05:52 - Returning Multiple Values from a Function: Processing the values returned - Demonstration of the handling of return values from a function that returns multiple values.
07:13 - Returning Multiple Values from a Function: Demonstration of what happens when the last parameter returned, from a function that returns multiple values, is not assigned to a variable.
07:35 - Returning Multiple Values from a Function : Assigning too many variables for the number of values returned
On this page of the site you can watch the video online Functions In Lua: Learn Programming And Game Development With Lua with a duration of hours minute second in good quality, which was uploaded by the user Charles Studio Tech 08 January 2025, share the link with friends and acquaintances, this video has already been watched 373 times on youtube and it was liked by 14 viewers. Enjoy your viewing!