This video demonstrates game development using C3 and Raylib, covering key concepts including game initialization with resolution and frame rate settings, shader programming for visual effects like fuel and shield bars, orthographic camera implementation for 2.5D gameplay, and mathematical utilities for game mechanics. The developer explains how to install Raylib for C3, implement player movement controls, create visual feedback systems using shaders, and structure game design documents with menus, audio controls, and save systems.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
I'm making a game with C3 and Raylib
Added:I'm making a game with C3 and Rayib.
Why? Well, why not? I am learning C3 and Rayib at the same time. So, why not have fun and make a little game? I recently realized that gamedev is probably kind of fitting for me. I like coding. I like writing music. And I like playing games sometimes. So, why not combine all those and make my own game just for fun? So, if I go and build and run, this is kind of what it looks like so far. I can move my controller left and right here and it kind of angles and moves. I can move forward.
And then another thing I added was uh a sideways boost. So if I hit the bumpers, it goes fast. You notice the fuel is dropping. Um that was done. It's done with a shader to at least get the color and everything there. And when we're out of fuel, the fuel bar is empty. And I can keep trying to press, but nothing happens actually because it unplugged.
So it doesn't doesn't go anywhere if I keep pressing the bumpers.
And since it's space, the idea is almost no gravity, so it'll keep going. I'm not pressing forward. And it will eventually slow down. Same with left and right. It will just kind of slow down eventually.
Now remember, this is fairly early and so not much is going on yet. pre-alpha, whatever is before alpha, just messing around. So, making a game with C3 and Ray. Um, it was actually pretty easy to get RayB installed for C3. It's vendor C3C, vendor fetch RAIL 6. And that puts that right here in my library here.
So, I have the Ray uh 6.C3L. C3L.
So it has everything almost everything I need all the bindings to call rail functions from C3. Now one of the downsides is that my IntelliSense doesn't really work in Neoim.
So I have to have the uh source open with Ray Lib and the C3 C uh vendor library so I can figure out um let's say I need to let's say make a full screen or something like that. There's got to be more than that. So toggle full screen. I look over in the ray one and it's usually something like underscore full screen and it gives you the, you know, the C the C name coming from the library and I just call toggle full screen in my code. Not to the end of the world, but it is what it is. So this model I actually made in Blender.
Um, I didn't save it and Blender crashed, so I can't um update it. It's fine. It's just a placeholder until I make something better eventually.
And the background is this red planet background I made in Affinity Photo. I think I still have that saved. So, if I wanted to update it, I can. So, if we start in main, I init initialize the game. I initialize the player. I've already done some stuff to make everything broken up. It used to be all all in one source file, but I started breaking up so it makes more sense. So, just like ray, you uh initialize. Let's see what's initialize here. So, initialize the game with uh basically uh 1080p uh and hit the window. Thinking about doing some full screen stuff. Got to load in the background. Uh I have a shader going for the fuel bar and the shield and I set it for 60 frames a second. A lot of this stuff as far as resolution. I'm planning on making a little menu. Speaking of which, um I do have like a game design document. So I I want to have a menu um handle starting the new game. Obviously I got options. I want to be able to allow the user to control music and sound effects. Um each one could be separately and then a overall master volume. Obviously people want to customize their controls. Um game state you can have players, enemies, resources, etc. All that fun stuff. Um player planning on having levels so you can load the game. you could pick up where you left off. So, there's another system I'm going to need is uh something like SQite probably.
Track the points. And I plan on having more than one ship so you can unlock ships later. I don't know if I'm I'm not going to really have a store where you spend real money. It's going to be points from the game. I'm not going down that route. It's just terrible. I hate it. It's icky. I don't want to do it.
Obviously got enemies tracking enemies, shooting at player, and I want to put a little tiny little health bar over the enemies. Um, there's going to be asteroids and other stuff you have to dodge. That's the point of the side left and right boost and moving around. So, yeah, just uh load everything in. Um, a lot of magic numbers I still have to update. Everything's just uh magic numbers all over the place. This is just a grid so I can you can see the movement. I don't have anything in the game yet except for the grid and the player and some a heads up display with the fuel and the shield. So, the grid is nice so you can see it um see the player moving. That's where this uh all these bars, the grid is that you can see as you move forward, the grid moves.
And the background is supposed to parallax, but apparently it only wants to parallax if I'm going left and right, which is kind of strange. So, I have to figure that out. Now, so far, the crazy thing for me is actually the shaders since um I don't really know much about shaders. I I'm learning as I go. So basically all my shader doing for the field bar so far is just the color and I am getting basically getting the color from ray liib which is done in shaders here. So for the shield bar as a player starts using fuel the color is going to change from green to yellow to red. And I just put those right into the uh shader. Um there's a a location of bar color which we just saw here is bar color. So it looks it up say okay that's that's a shader where I'm going to put this information here which is a what is that ve 4? Yeah uniform vec 4 and then the final color which is the out ve which tells the GPU what color it should be and I'm trying to figure out um the vertex shader to make the shape but as you see it's a rounded I want it to be a rounded rectangle. Um, I don't know if that's super possible with a vertex shader. I think I have to do it in the fragment shader.
Um, so I might just leave it. Um, I'm drawing that I'm actually just drawing the rectangle bar with ray. So I'm just drawing a RL rectangle. Magic numbers here. Again, begin shader mode, then end shader mode. So in the shader, all I'm doing is actually coloring the the bar. It says white, but it's actually pulling in the um RL shader uniform type from this green color location. I'm updating that green that location in the ver the fragment shader, excuse me, and it puts that color in the bar. And so your begin shader mode and end shader mode that is specific to a shader. So for each shader you have, which is has all this information, you have to load a different shader. So, so for the for example the fuel I have a shader specific for that which I pass into this function called shader just to make it easy and uh yeah we draw the shader we do some stuff. So what's fun as soon as that fuel bar gets pretty low the rounded rectangle becomes almost square at the end so it looked funny. So to fix that all I did was make a circle.
So there's a circle at the end and then as soon as there a certain point no more of the rat write a rectangle. I make that disappear and just makes a circle.
So if someone was looking closely and I don't know if you can tell. Let's uh put the fuel down pretty low. Just go back and forth.
Eventually this f this fuel is going to use a booster to go fast too. So as we get close to the end uh you saw that change a little bit, right? So, it went from a rounded rectangle plus a circle all the way to just a circle.
I'm basically going to end up doing the same thing with the shield bar. And um once it gets down to a certain level, I plan on flashing the the fuel bar and shield bar to say, "Hey, you're almost out." There'll be pickups, I think, to uh go ahead and pick up more fuel or whatever. And fun stuff like the camera.
This is orthographic. So, I'm making like a 2.5 uh D game. I don't know, whatever. Um, so it's a fixed camera and the player can speed up, slow down, move left and right, but within the bounds of the window. So, how did I do that?
Again, that's with um Yeah, I had lots of fun with the math a little bit. I wanted to do some more stuff, but I figured I would just keep it simple as possible and just have them move uh left and right and no turning. I didn't want to do some vector math. Um, speaking of which, the um the C3 Raylib 6 library doesn't have Raymath or every single function. So, it's easy as just going to ray's math uh ray ray math header file looking at what they do and basically copy pasting in here. And since C3 allows you to just basically interop with C pretty easily. All I do is some externs and I get uh you know float absolute float value uh the float of you know whichever one of these is the max square root float cosine and sign. So I have some stuff in here in case I want to do some blurping um vector to normalizing adding rotate. Um I didn't end up using these. I did end up using normalized because in the shader here we have the fuel but my bar length was 300 but the fuel is 100. So I need to normalize the 100 to a 300 to 300 value.
So I just made some a utils with some math so I can have those functions when I need them. So yeah, I'm actually kind of having fun spending evenings messing with the C3 and Ray Lib and I'm learning a lot as I go. Kind of learning shaders, just kind of diving in, trying to figure out how to do something and what I should do to do something. Um, it's very new to me. At least the syntax is C like, so it's that's no big deal. It's just learning, okay, how do I do something? Looking it up and realizing, wow, there's a lot of math involved in this. And it's cool. It's fun. Awesome.
Thanks for watching. Be sure to subscribe, like, share, and comment to defeat that Elgo monster.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

Ben Crump dealt MAJOR BLOW after His Own Nolan Wells Autopsy FACT CHECKS him
DeVoryDarkins
50K views•2026-07-23

Gremlin Arrives… While Dorothy May Takes Another Step Forward
The-moons
10K views•2026-07-23

Trump War Chief SCREWS UP by Posting Video Leading Judge to ORDER an EXPLANATION!!!
LegalAFMTN
110K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23