Come on everybody!
Let's see our first code to make an screen to play.
- ' to add comments to the code, very useful to understand even the code made by ourselves. Used alone in a row or at the end of an instruction.
- const as integer to declare labels as integer numbers that contain constant values, non modifiable along the program. In this case w and h are constants. We must separate different consts with comma.
- screenres to do an screen to play, we have to tell two parameters the width and the height of the screen. We must separate parameters with comma.
- sleep to wait until a key is pressed to see the screen that otherwise will close too fast.
- end to end the program.
- DESCRIPTION
- DECLARATIONS
- INITIALIZATIONS
- Main code
- ENDING
This is the result of our first code:
An screen to play with 400 pixels of width and 300 pixels of height.
This is enough by now, in the next entry we will enrich our first code drawing some squares.
Contact me for any question, see you!
Go to the next entry
Go to the previous entry
Go to the first entry
Comments
Post a Comment