• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:21
CEST 17:21
KST 00:21
  • 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
TL.net Map Contest #21: Voting7[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Weekly Cups (Oct 6-12): Four star herO65.0.15 Patch Balance Hotfix (2025-10-8)80Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition325.0.15 Balance Patch Notes (Live version)119
StarCraft 2
General
Revisiting the game after10 years and wow it's bad Ladder Impersonation (only maybe) 5.0.15 Patch Balance Hotfix (2025-10-8) TL.net Map Contest #21: Voting How to Block Australia, Brazil, Singapore Servers
Tourneys
WardiTV Mondays RSL Offline Finals Dates + Ticket Sales! SC4ALL $6,000 Open LAN in Philadelphia Crank Gathers Season 2: SC II Pro Teams LiuLi Cup - September 2025 Tournaments
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
BW General Discussion Question regarding recent ASL Bisu vs Larva game [Interview] Grrrr... 2024 Pros React To: BarrackS + FlaSh Coaching vs SnOw BW caster Sayle
Tourneys
[ASL20] Semifinal B SC4ALL $1,500 Open Bracket LAN [Megathread] Daily Proleagues [ASL20] Semifinal A
Strategy
Current Meta Relatively freeroll strategies BW - ajfirecracker Strategy & Training Siegecraft - a new perspective
Other Games
General Games
Dawn of War IV Stormgate/Frost Giant Megathread Nintendo Switch Thread ZeroSpace Megathread Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Men's Fashion Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Series you have seen recently... Anime Discussion Thread Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Rocket League: Traits, Abili…
TrAiDoS
Inbreeding: Why Do We Do It…
Peanutsc
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1192 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
WardiTV Mondays #56
ByuN vs Clem
WardiTV1298
TKL 366
IndyStarCraft 208
Rex135
CranKy Ducklings84
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 366
LamboSC2 219
IndyStarCraft 208
Rex 135
StarCraft: Brood War
Britney 42249
Calm 6377
Rain 3925
Bisu 3462
Horang2 1291
Shuttle 948
Jaedong 851
Light 641
Soma 608
actioN 569
[ Show more ]
Snow 416
Mini 209
sSak 207
Soulkey 202
firebathero 193
Leta 188
hero 177
Hyun 151
ggaemo 106
Aegong 91
ZerO 78
Zeus 74
Killer 74
Sea.KH 62
Sharp 58
JYJ57
sorry 55
ToSsGirL 46
Movie 40
Free 36
Mong 34
Terrorterran 20
Rush 18
Noble 11
Dota 2
Gorgc7134
qojqva3280
XcaliburYe410
Other Games
B2W.Neo705
Lowko390
DeMusliM344
Liquid`VortiX159
Skadoodle129
KnowMe118
QueenE55
Trikslyr26
ZerO(Twitch)12
C9.Mang00
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis7048
• Jankos2119
• TFBlade676
Other Games
• Shiphtur31
Upcoming Events
3D!Clan Event
39m
CranKy Ducklings
18h 39m
Safe House 2
1d 1h
Sparkling Tuna Cup
1d 18h
Safe House 2
2 days
Monday Night Weeklies
3 days
Tenacious Turtle Tussle
5 days
The PondCast
5 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
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.