'F' → Fullscreen
Work through the tasks in order. Task 1 gets the tools onto your machine; everything after that happens in one file named 1-1-welcome.
Nothing today asks you to write C# from scratch. You are changing values inside a program that already runs, which is the fastest honest way to find out what the pieces do.
If something fails, the setup page has a section for each thing that commonly goes wrong. Work that list first — then ask, with the exact message that is on your screen.
Two lines are highlighted below. They are the only lines you touch today. Read the rest, notice that it is unfamiliar, and leave it alone.
#:package Raylib-cs@8.0.0
using Raylib_cs;
int screenWidth = 800;int screenHeight = 600;
Raylib.InitWindow(screenWidth, screenHeight, "Hello, Raylib!");Raylib.SetTargetFPS(60);
while (!Raylib.WindowShouldClose()){ Raylib.BeginDrawing(); Raylib.ClearBackground(Color.Black); Raylib.DrawText("Hello, World!", 320, 285, 24, Color.SkyBlue); Raylib.EndDrawing();}
Raylib.CloseWindow();One change at a time, and run after each one. Five changes made together give you one result and no way to tell which change caused what.
Any of these names work in place of Color.SkyBlue:
Black · White · RayWhite · Gray · DarkGray · LightGray · Red · Maroon · Green · DarkGreen · Lime · Blue · DarkBlue · SkyBlue · Yellow · Gold · Orange · Pink · Purple · Violet · Beige · Brown · Magenta
#:package Raylib-cs@8.0.0
using Raylib_cs;
int screenWidth = 800;int screenHeight = 600;
Raylib.InitWindow(screenWidth, screenHeight, "Hello, Raylib!");Raylib.SetTargetFPS(60);
while (!Raylib.WindowShouldClose()){ Raylib.BeginDrawing(); Raylib.ClearBackground(Color.Black); Raylib.DrawText("ANTHONY", 300, 300, 48, Color.RayWhite); Raylib.EndDrawing();}
Raylib.CloseWindow();Text is drawn from its top-left corner, not from its middle. A larger font size grows down and to the right, so text that fit a moment ago can run off the edge. That is not a mistake in your program — it is what those numbers mean, and it is why the threshold exists.
Your threshold is not the same as your neighbor's. A longer name runs out of room sooner, so the number you write down depends on your own name and where you put it. There is nothing to copy here.
Two new instructions, and their arguments follow the same pattern:
| Instruction | Arguments, in order |
|---|---|
DrawText | text, left, top, font size, color |
DrawCircle | center across, center down, radius, color |
DrawRectangle | left, top, width, height, color |
Order matters here, and it will catch you once. Whatever is drawn later covers what was drawn earlier. Put a shape after your name and it sits on top of it.
#:package Raylib-cs@8.0.0
using Raylib_cs;
int screenWidth = 800;int screenHeight = 600;
Raylib.InitWindow(screenWidth, screenHeight, "Welcome");Raylib.SetTargetFPS(60);
while (!Raylib.WindowShouldClose()){ Raylib.BeginDrawing(); Raylib.ClearBackground(Color.DarkBlue);
Raylib.DrawCircle(400, 200, 90, Color.Gold); Raylib.DrawRectangle(250, 380, 300, 8, Color.RayWhite);
Raylib.DrawText("ANTHONY", 300, 300, 48, Color.RayWhite); Raylib.DrawText("AP CSP - Period 3", 300, 420, 20, Color.SkyBlue);
Raylib.EndDrawing();}
Raylib.CloseWindow();That second break produces three errors from one mistake, and the last of them names a line you never edited. Fix the first error, then run again — do not work down the list. Once the compiler loses its place, everything it says after the real mistake is a guess.
Nothing you can type here will damage your computer. A program that will not build simply does not run. Breaking something on purpose, while you still know exactly what you broke, is the cheapest way to learn what these messages mean.
Before you submit, check all five:
The fourth one is the one that matters. A window that looks right is easy to produce by changing numbers until something happens. Being able to name the line that drew each piece is the difference between that and understanding it.
Answer the following questions before submitting your work.
while. What did you actually have to understand in order to make your changes work?Submit four things to the dropbox:
A wrong prediction is worth as much as a right one here, as long as you wrote it down first and then said what actually happened. Predictions edited afterward to match the result are the one thing that defeats the exercise.
Also assigned today: the syllabus quiz, online, due any time in the next week.