• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 06:32
CET 12:32
KST 20: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
ByuL: The Forgotten Master of ZvT20Behind the Blue - Team Liquid History Book16Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0224LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2Nexon's StarCraft game could be FPS, led by UMS maker16
StarCraft 2
General
Terran Scanner Sweep ByuL: The Forgotten Master of ZvT Nexon's StarCraft game could be FPS, led by UMS maker How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Weekly Cups (Feb 9-15): herO doubles up
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) LiuLi Cup: 2025 Grand Finals (Feb 10-16) Master Swan Open (Global Bronze-Master 2) WardiTV Team League Season 10
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
Mutation # 513 Attrition Warfare The PondCast: SC2 News & Results Mutation # 512 Overclocked Mutation # 511 Temple of Rebirth
Brood War
General
Gypsy to Korea TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ Ladder maps - how we can make blizz update them? Brood War inspired Terran vs Zerg cinematic – feed
Tourneys
[Megathread] Daily Proleagues Escore Tournament StarCraft Season 1 Small VOD Thread 2.0 KCM Race Survival 2026 Season 1
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates Zealot bombing is no longer popular? Current Meta
Other Games
General Games
ZeroSpace Megathread Path of Exile Diablo 2 thread Nintendo Switch Thread Battle Aces/David Kim RTS Megathread
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
TL Mafia Community Thread Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Ask and answer stupid questions here! Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
Inside the Communication of …
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2519 users

Game proto programming (basic level)

Blogs > 0x64
Post a Reply
0x64
Profile Blog Joined September 2002
Finland4603 Posts
September 02 2012 18:12 GMT
#1
Hey guys,
few weeks ago I posted a little programming feature on particles and some of you were happy.
I was writing today a little prototype as a continuation of my tooth-fairy game and started to think that this might be something worth sharing.

When I write a prototype, I tend to create static helper classes.
These are comparable to what some people do in C with some define.h file containing all the game's global variables.
I do it for assets (Textures, Sounds, Musics) and also for SoundManager functions.
During prototyping, I rarely run close to any kind of hardware limitation (Processing power nor memory usage) and this make it easy to use the same sound from different classes without having to play with references, pointers (depending on what language I use).

You will also want to have your assets named something like "tree1.png" "tree2.png" etc...
So you can load it all in a list in one for loop.
In C# XNA:

List<Texture2D> treeList = new List<Texture2D>();

....

for(int i = 0; i < treeAmount; i++)
{
treeList.Add(Load("tree" + i + ".png"));
}

....

And finally in your forest class, something pseudo like this:

for(Allmytree)
{
canvas.Draw(GraphicStorage.treeList[theTreeIWantYay]);
}


.....

Now the question why would you not want to always do that?

In bigger project, you don't want always all the assets loaded at the same time, it is easier to manage what needs to be loaded if the object themselves take care of the loading.

....

I'll try to write short stuff like this every time something pop up to my mind!

Dump of assembler code from 0xffffffec to 0x64: End of assembler dump.
quirinus
Profile Blog Joined May 2007
Croatia2489 Posts
September 02 2012 18:23 GMT
#2
We need more code on TL!

Keep writing. :D
All candles lit within him, and there was purity. | First auto-promoted BW LP editor.
Roe
Profile Blog Joined June 2010
Canada6002 Posts
September 03 2012 04:15 GMT
#3
I've been learning C# on my own, but I find it hard where to start and where to go. There's just so much to learn, and doing it on my own by trial and error is very tedious. I'd love to make little games, or even some program that could perform statistical calculations (damn school program never seems to work). Any advice?
0x64
Profile Blog Joined September 2002
Finland4603 Posts
September 03 2012 15:10 GMT
#4
On September 03 2012 13:15 Roe wrote:
I've been learning C# on my own, but I find it hard where to start and where to go. There's just so much to learn, and doing it on my own by trial and error is very tedious. I'd love to make little games, or even some program that could perform statistical calculations (damn school program never seems to work). Any advice?


Learning programming is quite tricky on your own. You probably need a good book that you can refer to when you have troubles.
something about object oriented programming to understand the heart of C# and something not too big about the syntax.
Read them quickly, just to know what you can find in them and approximately where.
Then just go through examples, modify them, play a lot with them.
Get to write your own classes quite fast, you should lower the psychological threshold of creating a new class.
Dump of assembler code from 0xffffffec to 0x64: End of assembler dump.
Sawamura
Profile Blog Joined August 2010
Malaysia7602 Posts
Last Edited: 2012-09-03 15:48:48
September 03 2012 15:46 GMT
#5
On September 03 2012 03:23 quirinus wrote:
We need more code on TL!

Keep writing. :D


tl should have a coding section we can share and help tl'ers with their codes .

Edit : At Op I am new to C++ although I studied C language before this . Topics like vector and stl are really confusing to me I have gone through some examples from books however I have hard time applying the concept to use it in programs or system I am designing. Would you be kind to point me to a few good books a newbie should go through to have solid fundamental in C++ ?
BW/KT Forever R.I.P KT.Violet dearly missed ..
fanta[Rn]
Profile Blog Joined October 2004
Japan2465 Posts
Last Edited: 2012-09-03 18:09:10
September 03 2012 18:08 GMT
#6
vector is just a datastructure similar to an array but more convenient (resizes automatically, remove items, searchable, etc.)
0x64
Profile Blog Joined September 2002
Finland4603 Posts
September 03 2012 20:07 GMT
#7
Don't know anymore books about C++.
Yeah Vector is a very confusing and scary name for many.

Dump of assembler code from 0xffffffec to 0x64: End of assembler dump.
Please log in or register to reply.
Live Events Refresh
KCM Race Survival
10:00
Regular season
Kim Chul Min (afreeca) 1173
LiquipediaDiscussion
The PondCast
10:00
Episode 82
CranKy Ducklings31
LiquipediaDiscussion
PiG Sty Festival
09:00
Group A
Maru vs Bunny
Classic vs SHIN
PiGStarcraft889
IndyStarCraft 224
TKL 202
Rex127
IntoTheiNu 14
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft889
IndyStarCraft 224
TKL 202
Lowko134
ProTech131
Rex 127
StarCraft: Brood War
Britney 28216
Horang2 7722
GuemChi 2933
Hyuk 2763
Sea 1358
Bisu 1327
Jaedong 658
Flash 505
ZerO 296
Mini 276
[ Show more ]
BeSt 269
Snow 228
Stork 220
Hyun 185
Last 179
EffOrt 143
Pusan 120
ggaemo 104
hero 103
Light 100
Mong 90
Larva 85
Rush 60
Soulkey 55
sorry 49
Barracks 48
JYJ 36
ToSsGirL 36
Hm[arnc] 35
Sea.KH 35
Mind 30
sSak 29
JulyZerg 29
Free 24
Yoon 22
NaDa 22
scan(afreeca) 21
Icarus 20
Bale 18
910 16
Terrorterran 16
GoRush 15
Movie 12
ZergMaN 11
Dota 2
Gorgc1553
XaKoH 560
XcaliburYe49
canceldota42
Counter-Strike
olofmeister1988
zeus1227
allub248
x6flipin168
edward102
kRYSTAL_58
Heroes of the Storm
Khaldor142
Other Games
singsing2528
Liquid`RaSZi985
B2W.Neo335
crisheroes215
Fuzer 101
Mew2King87
Trikslyr28
Organizations
Other Games
gamesdonequick569
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• StrangeGG 74
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1409
Upcoming Events
WardiTV Winter Champion…
28m
OSC
28m
Replay Cast
12h 28m
PiG Sty Festival
21h 28m
Clem vs Percival
Zoun vs Solar
Escore
22h 28m
Epic.LAN
1d
Replay Cast
1d 12h
PiG Sty Festival
1d 21h
herO vs NightMare
Reynor vs Cure
CranKy Ducklings
1d 22h
Epic.LAN
2 days
[ Show More ]
Replay Cast
2 days
PiG Sty Festival
2 days
Serral vs YoungYakov
ByuN vs ShoWTimE
Sparkling Tuna Cup
2 days
Replay Cast
3 days
Replay Cast
3 days
Wardi Open
4 days
Monday Night Weeklies
4 days
Replay Cast
4 days
WardiTV Winter Champion…
5 days
WardiTV Winter Champion…
6 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2026-02-18
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
WardiTV Winter 2026
PiG Sty Festival 7.0
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

Escore Tournament S1: King of Kings
[S:21] ASL SEASON OPEN 1st Round
[S:21] ASL SEASON OPEN 1st Round Qualifier
Acropolis #4 - TS5
Jeongseon Sooper Cup
Spring Cup 2026: China & Korea Invitational
[S:21] ASL SEASON OPEN 2nd Round
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
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.