
CARLOS GUTIERREZ | Game Designer
Princess Marshmallow's
Super Happy Fun-time Swap
Platform:
PC
Tools Used:
Duration:
~3 weeks (2014)
Role:
Programmer

Overview
Princess Marshmallow's Super Happy Fun-time Swap is a program I wrote with basic tile-swapping gameplay and shader tinkering. All assets (with the exception of the tile images) are not created by me nor do I claim to own them. I wanted try and utilize shaders as much as possible to make up for a small number of art assets.
Conserving Assets
I wanted to keep the game visually appealling to the player, but I didn't have the time to create or gather numerous art assets to use in the game. I decided I'd keep a small number of assets visually interesting by applying various shaders and transitions to them during certain instances of the game. The total number of background assets used in the project were 3 and, with the use of shaders, I was able to apply them across 7 game states.
![]() Title ScreenThis image was used in the main menu. |
---|
![]() Startup ScreenThe startup screen is similar to the main menu background. I remedy this with a grayscale shader (see video). |
![]() Game ScreenThe game screen gets a transparent black overlay when the player pauses the game. |
![]() Credits ScreenThis image is used for the credits screen and the options screen. I used a GBR shader to make the options screen much more varied. |
![]() Controls Screen EnglishSample of the controls screen. There is also spanish built into the game. |
State Machine and Shaders
I created a state machine to handle the different menu screens during gameplay and a texture array to hold the different backgrounds. The state machine triggered functions that then told the texture array which asset to load as well as which shader effect to apply on said asset. An issue I faced was getting the shaders to apply after one had been used previously. To fix this, I modified the draw function to follow the same logic as the state machine and draw when states are changed.
![]() State Machine VariablesI manage the backgrounds via a state machine and 2D texture array that is handled with enum values. |
---|
![]() Backgrounds LoadingI load the textures into the normal variables first then I add them to the background array. |
![]() State Machine InitializeI start the state machine at the startup screen because that's how most/all programs start. |
![]() State Machine UpdateThe state of the game is tracked In the main update function of the program. From there other functions tell the program to draw and update other variables. |
![]() State Machine DrawThe draw function handles drawing the different backgrounds and applying shaders to the assets if it is not done in the nested function. |
![]() ShaderThis is the code for the different shader effects I used. |
Post-Mortem
My original graphic goals for this project were out of scope when factoring in the gameplay portion of the project. I didn't have any experience creating tile-swap games and, at the time of the project, was still refining my graphics programming skills. I needed to balance my skills with my ambitions.
If I could return to the project I'd simplify the gameplay portion much more so there could be more time for graphics work. I'd also experiment more with particle effects. I was satisfied with the different shaders placed on menu assets, but there weren't enough particles and shader usage in-game.