This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
notes:sysprog [2019/03/07 04:40] – [Game implementations] wprice2 | notes:sysprog [2020/01/23 17:44] – removed wedge | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <WRAP round fggray muchbigger box> | ||
- | ======URLs====== | ||
- | * http:// | ||
- | | ||
- | * https:// | ||
- | |||
- | ======Login Problems====== | ||
- | Some people have reported problems logging into the wiki. There seems to be two sources of problems experienced: | ||
- | |||
- | * User cannot log in. | ||
- | * User cannot log in using " | ||
- | |||
- | If you are confident you are using the correct username and password, and are using a version of Internet Explorer, it is suggested that you use a different browser, such as Firefox, Safari, or Chrome. | ||
- | |||
- | If the " | ||
- | |||
- | * Uncheck "Use Secure Login" | ||
- | * Change your password to something that doesn' | ||
- | |||
- | ======Syntax====== | ||
- | For those unfamiliar, here is a page on [[wiki: | ||
- | |||
- | ======Course Notes Wiki====== | ||
- | This is a space for members of the Systems Programming class to create a source of information reflective and assisting to the course. | ||
- | |||
- | Aside from assignments that may have you specifically perform operations here, you should contribute when you encounter any of the following: | ||
- | |||
- | * Some neat bit of information related to the class | ||
- | * Some clarification or understanding you've had with respect to concepts in the class | ||
- | * Organizational/ | ||
- | * Questions you have that may deserve a more visual answer | ||
- | |||
- | ==How To Compile a SDL .c file== | ||
- | * gcc -Wall --std=gnu99 -o desiredfilename filename.c -lSDL | ||
- | * (Please note that the letter after the dash IE:" | ||
- | ==How to compile with a SDL_image.h Header Included== | ||
- | *gcc -Wall --std=gnu99 -o desiredfilename filename.c -lSDL -lSDL_image | ||
- | |||
- | ==Multi-File C SDL Programs== | ||
- | * compile the first two c files | ||
- | - gcc -Wall --std=gnu99 -c firstfile.c | ||
- | - gcc -Wall --std=gnu99 -c secondfile.c | ||
- | * combine the generated files with the header file | ||
- | - gcc -Wall --std=gnu99 -o desiredname firstfile.o secondfile.o -lSDL -lSDL_image | ||
- | |||
- | ***Protip: Put these within a bash/ | ||
- | |||
- | |||
- | ==Linking everything together== | ||
- | If you ever are curious on the information on how everything is working with using SDL functions you can explore them! The file path is **/ | ||
- | Remember you can also see man pages on these ex: **man SDL_BlitSurface** | ||
- | |||
- | ==Important info when blitting== | ||
- | Make sure when you blit an image onto a surface that both the image and surface have compatible formats such as 32-bit as this wastes useful processing power switching the formats around if they are not the same. Also, once you are done with the image, be sure to release the allocated memory that you worked with during the application. | ||
- | |||
- | ==Sounds and SDL== | ||
- | If you'd like to play a sound through SDL, it's best to use the extension library SDL_mixer. There are two basic types of sound in the SDL_mixer: Mix_Music for songs and music, and Mix_Chunk for sound effects such as footsteps or voice lines. As for actually playing said audio, you should use the function " | ||
- | |||
- | ==SDL important functions== | ||
- | |||
- | -The SDL_GetMouseState(int *x int *y) function allows the user to receive any information on both the buttons being pressed and the location of the mouse with the SDL_BUTTON() macros and the x and y integers respectfully. | ||
- | |||
- | -The SDL_GetKeyState(int *numkeys) points the numkeys pointer at an array indexed with SDLK_* symbols. Each pointer in the array corresponds with a button on the keyboard. If the value is 1, the key is pressed and the opposite for if the value is 0. It is important to note that the returned pointer should not be freed by the caller as it is a pointer to an internal SDL array. | ||
- | |||
- | ======Game implementations====== | ||
- | |||
- | ===Impossible Game/Square Dash(pending name) by Brandon and Billy=== | ||
- | ==Concept== | ||
- | You are a square that constantly speeds to the | ||
- | right. With only the ability to jump, you must | ||
- | maneuver around the obstacles that may cause you | ||
- | harm. | ||
- | ==Possible Obstacles== | ||
- | * walls | ||
- | * spikes | ||
- | * portals | ||
- | * reversed gravity zones | ||
- | * pits | ||
- | * Ice/ | ||
- | |||
- | ==IDK what i'm doing yet (Pending ideas) by Josh== | ||
- | ==Concepts== | ||
- | |||
- | + Side/ | ||
- | |||
- | + Physics based moon/ | ||
- | |||
- | + Single screen mouse-click shooter, in the vein of early browser-based flash shooters | ||
- | |||
- | Will post finalized idea here, working stuff out on paper | ||
- | =====DokuWiki wrap plugin===== | ||
- | http:// |