Page 1: Making a Simple Action Game - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Tutorials (https://communities.curl.com/forumdisplay.php?fid=3) +--- Forum: Public Training (https://communities.curl.com/forumdisplay.php?fid=4) +---- Forum: Curl IDE Made Easy (https://communities.curl.com/forumdisplay.php?fid=6) +----- Forum: Try 2: Making a Simple Action Game (https://communities.curl.com/forumdisplay.php?fid=10) +----- Thread: Page 1: Making a Simple Action Game (/showthread.php?tid=47) |
Page 1: Making a Simple Action Game - ashimo - 06-16-2011 Try 2: Making a Simple Action Game We can gather data from a user by using controls, which include buttons, lists, and input fields. And, by using events, we can perform processing according to the user’s actions. In this chapter, we’re going to create a simple game using controls and events. Please download the Try2.zip file by selecting the following link: Try2.zip. Unzip the contents to the C:\Curl directory. This is the working directory for all the examples and exercises contained within this tutorial. Note: If C:\Curl has not already been created, you can create it now. The Basics: Displaying Values that are Input from a Control Create the 'Try 2-1' Project 1. Close the Try 1 project. From the “File” menu, select “Close Project.” Opening multiple projects in the IDE For clarity, in this manual we only ever open and then edit a single project. The Curl IDE, however, supports the simultaneous opening of multiple projects. 2. Next, from the IDE “File” menu, select “New Project.” In the “New Project” dialog box, select “Applet Project” (1), input “Try2-1” (2), specify c:\Curl\lesson\Try2\01_control_action in the “Directory” field (3), set the API Version to 6.0 (4), and then click OK (5). Inputting the Program Next, we’ll input the program. You can copy the program code below or use c:\Curl\Try2\01_control_action\start.curl and then paste it into the editor in the IDE. Code: {CommandButton Save the File, and then Execute the Program After inputting the code, save the file, and then execute the program. The following result will appear in your browser. Push the button and select the checkbox, while noting the results. |