• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 18:06
CET 00:06
KST 08:06
  • 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: Winners11Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
Weekly Cups (Nov 3-9): Clem Conquers in Canada3SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7[BSL21] RO32 Group Stage4
StarCraft 2
General
Mech is the composition that needs teleportation t Weekly Cups (Nov 3-9): Clem Conquers in Canada Craziest Micro Moments Of All Time? SC: Evo Complete - Ranked Ladder OPEN ALPHA RotterdaM "Serral is the GOAT, and it's not close"
Tourneys
Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Ask the mapmakers — Drop your questions Where's CardinalAllin/Jukado the mapmaker?
Tourneys
[BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET [ASL20] Grand Finals [Megathread] Daily Proleagues
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Should offensive tower rushing be viable in RTS games? Path of Exile Dawn of War IV
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 SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread The Games Industry And ATVI
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 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
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1393 users

The Big Programming Thread - Page 892

Forum Index > General Forum
Post a Reply
Prev 1 890 891 892 893 894 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
waffelz
Profile Blog Joined June 2012
Germany711 Posts
Last Edited: 2017-06-20 12:55:59
June 20 2017 12:26 GMT
#17821
On June 20 2017 20:26 Manit0u wrote:
I must say that I was of the same opinion as you are some time ago (when I was switching from PHP to Ruby), but after a while of using the "no brackets and semicolons" language I must say that it's getting increasingly harder for me to go back (and I'll have to do that since I need to learn me some JEE).

Writing brackets and semicolons just seems like a real nuisance with very little benefit (the only benefit I see is when people write multiple statements per line, which is shit anyway and you can do that in Ruby using semicolons too if you want). It just feels like a needless syntactic sugar to guard against noobs writing code the wrong way. I believe that was the main reason for Python to abandon them (although I think they went a bit too far and I much prefer Ruby's "def ... end" syntax) and I have to agree. If you need all those brackets and semicolons to figure out where things start and end in your code then it's probably bad code to begin with.


As I said, it just feels over reals
The languages I currently encounter the most on a regular basis are java, python and C++ and after a long period of python I will feel a bit irritated by java/C++, but soon enough I get over my habit. Just like I get over the enforced noobfirendlyness of java when coming from C++. Sure you could argue that you have to type one less without brackets ( 1 bracket since every proper IDE and editor figures you want to close every bracket you open), but you could also say you don’t have to worry about alignment which is only needed for readability and can be added with only a shortcut in almost every IDE so I really can’t see a proper argument that.

The semicolon at the end of a line might actually be a bit redundant even though I don’t like the argument about multiline code since that isn’t the only case affected. The company where I was an intern last year had some conventions that demanded separating a line that way and while not liking it at first, I have to admit it really worked. Or I simply got used to it.
At the moment I like the extra option it gives me, but I don’t feel like I can substantiate that with more than “I like it”. And the fact that GO occasionally gets me since it made ‘;’ obsolete by inserting it for you but that’s just another habit I need to break.

EDIT: I would also like as a show of good will propose the usage of 9 spaces and a tab as a compromise between tab vs 2 spaces vs 3 spaces vs 4 spaces
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
Khalum
Profile Joined September 2010
Austria831 Posts
Last Edited: 2017-06-20 12:28:08
June 20 2017 12:27 GMT
#17822
On June 20 2017 20:48 YourGoodFriend wrote:
Show nested quote +
[..]


Just use tabs that save as spaces, to everyone but you you use spaces but to you you use tabs EZPZ

The it becomes a 2 space vs 4 space argument and we all know 3 spaces is superior



Ofc I don't press space 4 times (which is obviously the correct amount of spaces for indentation) but instead have the IDE replace the tab with spaces.
Manit0u
Profile Blog Joined August 2004
Poland17427 Posts
June 22 2017 15:30 GMT
#17823
Heh, a colleague of mine accidentally did "sudo init 0" on our partner's staging server (he wanted to shut down his comp but typed it in a wrong terminal). Was fun
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-06-22 17:04:12
June 22 2017 17:02 GMT
#17824
--- Nuked ---
Manit0u
Profile Blog Joined August 2004
Poland17427 Posts
June 22 2017 19:56 GMT
#17825
On June 23 2017 02:02 Nesserev wrote:
Show nested quote +
On June 23 2017 00:30 Manit0u wrote:
Heh, a colleague of mine accidentally did "sudo init 0" on our partner's staging server (he wanted to shut down his comp but typed it in a wrong terminal). Was fun

Fill me in... why would you ever use the command "sudo init 0" to shut down your computer, over any of the alternatives?


It shuts down instantly

But really, I have no idea. I've never used it but he swears by it and it's a habit of his now.
Time is precious. Waste it wisely.
Manit0u
Profile Blog Joined August 2004
Poland17427 Posts
June 24 2017 11:50 GMT
#17826
[image loading]
Time is precious. Waste it wisely.
waffelz
Profile Blog Joined June 2012
Germany711 Posts
June 24 2017 19:17 GMT
#17827
Long image. High quality code.
+ Show Spoiler +
[image loading]


@Manit0u, you are the sole reason I still check the random Pic thread
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
phar
Profile Joined August 2011
United States1080 Posts
June 25 2017 15:16 GMT
#17828
It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that).

Love me some internet season

Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing.
Who after all is today speaking about the destruction of the Armenians?
Manit0u
Profile Blog Joined August 2004
Poland17427 Posts
June 25 2017 15:53 GMT
#17829
On June 26 2017 00:16 phar wrote:
It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that).

Love me some internet season

Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing.


I wonder how this will go for me. I've been assigned to train 6 practicants sometime soon. We'll pick the best of them for the intern positions because we can't find enough people to work with us. We have a very large pile of CVs but over the past 4 months, despite interviewing 7-10 people/week we took in 2 people.
Time is precious. Waste it wisely.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
June 25 2017 16:06 GMT
#17830
On June 26 2017 00:53 Manit0u wrote:
Show nested quote +
On June 26 2017 00:16 phar wrote:
It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that).

Love me some internet season

Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing.


I wonder how this will go for me. I've been assigned to train 6 practicants sometime soon. We'll pick the best of them for the intern positions because we can't find enough people to work with us. We have a very large pile of CVs but over the past 4 months, despite interviewing 7-10 people/week we took in 2 people.


Having minions is great. Just show them your picture dumps and they'll worship you.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Manit0u
Profile Blog Joined August 2004
Poland17427 Posts
June 25 2017 17:23 GMT
#17831
On June 26 2017 01:06 Blitzkrieg0 wrote:
Show nested quote +
On June 26 2017 00:53 Manit0u wrote:
On June 26 2017 00:16 phar wrote:
It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that).

Love me some internet season

Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing.


I wonder how this will go for me. I've been assigned to train 6 practicants sometime soon. We'll pick the best of them for the intern positions because we can't find enough people to work with us. We have a very large pile of CVs but over the past 4 months, despite interviewing 7-10 people/week we took in 2 people.


Having minions is great. Just show them your picture dumps and they'll worship you.


I don't need them to worship me. I need them to actually be competent enough to get hired and reduce my workload
Time is precious. Waste it wisely.
TheEmulator
Profile Blog Joined July 2010
28093 Posts
June 25 2017 18:54 GMT
#17832
Maybe they will be too competent and snipe your job.
Administrator
Manit0u
Profile Blog Joined August 2004
Poland17427 Posts
June 25 2017 22:03 GMT
#17833
On June 26 2017 03:54 TheEmulator wrote:
Maybe they will be too competent and snipe your job.


Most of them will have 0 to very little experience (and experience is super important) so I'm not worried about that. Anyway, after I train them I also have to teach our PHP boys and girls (current employees, including lead PHP dev) some Rails.
Time is precious. Waste it wisely.
KungKras
Profile Joined August 2008
Sweden484 Posts
June 25 2017 22:26 GMT
#17834
Maybe this question is a bit too advanced, but I'll ask anyway.

I read somewhere that when making an RTS game, it's a good idea to store the units in a binary tree of some sort. Or maybe it was to hash the units and have them in a hashset of some sort. And I just can't make sense of it.

I mean if I make any game, I'll be running a game loop, and iterating through each element and its update function exactly one time. So what advantage could it possibly bring to use any other structure than an array or a list for the units/terrain/building/doodads, etc?
"When life gives me lemons, I go look for oranges"
Hanh
Profile Joined June 2016
146 Posts
June 25 2017 22:52 GMT
#17835
It helps when figuring out what units are affected by aoe or hit or even visible.
thePunGun
Profile Blog Joined January 2016
598 Posts
Last Edited: 2017-06-25 22:58:26
June 25 2017 22:56 GMT
#17836
I've played around with a Unity RTS engine, some guy on youtube put out some years ago. He has released the source code and a bunch of tutorials since then.
Here are the links:
Unity 3D Real-Time Strategy Engine (Source Code Included)
Source Code
Tutorial part1
Tutorial part2
They may or may not be helpful to you KungKras...it's been a while since I've tried to get something goin, hope you can find something useful though.
"You cannot teach a man anything, you can only help him find it within himself."
KungKras
Profile Joined August 2008
Sweden484 Posts
June 25 2017 23:13 GMT
#17837
On June 26 2017 07:56 thePunGun wrote:
I've played around with a Unity RTS engine, some guy on youtube put out some years ago. He has released the source code and a bunch of tutorials since then.
Here are the links:
Unity 3D Real-Time Strategy Engine (Source Code Included)
Source Code
Tutorial part1
Tutorial part2
They may or may not be helpful to you KungKras...it's been a while since I've tried to get something goin, hope you can find something useful though.


Cool
I'm downloading the source code from his website right now! It always helps to see how other people implement stuff.
"When life gives me lemons, I go look for oranges"
KungKras
Profile Joined August 2008
Sweden484 Posts
June 25 2017 23:14 GMT
#17838
On June 26 2017 07:52 Hanh wrote:
It helps when figuring out what units are affected by aoe or hit or even visible.


That's interesting. I never thought about AOE spells or visibility. Is it because you don't have to iterate through every object in the game to find what units are in an AOE when using a tree?
"When life gives me lemons, I go look for oranges"
Hanh
Profile Joined June 2016
146 Posts
June 26 2017 02:27 GMT
#17839
Yes, pathfinding also benefits from knowing neighbors quickly.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2017-06-26 06:37:44
June 26 2017 06:36 GMT
#17840
On June 26 2017 07:26 KungKras wrote:
Maybe this question is a bit too advanced, but I'll ask anyway.

I read somewhere that when making an RTS game, it's a good idea to store the units in a binary tree of some sort. Or maybe it was to hash the units and have them in a hashset of some sort. And I just can't make sense of it.

I mean if I make any game, I'll be running a game loop, and iterating through each element and its update function exactly one time. So what advantage could it possibly bring to use any other structure than an array or a list for the units/terrain/building/doodads, etc?


Found some from Google, neat stuff.

https://gamedevelopment.tutsplus.com/tutorials/quick-tip-use-quadtrees-to-detect-likely-collisions-in-2d-space--gamedev-374

https://www.gamedev.net/articles/programming/general-and-gameplay-programming/introduction-to-octrees-r3529
There is no one like you in the universe.
Prev 1 890 891 892 893 894 1032 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
23:00
PiGosaur Cup #55
CranKy Ducklings30
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
White-Ra 265
ProTech119
JuggernautJason117
SpeCial 91
StarCraft: Brood War
Calm 3580
Shuttle 674
Artosis 219
Dota 2
Dendi972
Counter-Strike
Foxcn178
Super Smash Bros
hungrybox721
AZ_Axe54
PPMD22
Other Games
summit1g8363
Grubby3116
shahzam489
Liquid`Hasu241
Skadoodle151
Maynarde119
ViBE80
C9.Mang079
fpsfer 3
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 21 non-featured ]
StarCraft 2
• RyuSc2 78
• Hupsaiya 71
• musti20045 27
• Adnapsc2 11
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• blackmanpl 45
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21060
• Ler45
League of Legends
• imaqtpie3071
• TFBlade953
Other Games
• WagamamaTV388
• Shiphtur277
Upcoming Events
Replay Cast
9h 54m
OSC
12h 24m
Kung Fu Cup
12h 54m
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
23h 54m
The PondCast
1d 10h
RSL Revival
1d 10h
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
1d 12h
WardiTV Korean Royale
1d 12h
PiGosaur Monday
2 days
RSL Revival
2 days
Classic vs Creator
Cure vs TriGGeR
[ Show More ]
Kung Fu Cup
2 days
CranKy Ducklings
3 days
RSL Revival
3 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
3 days
IPSL
3 days
ZZZero vs rasowy
Napoleon vs KameZerg
BSL 21
3 days
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
4 days
RSL Revival
4 days
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
4 days
WardiTV Korean Royale
4 days
BSL 21
4 days
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
4 days
Dewalt vs WolFix
eOnzErG vs Bonyth
Wardi Open
5 days
Monday Night Weeklies
5 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
IEM Chengdu 2025
PGL Masters Bucharest 2025
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

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 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.