Skip to content

Instantly share code, notes, and snippets.

View GabrielRRussell's full-sized avatar
🏠
Working from home

Gabriel Russell GabrielRRussell

🏠
Working from home
  • South Carolina
View GitHub Profile

Cookie Clicker 3DS

Cookie Clicker 3DS is a replica of the original cookie clicker.

Gameplay

You can press the X button to get cookies. Once you gain enough cookies, you can purchase a building. Buildings slowly gain cookies over time. Your goal is to get as many cookies as possible. Once you get a ton of cookies, you can buy upgrades. Upgrades make your buildings more efficient

Installation

@GabrielRRussell
GabrielRRussell / main.c explanation
Created June 14, 2017 18:46
Write up of printing to screen in Cookie Clicker 3DS
In Cookie Clicker 3DS, writing to the screen is fairly simple, but was a challenge to start off with as I had no knowledge of C.
In particular, screens. I have three screens so far: Shop, Home, and Config. These screens are selected by moving the arrow button and pressing A, or returning home by pressing B.
There is a variable labelled "screen" as an integer. This keeps track of which screen I use.
When the program decides when to draw something, it will first determine which screen to draw based on the value. If the value is zero, it draws home. If the value is one, it draws the shop. If the value is 2, it will draw the config. After it draws this on the top screen, it will draw the bottom screen (which contains important info).
As for selecting the screens, there is another variable labelled "cursor" stored as an integer. The cursor is incremented by pressing down, and decremented by pressing up.