Tutorial topicsTutorial home
ELC language reference
Commenting your code
ELC app structure
An empty ELC program
Hello world
Functions
Defining variables
Function parameters
Using variables
Function return values
IF decisions
WHILE loops
FOR loops
Arrays of variables
Library functions
Game Tech - Depth & 3D
Game Tech - Shooting bullets
Dev Tech - How to debug
|
Library functions
Library functions are a set of powerful functions provided by the ELC runtime environment which your apps can use.
They take away a lot of unnecessary complexity making it easy for you to do things that are important to most apps
(like load images from the YOUSRC website for example). They also isolate your apps from the hardware the app is
running from (for example PC's, Macs, Android mobile devices) so that there is a common way to sense the mouse
position, display images, show text, etc.
There is a full breakdown of each function, what it does, how to use it, and a working example available through the
"Elc functions" tab on the left. The table below is an index into the ELC function reference.
The library functions are grouped into the following areas: Calendar - Get time and date information Debug - Display text on the Java Console to help you fix issues in your code File - Read and write text files Graphics - Display text in the app window, load images, show or hide them in the app window Keyboard - Return keyboard key presses Math - Math functions (eg trigonometry) Mouse - Check where mouse is and if left button pressed Sound - Load sound clips, play them once or loop Text - Do things with words and word variables Timer - Used for waiting, and controlling app speed Utility - Utility functions like random number generator Fatal error - Stop the app with a fatal error message

|