• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:32
CEST 15:32
KST 22:32
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Weekly Cups (June 30 - July 6): Classic Doubles1[BSL20] Non-Korean Championship 4x BSL + 4x China7Flash Announces Hiatus From ASL64Weekly Cups (June 23-29): Reynor in world title form?13FEL Cracov 2025 (July 27) - $8000 live event22
StarCraft 2
General
Weekly Cups (June 30 - July 6): Classic Doubles Program: SC2 / XSplit / OBS Scene Switcher The SCII GOAT: A statistical Evaluation Statistics for vetoed/disliked maps Weekly Cups (June 23-29): Reynor in world title form?
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
SC uni coach streams logging into betting site BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps Flash Announces Hiatus From ASL Player “Jedi” cheat on CSL
Tourneys
[BSL20] Grand Finals - Sunday 20:00 CET [BSL20] Non-Korean Championship 4x BSL + 4x China CSL Xiamen International Invitational The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2024! Summer Games Done Quick 2025!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 721 users

Game Programming Primer - Page 4

Forum Index > General Forum
Post a Reply
Prev 1 2 3 4 5 6 7 Next All
Deezl
Profile Blog Joined November 2010
United States355 Posts
November 21 2012 03:14 GMT
#61
If you're ever interested in a job in technical writing, let a brotha know.
Three hundred lives of men I have walked this world, and now I have no time.
Ender2701
Profile Blog Joined January 2012
United States581 Posts
November 21 2012 04:29 GMT
#62
Wow really nice article! Definitely will recommend to any friends that are interested into getting into industry game programming. I learned a bit from the generic coding in C article and I've been doing game development in C++/C for several years
]343[
Profile Blog Joined May 2008
United States10328 Posts
November 22 2012 05:00 GMT
#63
Wow, all I need to do is learn graphics and find a physics engine, and I can write my own games too!

Nice guide
Writer
4tre55
Profile Joined June 2011
Germany330 Posts
November 22 2012 10:44 GMT
#64
Just bought "Code" because of your guide an it's an amazing book, thanks a lot for the recomandation.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
November 22 2012 19:09 GMT
#65
On November 22 2012 19:44 4tre55 wrote:
Just bought "Code" because of your guide an it's an amazing book, thanks a lot for the recomandation.

Very awesome! I loved that book, read it twice.
kollin
Profile Blog Joined March 2011
United Kingdom8380 Posts
November 22 2012 20:30 GMT
#66
Out of interest, Cecil, what compiler do you use for coding? Having trouble finding the 'right' one :/
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
November 22 2012 20:34 GMT
#67
On November 23 2012 05:30 kollin wrote:
Out of interest, Cecil, what compiler do you use for coding? Having trouble finding the 'right' one :/

I like gcc/g++ and VS 2010. I'd recommend VS Express 2010.
kollin
Profile Blog Joined March 2011
United Kingdom8380 Posts
November 22 2012 20:53 GMT
#68
On November 23 2012 05:34 CecilSunkure wrote:
Show nested quote +
On November 23 2012 05:30 kollin wrote:
Out of interest, Cecil, what compiler do you use for coding? Having trouble finding the 'right' one :/

I like gcc/g++ and VS 2010. I'd recommend VS Express 2010.


Alright thanks, I took a look at VS 2008 I think, but some of the UI felt a bit weird to what I'd used before, but I'll definitely check out both those recommendations! :D
Chronopolis
Profile Joined April 2009
Canada1484 Posts
Last Edited: 2012-11-23 06:43:32
November 23 2012 06:42 GMT
#69
O ..................... O

_______________
|.........................|
|.........................|
|.........................|
|.........................|
|.........................|
| ______________|

Too long, will read.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
November 23 2012 15:48 GMT
#70
On November 23 2012 05:30 kollin wrote:
Out of interest, Cecil, what compiler do you use for coding? Having trouble finding the 'right' one :/

You don't use a compiler for coding, you use a text editor or an integrated development environment (IDE) which usually consists of a text editor, a compiler and lots of other helpful tools. Visual Studio is an IDE, gcc/g++ is just a compiler. If you're more of a linux/command line guy, vim with the right plugins is supposed to be good. For typical Windows users, Visual Studio is very good.
Afaik Eclipse is somewhat popular too, and I often use it when I am working on a Linux system, but I find it to be just an inferior version of Visual Studio (I'm not exactly good with the command line style editors).

For C/C++ you usually don't really need a fancy IDE though as long as you have syntax checking and code completion.
If you have a good reason to disagree with the above, please tell me. Thank you.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
November 23 2012 18:38 GMT
#71
What a shitty text...............JUST KIDDING, THIS WAS FUCKING AMAZING!!! Thanks a LOT!!!
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
Spikeke
Profile Joined October 2010
Canada106 Posts
November 23 2012 18:44 GMT
#72
Covered more general programming than actual game programming, but it was still a good refresher. For those who think this is a lot... This isn't even scratching the surface. That's one thing I enjoy about game development though, it's like a never ending rabbit hole. Always something new to learn or new tech to play with.
Lorizean
Profile Blog Joined March 2011
Germany1330 Posts
November 25 2012 18:39 GMT
#73
On November 23 2012 04:09 CecilSunkure wrote:
Show nested quote +
On November 22 2012 19:44 4tre55 wrote:
Just bought "Code" because of your guide an it's an amazing book, thanks a lot for the recomandation.

Very awesome! I loved that book, read it twice.


Haha, I bought it too and it is pretty amazing indeed.

About the compilers: you will want to use gcc (g++) on gnu/linux. For Windows you have a choice between the microsoft compiler included in visual studio or MingW (a gcc port for windows).
Or you can use the Intel compiler (parallel xe) on both platforms.
Microsoft and Intel cost money though, but you can get free access as a student or for non-commercial use.

As for IDE i quite liked codeblocks (linux+windows, option to come coupled with mingW/gcc) or you can use visual studio for the microsoft/intel compilers.
Personally I use vim with g++ on linux and I can say that learning to use vim was very worth it, but it takes time to get used to it. So if you just want to code some small c++ program its probably not worth your while to learn it.
Ender2701
Profile Blog Joined January 2012
United States581 Posts
Last Edited: 2012-11-26 06:38:26
November 26 2012 06:38 GMT
#74
On November 26 2012 03:39 Lorizean wrote:
Show nested quote +
On November 23 2012 04:09 CecilSunkure wrote:
On November 22 2012 19:44 4tre55 wrote:
Just bought "Code" because of your guide an it's an amazing book, thanks a lot for the recomandation.

Very awesome! I loved that book, read it twice.


Haha, I bought it too and it is pretty amazing indeed.

About the compilers: you will want to use gcc (g++) on gnu/linux. For Windows you have a choice between the microsoft compiler included in visual studio or MingW (a gcc port for windows).
Or you can use the Intel compiler (parallel xe) on both platforms.
Microsoft and Intel cost money though, but you can get free access as a student or for non-commercial use.

As for IDE i quite liked codeblocks (linux+windows, option to come coupled with mingW/gcc) or you can use visual studio for the microsoft/intel compilers.
Personally I use vim with g++ on linux and I can say that learning to use vim was very worth it, but it takes time to get used to it. So if you just want to code some small c++ program its probably not worth your while to learn it.


If you're coding on linux, I'd suggest emacs and g++, but since you're doing game programming you're probably using Windows. If you're going to use Windows, I'd suggest Visual Studio and Visual Assist X. Visual Assist X is probably the greatest IDE add on I've ever used, really good for large C++ projects, I used it when I was doing game programming for First Playable and it was awesome.

No matter what I'd suggest learning + using emacs hotkeys. It makes editing text so much faster. The only downside is that you'll constantly be frustrated when other things don't have emacs hotkeys and you accidentally open 10 new windows.
iaretehnoob
Profile Joined June 2004
Sweden741 Posts
November 26 2012 13:49 GMT
#75
And if you get Visual Studio, get VS 2012 (unless you're stuck on Win XP). C++11 support should be enough to convince anyone. Also syntax-highlighting/intellisense seems to have improved at some point, I remember VA X being somewhat of a must have in the past, but I haven't missed it in the last few months.

Clang is another good compiler choice, competing with gcc, just really not as widespread.
Random()
Profile Blog Joined August 2004
Kyrgyz Republic1462 Posts
Last Edited: 2012-11-30 19:01:36
November 27 2012 18:43 GMT
#76
While this is a great article, I think you are overemphasizing the "internals" of game programming. Those parts that work with the hardware and all the low-level implementation details are, of course, quite important, but in all honesty they have little to do with your actual game.

When you look at it this way, then game development (as in implementing the actual gameplay mechanics) is very often done in a higher-level language. People use all sorts of languages (Python, Lua, Java, C#, ...) to abstract themselves away from the engine internals and the horrors of C++, and that is a very good thing. Writing good C++ programs is extremely difficult, and even the state-of-the-art engines written by the most talented programmers in the world are ridden with bugs. C++ programs written by average programmers are a minefield.

So unless you are determined to be a very technical sort of developer, working on the engine, I don't agree that you HAVE to use C++ for game development, in fact I would argue that you should try to avoid it at all if that is possible within your workflow.

Also, you write "there are a few different simple guidelines that one can follow to ensure their code isn’t running sub-optimally" as if running sub-optimal code is something to be ashamed of. Saying such things, especially to new programmers, is a recipe for disaster. Premature optimization is the root of all evil, and for whatever reason many people really seem to like spending their effort "optimizing" absolutely unimportant stuff which they don't even know to be the bottleneck, while at the same time their program is not working correctly overall.

EDIT: please take this as my personal rambling and wishful thinking. Reality is, as people have pointed out, that you will be most likely expected to know C++ if you are going to apply for a game programming job.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
November 27 2012 20:29 GMT
#77
On November 28 2012 03:43 Random() wrote:
While this is a great article, I think you are overemphasizing the "internals" of game programming. Those parts that work with the hardware and all the low-level implementation details are, of course, quite important, but in all honesty they have little to do with your actual game.

When you look at it this way, then game development (as in implementing the actual gameplay mechanics) is very often done in a higher-level language. People use all sorts of languages (Python, Lua, Java, C#, ...) to abstract themselves away from the engine internals and the horrors of C++, and that is a very good thing. Writing good C++ programs is extremely difficult, and even the state-of-the-art engines written by the most talented programmers in the world are ridden with bugs. C++ programs written by average programmers are a minefield.

So unless you are determined to be a very technical sort of developer, working on the engine, I don't agree that you HAVE to use C++ for game development, in fact I would argue that you should try to avoid it at all if that is possible within your workflow.

Also, you write "there are a few different simple guidelines that one can follow to ensure their code isn’t running sub-optimally" as if running sub-optimal code is something to be ashamed of. Saying such things, especially to new programmers, is a recipe for disaster. Premature optimization is the root of all evil, and for whatever reason many people really seem to like spending their effort "optimizing" absolutely unimportant stuff which they don't even know to be the bottleneck, while at the same time their program is not working correctly overall.

I can understand why you'd want to shy from encouraging C++, but if you want a job being very good at C++ is the best way I know of. Sure, the everyday workflow of the position you might get may or may not be using C++, but that's besides the point if you want the best chances of hire. Just go check out all the various game programming or software engineering positions offered from studios; pretty much every one requires excellent C++ skills.

As for optimization, I only talked about delayed construction and said not to pass-by-value. These are the sort of things I learned my first semester working in C. They aren't really something you can get lost in while programming in a bad way as you'll be learning fundamentals essential to programming in general.
ClysmiC
Profile Blog Joined December 2010
United States2192 Posts
November 28 2012 04:35 GMT
#78
This is AWESOME. I'm learning Java right now, but I took a little detour learning some C++ and this will definitely help. Can't wait to read this over the next few days. Looks like a great write-up!
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2012-11-28 16:56:57
November 28 2012 16:56 GMT
#79
On November 28 2012 05:29 CecilSunkure wrote:
As for optimization, I only talked about delayed construction and said not to pass-by-value. These are the sort of things I learned my first semester working in C. They aren't really something you can get lost in while programming in a bad way as you'll be learning fundamentals essential to programming in general.

Not using pass by value to improve speed is a trap too. Sometimes you want to pass by value, sometimes you don't.
See: http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/


Generally you never even want to think of optimization until after you ran a detailed performance analysis. Before that point all your efforts should be spent on producing simple, readable, understandable, reusable, testable and maintainable code.
If you have a good reason to disagree with the above, please tell me. Thank you.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
November 28 2012 18:48 GMT
#80
On November 29 2012 01:56 spinesheath wrote:
Show nested quote +
On November 28 2012 05:29 CecilSunkure wrote:
As for optimization, I only talked about delayed construction and said not to pass-by-value. These are the sort of things I learned my first semester working in C. They aren't really something you can get lost in while programming in a bad way as you'll be learning fundamentals essential to programming in general.

Not using pass by value to improve speed is a trap too. Sometimes you want to pass by value, sometimes you don't.
See: http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/


Generally you never even want to think of optimization until after you ran a detailed performance analysis. Before that point all your efforts should be spent on producing simple, readable, understandable, reusable, testable and maintainable code.

You know, intentionally setting up RVO is in and of itself programming while being mindful of optimizations. Some optimization really is just low hanging fruit you can be sure of.
Prev 1 2 3 4 5 6 7 Next All
Please log in or register to reply.
Live Events Refresh
Wardi Open
11:00
#43
WardiTV1293
OGKoka 550
Harstem428
IndyStarCraft 169
Rex167
CranKy Ducklings122
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
OGKoka 581
Harstem 434
Rex 174
IndyStarCraft 174
Hui .170
StarCraft: Brood War
Bisu 2658
Jaedong 2250
Flash 1930
Hyuk 1216
EffOrt 804
firebathero 652
Larva 497
actioN 389
ZerO 375
Soulkey 358
[ Show more ]
Snow 353
Stork 349
Soma 246
GuemChi 161
Pusan 120
Light 100
Mind 100
JulyZerg 81
hero 76
PianO 74
TY 54
sSak 54
Sharp 49
Sea.KH 44
Barracks 40
sorry 34
Aegong 33
Free 27
Movie 25
zelot 23
soO 22
GoRush 21
JYJ20
HiyA 20
yabsab 20
Terrorterran 13
IntoTheRainbow 12
Shine 8
ivOry 6
Dota 2
qojqva3075
Gorgc2122
XaKoH 621
XcaliburYe319
syndereN307
League of Legends
singsing2548
Counter-Strike
byalli267
markeloff108
Super Smash Bros
Mew2King174
Other Games
B2W.Neo1138
hiko1097
crisheroes372
Lowko294
Beastyqt293
ArmadaUGS124
Liquid`VortiX77
ZerO(Twitch)19
Organizations
Other Games
gamesdonequick37273
StarCraft: Brood War
UltimateBattle 898
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2899
• WagamamaTV298
League of Legends
• Nemesis5940
Upcoming Events
RotterdaM Event
2h 28m
Replay Cast
10h 28m
Sparkling Tuna Cup
20h 28m
WardiTV European League
1d 2h
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
1d 10h
The PondCast
1d 20h
WardiTV European League
1d 22h
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
uThermal 2v2 Circuit
2 days
Replay Cast
2 days
RSL Revival
2 days
ByuN vs SHIN
Clem vs Reynor
[ Show More ]
Replay Cast
3 days
RSL Revival
3 days
Classic vs Cure
FEL
4 days
RSL Revival
4 days
FEL
4 days
FEL
5 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
6 days
BSL20 Non-Korean Champi…
6 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Liquipedia Results

Completed

BSL Season 20
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.