The console provides a command-line interface for the advanced configuration of Source games. Just about any configuration task can be completed from the console, and in fact many have to be.
Sep 08, 2018 here you go snake game 🙂 Things you need to do are: Copy the code below; Paste into your desired environment (dev c, visual studio) compile and run Source Code Snake Game Using C: #include #include void run; void printMap; void initMap; void move(int dx, int dy); void update; void changeDirection(char key). Apr 09, 2017 C Game Tutorial - Simple C Space Shooter Game - for Beginner to learn basics of game programming. Without using graphics/graphics.h and pointers with audio effects with source code.
Enabling the console
The console starts disabled by default. To enable it, load the game and visit Options > Keyboard > Advanced. There will be a pop-up that will include two options, one of them labeled 'Enable Developer Console'. Once enabled, it can be opened and closed by pressing the button above Tab ⇆, known as the 'tilde.' ~
-console
to the game's launch options to force it to open. Once open, type bind your_key toggleconsole
to add a new binding and fix it in the future. Replace your_key with the key you wish to open the console with.Submitting
The grey box across the bottom of the console window is where commands are entered. They come in two forms: commands and variables. Commands are simply keywords, but variables ('cvars') require a value of some sort before they are accepted. When setting a cvar you might type something like this :
When you've finished typing, hit Return or ↵ Enter to submit. You'll see everything you type 'echoed' to the console with a preceding ]
.
A few notes:
- Multiple values are separated with spaces. If a value contains a space, surround it with quote marks. (e.g.
say 'Hello everyone on the server'
.) - The console will suggest commands and sometimes values in a pop-out box beneath the input field. Press ↑/↓ to navigate the list and Tab ⇆ to accept the highlighted suggestion.
- Only 'archived' cvars are stored after the game closes. Use autoexec if you want to set any others when a game loads.
- Some commands are serverside, others clientside. In multiplayer you can only set clientside ones.
- There are many command prefixes. The most common are
cl
('clientside') andsv
('serverside').
Useful commands
find <term>
find
command searches console command names and descriptions for the term you provide.find_ent <term>
help <command name>
Google Play Console Dev
sv_cheats <boolean>
sv_cheats 1
to unlock them. noclip
sv_cheats
to be set to 1.developer <0-2>
2
, the last few lines of console output will be printed at the top of the screen as well.con_log <file>
condump
con_log
writes output constantly, while C Game Dev Console Game
condump
records only when invoked. con_log
if you run up against this.See also
C Game Dev Console 2017
- Developer Console Control - for programmers
- Console Command List - partial list of console commands and variables
- Category:Console Commands - list of written articles for console commands
- Category:Console Variables - list of written articles for console variables