Positioning on Turbo Pascal
As Turbo Pascal is one of the legacy platforms that can host the very first game created in the world: Pong, it is important to understand that one of the elements that make playing a game possible is placement of where you want things to appear on the screen.
The following 2 screens above shows how to draw an image by using the new function gotoxy.
It isn't hard to understand the concept of this exercise:
Key points:
1) The top left corner of the screen is the starting point of 0,0.
2) Once your cursor has been placed at your desired coordinates on the screen you can tell the program to display something there.
And hence, you can do something fun on this platform.
It isn't hard to understand the concept of this exercise:
Key points:
1) The top left corner of the screen is the starting point of 0,0.
2) Once your cursor has been placed at your desired coordinates on the screen you can tell the program to display something there.
And hence, you can do something fun on this platform.
Here are some examples done by students in previous years:
Assignment #5:
Create a program that displays an image that you created using zeros or symbols. You must use the GotoXY function to position and create your shape.
Out of 5 marks. |
Skills Mastery List:
|