Corning Community College
CSCS1320 C/C++ Programming
Using Vircon32 and its DevTools, write code and design graphics assets that creates some sort of sprite that, with the controller (ie cursor keys), lets you move it, and either recognizes the edges of the screen as boundaries, preventing crossing, or wrap-arounds.
Use the text output functions to display the sprite's X and Y coordinates on the screen.
Use a structure to store pertinent information related to the sprites.
You will want to go here to edit and fill in the various sections of the document:
struct person {
char name[32]; short int age; int height;
}
struct person Stanley;
Stanley.age = 34;
Stanely.height = 74;
int SpaceshipX = screen_width / 2 ; can replace 2 with any number depending on where you want the starting point. Replace x with y for y axis
To display sprites on screen, you must first make sure you define their textures. This should be done outside of “main”. Next, (assuming that: 1) the sprite appears in the same image as the background. 2) The background has also been defined outside of main and that texture / region has been selected / defined via functions) you can use “define_region_matrix().” This function will create a matrix, grab the sprite textures based on coordinates, and assign them to the aforementioned texure definitions.
you need to let the program know that you have a controller with “select_gamepad();”. In the () you can put 0, 1, 2, or 3 for the gamepad you want to use. 0 is the default.
to get an input from the gamepad, use the gamepad_direction() function and make variables for the x and y directions. You can also check to see if individual buttons are pressed with their respective functions found in the input.h API
To be successful in this project, the following criteria (or their equivalent) must be met:
Let's say you have completed work on the project, and are ready to submit, you would do the following:
lab46:~/src/SEMESTER/DESIG/PROJECT$ submit DESIG PROJECT file1 file2 file3 ... fileN
You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.
I'll be evaluating the project based on the following criteria:
104:fwg1:final tally of results (104/104) *:fwg1:all files needed to build cartridge are submitted [7/7] *:fwg1:code compiles, cartridge builds with no warning or error [13/13] *:fwg1:sprite interacts successfully with screen bounds [26/26] *:fwg1:sprite cleanly moves around the screen with controls [26/26] *:fwg1:code makes central use of a struct for sprite data [26/26] *:fwg1:committed project related changes to semester repo [6/6]