• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 18:05
CET 00:05
KST 08:05
  • 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
herO wins SC2 All-Star Invitational10SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0
Community News
Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion8Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)17Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7
StarCraft 2
General
herO wins SC2 All-Star Invitational Starcraft 2 will not be in the Esports World Cup PhD study /w SC2 - help with a survey! SC2 Spotted on the EWC 2026 list? When will we find out if there are more tournament
Tourneys
$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) OSC Season 13 World Championship $70 Prize Pool Ladder Legends Academy Weekly Open! SC2 All-Star Invitational: Jan 17-18 Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Simple Questions Simple Answers
Custom Maps
[A] Starcraft Sound Mod
External Content
Mutation # 509 Doomsday Report Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone
Brood War
General
Which foreign pros are considered the best? [ASL21] Potential Map Candidates BW General Discussion BW AKA finder tool Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues [BSL21] Non-Korean Championship - Starts Jan 10 Small VOD Thread 2.0 Azhi's Colosseum - Season 2
Strategy
Current Meta Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Game Theory for Starcraft
Other Games
General Games
Battle Aces/David Kim RTS Megathread Nintendo Switch Thread Stormgate/Frost Giant Megathread Beyond All Reason Awesome Games Done Quick 2026!
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread NASA and the Private Sector Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Navigating the Risks and Rew…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1432 users

Game Programming Primer - Page 2

Forum Index > General Forum
Post a Reply
Prev 1 2 3 4 5 6 7 Next All
PassiveAce
Profile Blog Joined February 2011
United States18076 Posts
Last Edited: 2012-11-17 17:37:25
November 17 2012 17:35 GMT
#21
many things in C and C++ are hidden away from the developer and in turn makes them slower. Having slow code isn’t acceptable for high performance real-time applications such as games.

Hey Cecil, is this a typo also? the sentence seems contradictory in relation to the rest of the paragraph. This sentence comes from the "goals of the article" section at the top.

once again, this guide is truly incredible, thanks for taking the time to writing it : )))
Call me Marge Simpson cuz I love you homie
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
November 17 2012 17:42 GMT
#22
On November 18 2012 02:35 PassiveAce wrote:
Show nested quote +
many things in C and C++ are hidden away from the developer and in turn makes them slower. Having slow code isn’t acceptable for high performance real-time applications such as games.

Hey Cecil, is this a typo also? the sentence seems contradictory in relation to the rest of the paragraph. This sentence comes from the "goals of the article" section at the top.

once again, this guide is truly incredible, thanks for taking the time to writing it : )))

Haha yes definitely a typo, thanks for pointing it out. Should say something like "many things in interpreted and other high level languages", not C and C++.
Gorlin
Profile Joined November 2010
United States2753 Posts
November 17 2012 17:50 GMT
#23
Sweet, thanks a ton for this!
akarin
Profile Joined February 2011
Ireland42 Posts
November 17 2012 19:43 GMT
#24
This looks so sweet! I'm really looking forward to reading this later, I have just scanned through it. As a nooby CS student (we covered arrays last week ^^) I am wondering is java used (much) in programming games?

Thanks for writing this Cecil!
jca2 *
Profile Joined March 2006
France52 Posts
November 17 2012 19:56 GMT
#25
Very good article. I dont know if i missed it but I didnt see anything about "interfaces" which in C++ are based on abstract classes. It's a very powerfull mechanism that allows a binary to interact with another binary without any implementation knowledge, just a few abstract classes defined in .h files. Which in turn allows for real Component oriented design (infrastructures like COM, CORBA, ActiveX, etc).
APM? Never heard of it...
NeWeNiyaLord
Profile Blog Joined September 2010
Norway2474 Posts
November 17 2012 20:35 GMT
#26
As an aspiring Developer I really appreaciate the effort you've done into this post. When I get time to study it I surely will! Thx Cecil!
This is where we begin. Show your true self, Battosai.
DodgySmalls
Profile Joined June 2012
Canada158 Posts
Last Edited: 2012-11-17 22:12:45
November 17 2012 22:06 GMT
#27
I'll bookmark this and use it along side other references to try to get a "fresh" perspective when I have a problem.

Pretty awesome amount of content in this, given that it's relatively short and covers so many topics.

edit:
I guess I'd also like to ask what are everyone's thoughts on java? I've seen some examples of how inefficient java can be in comparison to some c code, and it is true that you are denied quite a lot of low level access (pointers anyone? )

I feel like it's a decent medium for a hobbyist, like myself, but I really don't have any argument for why I enjoy coding in Java over c++.
Please remove nyx assassin
ibutoss
Profile Blog Joined June 2005
Australia341 Posts
November 17 2012 22:45 GMT
#28
I like this article. It is well written and even if I'm not that interested in writing a game I found it a useful refresh on many of the concepts I studied at uni but haven't really been exposed to since.

Thanks for writing it! I enjoyed reading it.
Nada got Yooned
Cyx.
Profile Joined November 2010
Canada806 Posts
November 17 2012 22:46 GMT
#29
As someone else who's in a software engineering program hoping to go into game programming, this is really awesome! A lot of the stuff I work in on my second-year courses is exactly the kind of stuff you're talking about which is really helpful.

One thing though - in your section about game engine architecture you use the Source engine as an example of an engine specific to first-person shooters, when in reality Dota 2 (and every other Valve game since HL2 I think) is built on the Source engine. I'm a bit of a Valve fanboy =P
Bombadil819
Profile Joined November 2011
United States45 Posts
November 17 2012 23:25 GMT
#30
Nice article. Also worth mentioning Panda3D and Torque3D as other options for prebuilt game engines. Especially now that T3D is MIT licensed and on Github.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
Last Edited: 2012-11-17 23:51:50
November 17 2012 23:49 GMT
#31
On November 18 2012 04:43 akarin wrote:
This looks so sweet! I'm really looking forward to reading this later, I have just scanned through it. As a nooby CS student (we covered arrays last week ^^) I am wondering is java used (much) in programming games?

Thanks for writing this Cecil!

Sorry, Java isn't used really at all (as far as I know) professionally. I'm always hearing about how people are being interviewed for full-time positions around here (cough cough Microsoft) and are always declined; they don't really know what's going on. I'm sure there's a lot of Java jobs out there, but the kind I'm aiming at are not.

On November 18 2012 07:06 DodgySmalls wrote:
I'll bookmark this and use it along side other references to try to get a "fresh" perspective when I have a problem.

Pretty awesome amount of content in this, given that it's relatively short and covers so many topics.

edit:
I guess I'd also like to ask what are everyone's thoughts on java? I've seen some examples of how inefficient java can be in comparison to some c code, and it is true that you are denied quite a lot of low level access (pointers anyone? )

I feel like it's a decent medium for a hobbyist, like myself, but I really don't have any argument for why I enjoy coding in Java over c++.

I don't use Java, but what all my superiors tell me is that it isn't nearly enough to cut it whenever you have a product that requires heavy optimization.

See for reference: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html
cowsrule
Profile Joined February 2010
United States80 Posts
Last Edited: 2012-11-18 00:29:10
November 18 2012 00:25 GMT
#32
Nice article! Glad to see people documenting their learning progress and sharing their expreience with others.

Sidenote: '#pragma once' is awesome not those crazy header guards .

On November 18 2012 08:49 CecilSunkure wrote:
Show nested quote +
On November 18 2012 04:43 akarin wrote:
This looks so sweet! I'm really looking forward to reading this later, I have just scanned through it. As a nooby CS student (we covered arrays last week ^^) I am wondering is java used (much) in programming games?

Thanks for writing this Cecil!

Sorry, Java isn't used really at all (as far as I know) professionally. I'm always hearing about how people are being interviewed for full-time positions around here (cough cough Microsoft) and are always declined; they don't really know what's going on. I'm sure there's a lot of Java jobs out there, but the kind I'm aiming at are not.

Show nested quote +
On November 18 2012 07:06 DodgySmalls wrote:
I'll bookmark this and use it along side other references to try to get a "fresh" perspective when I have a problem.

Pretty awesome amount of content in this, given that it's relatively short and covers so many topics.

edit:
I guess I'd also like to ask what are everyone's thoughts on java? I've seen some examples of how inefficient java can be in comparison to some c code, and it is true that you are denied quite a lot of low level access (pointers anyone? )

I feel like it's a decent medium for a hobbyist, like myself, but I really don't have any argument for why I enjoy coding in Java over c++.

I don't use Java, but what all my superiors tell me is that it isn't nearly enough to cut it whenever you have a product that requires heavy optimization.

See for reference: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html


Learning java is great, just don't stop there. Once you learn one language (which you CAN use to make games, just possibly not super-awesome AAA titles), it becomes easier to learn a second language.

Android development is java, so there are at least some games written in java. I believe the ever-popular Runescape is also written in java. Most AAA titles for the PC are written in C++ however.
thedeadhaji *
Profile Blog Joined January 2006
39489 Posts
November 18 2012 00:35 GMT
#33
On November 18 2012 02:42 CecilSunkure wrote:
Show nested quote +
On November 18 2012 02:35 PassiveAce wrote:
many things in C and C++ are hidden away from the developer and in turn makes them slower. Having slow code isn’t acceptable for high performance real-time applications such as games.

Hey Cecil, is this a typo also? the sentence seems contradictory in relation to the rest of the paragraph. This sentence comes from the "goals of the article" section at the top.

once again, this guide is truly incredible, thanks for taking the time to writing it : )))

Haha yes definitely a typo, thanks for pointing it out. Should say something like "many things in interpreted and other high level languages", not C and C++.


C hides a lot of stuff away from the developer compared to assembly!
(just this week, we actually had to implement something in Assembly since C was too slow, lol -- this was for an embedded systems environment tho)
Bombadil819
Profile Joined November 2011
United States45 Posts
November 18 2012 00:45 GMT
#34
On November 18 2012 08:49 CecilSunkure wrote:
Show nested quote +
On November 18 2012 04:43 akarin wrote:
This looks so sweet! I'm really looking forward to reading this later, I have just scanned through it. As a nooby CS student (we covered arrays last week ^^) I am wondering is java used (much) in programming games?

Thanks for writing this Cecil!

Sorry, Java isn't used really at all (as far as I know) professionally. I'm always hearing about how people are being interviewed for full-time positions around here (cough cough Microsoft) and are always declined; they don't really know what's going on. I'm sure there's a lot of Java jobs out there, but the kind I'm aiming at are not.

Show nested quote +
On November 18 2012 07:06 DodgySmalls wrote:
I'll bookmark this and use it along side other references to try to get a "fresh" perspective when I have a problem.

Pretty awesome amount of content in this, given that it's relatively short and covers so many topics.

edit:
I guess I'd also like to ask what are everyone's thoughts on java? I've seen some examples of how inefficient java can be in comparison to some c code, and it is true that you are denied quite a lot of low level access (pointers anyone? )

I feel like it's a decent medium for a hobbyist, like myself, but I really don't have any argument for why I enjoy coding in Java over c++.

I don't use Java, but what all my superiors tell me is that it isn't nearly enough to cut it whenever you have a product that requires heavy optimization.

See for reference: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html


Java sees HEAVY use in certain industry, and is capable of being highly performant when the code is written by someone who knows what they're doing. That doesn't mean it's a good intro language, or that it's the right tool for every job. Or that the language design is particularly elegant. But Java-bashing is a popular hobby for not terribly good reasons.
Greem
Profile Blog Joined September 2010
730 Posts
November 18 2012 01:31 GMT
#35
On my to read list ! thx a lot for a such a good work!
youtube.com/N0rthernL1ght
RayzorFlash
Profile Joined December 2010
Canada253 Posts
November 18 2012 06:24 GMT
#36
Bookmarked and saved! The Quick Refresher stuff is SO IMPORTANT and so amazingly well put together. A lot of the fundamentals in there is what people in the industry REALLY look for when hiring and during interviews. This is an amazing review sheet to use before an interview. Thanks a lot!!! :D
jobebob
Profile Joined April 2011
30 Posts
November 18 2012 06:59 GMT
#37
Wow, so much info. This is a good overview of many important concepts in programming.

You should add some info about using revision control systems. These systems are the foundation to managing a project between a group of people, and every programmer needs to learn how to use them.

Git is pretty famous and a really nice system. Github is massive.

Valve uses a system called perforce, which is basically a rev system for more than just code. We used it to store textures, vertex files and all the other things the artists make.

Some more design patterns would be cool too. I find the "Strategy" pattern is really well suited for making a simple game.
Nightsz
Profile Blog Joined February 2011
Canada398 Posts
November 18 2012 07:39 GMT
#38
i will read this one day >.>

BLinD-RawR
Profile Blog Joined April 2010
ALLEYCAT BLUES50607 Posts
November 18 2012 11:10 GMT
#39
holy hell yes, This is so useful for me I will read,reread this a lot as I progress on my own.
Brood War EICWoo Jung Ho, never forget.| Twitter: @BLinDRawR
uZr
Profile Joined April 2011
20 Posts
November 18 2012 12:00 GMT
#40
That's some insane amount of work you put in there, congrats !

However some things are just bugging me.

Arrays cannot be passed around from one location to another directly. If attempted, the name of an array will be converted to a pointer to the first element in the array. This incurs a loss of information, as a pointer stores information about location and type, whereas an array stores location of first element, type of the elements and number of elements. This “feature” of C and C++ can actually be viewed as a “language bug”.

What do you mean by "name of an array will be converted to a pointer" ? Strictly speaking those two things are just the same: pointers. the name[idx] syntax is just some syntaxical sugar over doing *(name+idx). Furthermore the "size of the array" is never stored anywhere in C. You can write it explicitly when allocating on the stack, but it will eventually get lost when compiled, and the compiler won't give you any warning if you access out of bounds entries.
Here's an example:

#include <stdio.h>

int main()
{
int array[] = {1,2,3,4,5};

printf("array[3] = %d | *(array+3) = %d\n",
array[3], *(array+3));

return 0;
}

Running

test % gcc test.c -o test
test % ./test

then outputs

array[3] = 4 | *(array+3) = 4

When asking gcc to output it as assembly (gcc -S -m32 test.c) we get (some parts have been cut) :

_main:
pushl %ebp
movl %esp, %ebp
pushl %esi
subl $52, %esp
call L1$pb
L1$pb:
popl %eax
movl _C.0.1863-L1$pb(%eax), %ecx
movl %ecx, -32(%ebp)
movl (_C.0.1863-L1$pb)+4(%eax), %ecx
movl %ecx, -28(%ebp)
movl (_C.0.1863-L1$pb)+8(%eax), %ecx
movl %ecx, -24(%ebp)
movl (_C.0.1863-L1$pb)+12(%eax), %ecx
movl %ecx, -20(%ebp)
movl (_C.0.1863-L1$pb)+16(%eax), %ecx
movl %ecx, -16(%ebp)
movl -20(%ebp), %ecx
movl -20(%ebp), %edx
movl %esp, %esi
movl %ecx, 8(%esi)
movl %edx, 4(%esi)
leal L_.str-L1$pb(%eax), %eax
movl %eax, (%esi)
call _printf
movl $0, -12(%ebp)
movl -12(%ebp), %eax
movl %eax, -8(%ebp)
movl -8(%ebp), %eax
addl $52, %esp
popl %esi
popl %ebp
ret

Notice how our array entries get accessed:

movl -20(%ebp), %ecx
movl -20(%ebp), %edx
. (then get pushed on the stack later on etc).
As you can see there, both times it is accessed in the same way.

Arrays are just there to lighten up the syntax.

For example, you could want to iterate over a null-terminated char array this way:

void iterate_and_do_nothing(char *str)
{
int i;
while (str[i]) {
++i;
}
}

That's valid, yet on this one the interrest of using an array-type approach is limited ...
Prev 1 2 3 4 5 6 7 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 11h 55m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft418
Nathanias 105
JuggernautJason67
StarCraft: Brood War
Shuttle 232
Artosis 9
Dota 2
syndereN243
Pyrionflax217
LuMiX1
League of Legends
C9.Mang0179
Counter-Strike
fl0m4653
byalli2107
Fnx 1672
rGuardiaN96
Super Smash Bros
hungrybox257
Other Games
summit1g5171
tarik_tv5135
Grubby2232
FrodaN2220
shahzam547
KnowMe40
ZombieGrub30
ViBE11
Liquid`Ken3
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• Hupsaiya 75
• mYiSmile133
• Reevou 3
• IndyKCrew
• Migwel
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• LaughNgamezSOOP
• Laughngamez YouTube
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2963
League of Legends
• Doublelift2724
Other Games
• imaqtpie3547
• Shiphtur212
Upcoming Events
RongYI Cup
11h 55m
ByuN vs TriGGeR
herO vs Rogue
OSC
11h 55m
herO vs Clem
Cure vs TBD
Solar vs TBD
Classic vs TBD
RongYI Cup
1d 11h
Clem vs ShoWTimE
Zoun vs Bunny
Big Brain Bouts
1d 17h
Serral vs TBD
RongYI Cup
2 days
SHIN vs Creator
Classic vs Percival
OSC
2 days
BSL 21
2 days
RongYI Cup
3 days
Maru vs Cyan
Solar vs Krystianer
uThermal 2v2 Circuit
3 days
BSL 21
3 days
[ Show More ]
Wardi Open
4 days
Monday Night Weeklies
4 days
OSC
5 days
WardiTV Invitational
5 days
WardiTV Invitational
6 days
Liquipedia Results

Completed

Proleague 2026-01-20
SC2 All-Star Inv. 2025
NA Kuram Kup

Ongoing

C-Race Season 1
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
OSC Championship Season 13
Underdog Cup #3
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025

Upcoming

Escore Tournament S1: W5
Acropolis #4 - TS4
Acropolis #4
IPSL Spring 2026
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
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 © 2026 TLnet. All Rights Reserved.