• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 00:56
CET 06:56
KST 14:56
  • 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 ZvT24Behind 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/0226LiuLi 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
Liquipedia WCS Portal Launched ByuL: The Forgotten Master of ZvT Kaelaris on the futue of SC2 and much more... How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) How do the "codes" work in GSL? Sparkling Tuna Cup - Weekly Open Tournament LiuLi Cup: 2025 Grand Finals (Feb 10-16) Master Swan Open (Global Bronze-Master 2)
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
A new season just kicks off TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ ACS replaced by "ASL Season Open" - Starts 21/02 [ASL21] Potential Map Candidates
Tourneys
Escore Tournament StarCraft Season 1 Small VOD Thread 2.0 [Megathread] Daily Proleagues 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 Nintendo Switch Thread Path of Exile Diablo 2 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
Vanilla Mini Mafia TL Mafia Community Thread Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Russo-Ukrainian War Thread Ask and answer stupid questions here! Things Aren’t Peaceful in Palestine
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: 2025 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
Next event in 3h 4m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech145
StarCraft: Brood War
Zeus 2194
Tasteless 165
ZergMaN 157
Nal_rA 19
Bale 14
Icarus 6
Dota 2
NeuroSwarm172
League of Legends
JimRising 716
Counter-Strike
Coldzera 1753
Other Games
summit1g7715
C9.Mang0549
WinterStarcraft348
RuFF_SC2104
Hui .76
Trikslyr28
Organizations
Other Games
gamesdonequick990
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
League of Legends
• Scarra2817
• Lourlo1017
• Stunt448
Upcoming Events
PiG Sty Festival
3h 4m
Clem vs Percival
Zoun vs Solar
Escore
4h 4m
Epic.LAN
6h 4m
Replay Cast
18h 4m
PiG Sty Festival
1d 3h
herO vs NightMare
Reynor vs Cure
CranKy Ducklings
1d 4h
Epic.LAN
1d 6h
Replay Cast
1d 18h
PiG Sty Festival
2 days
Serral vs YoungYakov
ByuN vs ShoWTimE
Sparkling Tuna Cup
2 days
[ Show More ]
Replay Cast
2 days
Replay Cast
3 days
Wardi Open
3 days
Monday Night Weeklies
3 days
Replay Cast
3 days
WardiTV Winter Champion…
4 days
Replay Cast
5 days
WardiTV Winter Champion…
5 days
The PondCast
6 days
Replay Cast
6 days
Liquipedia Results

Completed

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

Ongoing

KCM Race Survival 2026 Season 1
Escore Tournament S1: King of Kings
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

[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
[S:21] ASL SEASON OPEN 2nd Round Qualifier
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.