• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 07:45
CET 13:45
KST 21:45
  • 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
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets3$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)15Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7[BSL21] Non-Korean Championship - Starts Jan 103SC2 All-Star Invitational: Jan 17-1825
StarCraft 2
General
SC2 All-Star Invitational: Jan 17-18 Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets When will we find out if there are more tournament SC2 Spotted on the EWC 2026 list? Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament SC2 AI Tournament 2026 $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) $25,000 Streamerzone StarCraft Pro Series announced WardiTV Winter Cup
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes
Brood War
General
BW General Discussion [ASL21] Potential Map Candidates A cwal.gg Extension - Easily keep track of anyone Potential ASL qualifier breakthroughs? BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET [BSL21] Non-Korean Championship - Starts Jan 10 SLON Grand Finals – Season 2
Strategy
Game Theory for Starcraft Simple Questions, Simple Answers Current Meta [G] How to get started on ladder as a new Z player
Other Games
General Games
Beyond All Reason Nintendo Switch Thread Awesome Games Done Quick 2026! Mechabellum Stormgate/Frost Giant 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 Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread Trading/Investing Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced
Blogs
My 2025 Magic: The Gathering…
DARKING
Physical Exercise (HIIT) Bef…
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2530 users

The Big Programming Thread - Page 122

Forum Index > General Forum
Post a Reply
Prev 1 120 121 122 123 124 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.
tofucake
Profile Blog Joined October 2009
Hyrule19188 Posts
March 06 2012 01:42 GMT
#2421
Technically both ActionScript and JavaScript are both versions of ECMAScript. If you learn one the other will be rather trivial to pick up. Please stop arguing now kthx.
Liquipediaasante sana squash banana
Fryght
Profile Joined August 2010
Netherlands254 Posts
Last Edited: 2012-03-06 02:09:52
March 06 2012 01:59 GMT
#2422
I get the point concerning licenses and the like, but my experiences with Ogre3D were pretty bad, back in the day. That's a big thing with a lot of open source projects: People expect you to invest time and they assume you have the basic knowledge down. If you're a noob and you're like: "I would like to rotate my player 90 degrees to the right" and then have to fiddle about with Quaternions (I ran into this with XNA, way back in the day), that can be pretty demotivating, as opposed to Unity3D offering you a bunch of 'rotate' functions out of the box. Unity3D now offers a free license and let's you program in JS or C# (even Boo, if you're into that :p). With C#, you'll still need to do a lot of actual programming, whilst setting aside confusing (yet powerful) stuff such as pointers etc.

Due to the fact that the threshold for Flash is very low, there are a lot of noobs, trying to get Flash to do what they want, so it's easy to look up a lot of info, instead of having to dig through documentation for hours on end.

Also, in the end, when I want to do some game development by myself or with a really small team, I tend to look more at the practical side of things. That also includes getting content (such as graphics/sounds/etc) into the game and how much time I need to spend on 're-inventing the wheel'.

Unity3D already makes it so that all my GameObjects have an Update function that is automatically called. If I really want, I can even get my hands dirty and muck about with the drawcalls and whatnot. Getting content into the game is a breeze. The IDE is your manager program, which also serves as a level editor. All of the programming is most easily taken care of in Visual Studio (which now also offers a free version). Unity3D also offers organization in 'scenes', which greatly facilitates state/level management. The IDE allows you to mess about with a lot of the content during run-time. Those are a lot of handy practical features, imo. I am also very skeptical towards Unity3D, as their documentation/tutorials in regards to C# is pretty meager. I guess they kind of assume that anyone that knows C# should not require too much instruction any more. Luckily, there is a very active community.

Open source development can also be pretty volatile. If they decide to experiment or change the implementation of certain features, there is no-one that they owe an explanation. If a proprietary toolchain tries to pull that kind of jazz, they'll get a lot of shit for it. Once people pay for something, they expect a certain quality from the product and they WILL hold the company making the product responsible if it does not meet their expectations.

Several good examples of proprietary vs open source:
- Apple (app store is controlled, derp friendly devices) vs Android (open market, loads of low quality stuff polluting the market, requires some tech affinity)
- Windows (still the most used OS, most support from games/drivers etc) vs Linux (a lot of builds to choose from, requires tech affinity (console/shell), highly customizable IF you know what you're doing)
- Flash (one company decides standard) vs HTML5 (will take a long time to reach full implementation in browsers/standard, just look at CSS2/CSS3 ._. )

I did start looking into HTML5 (which is why I mentioned Construct 2 - which, by the way, does suffer from your mentioned restrictions and the need to hack in my own stuff), but when I looked at some available game dev frameworks, they were very meager and not particularly well structured. What's out there so far pales in comparison to the framework that Flash offers, imo. Not to mention that all browsers like to implement (or NOT implement) the HTML5 guidelines in their own way. Furthermore, compared to Flash, it's a hell of a lot easier to steal HTML5/JS games and their content. I don't really feel like sticking a lot of hard work into a game, just to have it show up on some random other site, with ads slapped all over it. Other than that, I wouldn't mind switching from Flash to HTML5, as I work as a web developer, so I'm already quite familiar with JS (and jQuery). As I see it, HTML5 will be really nice for delivering media through the browser, but I don't really see it as an established platform for games yet, other than WebGL, perhaps. But then again, if I look at stuff like Quake Live vs Google's Quake WebGL Quake port, I find plug-in stuff such as Quake Live the more impressive of the two.

Principles and code standards are nice, but I don't think anyone writes flawless code and you'll improve plenty as you clock in more time. To strive for perfection right off the bat is very noble, but can also cost you a lot of time. If you don't have a deadline ticking away at you, by all means, go ahead. Not everyone is as fortunate, however :p

tl;dr/Back on topic - My question: Any way of properly protecting an HTML5 game from being jacked? Code obfuscation is a possibility, as is minimizing, but that still doesn't do much to actually make code unavailable to the user. Any way to protect it decently enough so that it's not worthwhile to try and steal it?
Zinroc
Profile Joined July 2010
Canada73 Posts
March 06 2012 02:09 GMT
#2423
Hi, I'm currently using php with WAMP MySQL database for a browser game and I was wondering if there is a way to run the php code every time interval without me having to refresh localhost every time interval.
Fryght
Profile Joined August 2010
Netherlands254 Posts
Last Edited: 2012-03-06 02:16:38
March 06 2012 02:12 GMT
#2424
Yes, Zinroc, that is possible!

One way would be through a cron job. Windows guide here
You can also tie the .php extension to PHP's command-line interface, which can then be set as a scheduled task (guide).
tofucake
Profile Blog Joined October 2009
Hyrule19188 Posts
March 06 2012 04:47 GMT
#2425
You can also be ghetto and run the ReloadEvery plugin or use page reload javascript, if you just want quick and dirty
Liquipediaasante sana squash banana
bc4m
Profile Joined December 2011
United States17 Posts
March 06 2012 06:49 GMT
#2426
On March 06 2012 10:59 Fryght wrote:
tl;dr/Back on topic - My question: Any way of properly protecting an HTML5 game from being jacked? Code obfuscation is a possibility, as is minimizing, but that still doesn't do much to actually make code unavailable to the user. Any way to protect it decently enough so that it's not worthwhile to try and steal it?

Besides obfuscation there's nothing you can do. You could do something crazy like transferring everything encrypted and decrypting it on the client-side but in the end the browser needs code to interpret. If the browser can get it, anyone can. If you need to protect your code open platforms like HTML5/Javascript are not for you.
supereddie
Profile Joined March 2011
Netherlands151 Posts
March 06 2012 13:42 GMT
#2427
On March 06 2012 10:59 Fryght wrote:
My question: Any way of properly protecting an HTML5 game from being jacked? Code obfuscation is a possibility, as is minimizing, but that still doesn't do much to actually make code unavailable to the user. Any way to protect it decently enough so that it's not worthwhile to try and steal it?

The only way to do this is have all the game logic server side and use html for display/interaction only (=no logic in html/javascript)
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
Fryght
Profile Joined August 2010
Netherlands254 Posts
March 06 2012 13:56 GMT
#2428
Yeah, so then my assumptions that HTML5 is not really viable for publishing games you want to monetize seems confirmed. It's a shame, really, as it seemed to have good potential to replace Flash for publishing browser games. Seems like HTML5 will only 'liberate' media delivery then.
supereddie
Profile Joined March 2011
Netherlands151 Posts
Last Edited: 2012-03-06 14:49:28
March 06 2012 14:49 GMT
#2429
Depends on what you mean by 'monetizing'. Is it entirely possible to develop a game that uses html + javascript for display and interaction. Be sure to properly seperate the different aspects of the game in such a way that all the fancy game logic is done on the server. You can check out server-sent events.
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
Fryght
Profile Joined August 2010
Netherlands254 Posts
Last Edited: 2012-03-06 15:58:09
March 06 2012 15:57 GMT
#2430
Flash games can't be 'stolen' all too easily, because there are ways to make decompiling quite hard. In that way, you can put up your (self-contained) game on a lot of portals and whatnot. There is very little to no code/content exposure. With HTML5/JS all the JS is accessible through 'view source', making it very easy to rip your code/reskin the game etc, which makes it too risky to invest in.

Of course it is possible to have the server handle all game logic, but then you have to deal with networking and stuff won't be as snappy as it is running locally. Not to mention that this tech is not really built for real time client/server communication. Having a game rely on AJAX/long polling is not really an option for stuff like platformers etc. It is fine for MMORPG-ish stuff, I guess.

Basically, I feel that HTML5 won't replace Flash any time soon in the game portal sites. It will replace most (static) video and mp3 flash players. As for streams, does anyone know if HTML5 has anything for that?
supereddie
Profile Joined March 2011
Netherlands151 Posts
Last Edited: 2012-03-06 16:14:15
March 06 2012 16:13 GMT
#2431
I never said anything about AJAX (or polling) - using this with a game is not a good idea. server-sent events however, are viable in my opinion (and part of the html5 'standard').

I think streaming is possible, as long a you have a suitable protocol (like rtp, rtsp, mms) and the browser supports the codec.
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
freelander
Profile Blog Joined December 2004
Hungary4707 Posts
Last Edited: 2012-03-06 16:19:15
March 06 2012 16:18 GMT
#2432
wrong thread
And all is illuminated.
kingcoyote
Profile Blog Joined May 2010
United States546 Posts
March 06 2012 16:23 GMT
#2433
On March 06 2012 22:56 Fryght wrote:
Yeah, so then my assumptions that HTML5 is not really viable for publishing games you want to monetize seems confirmed. It's a shame, really, as it seemed to have good potential to replace Flash for publishing browser games. Seems like HTML5 will only 'liberate' media delivery then.


I think you can monetize an HTML game fairly easily. It won't be through the traditional "buy us for access" model, but that is not the only business model available these days.

I'm actually working on an HTML game right now that I hope to monetize once it gets a little bit more complete, and my partner on the project and I are working out our plan for what sources of revenue are possible.
tec27
Profile Blog Joined June 2004
United States3702 Posts
March 07 2012 01:38 GMT
#2434
On March 07 2012 01:13 supereddie wrote:
I never said anything about AJAX (or polling) - using this with a game is not a good idea. server-sent events however, are viable in my opinion (and part of the html5 'standard').

I think streaming is possible, as long a you have a suitable protocol (like rtp, rtsp, mms) and the browser supports the codec.

WebSockets tend to be better for games, since it allows for bi-directional communicatiton, although its less well supported and a tad harder to set up on certain platforms. Still, http://socket.io/ is a really nice library that makes utilizing WebSockets pretty painless (and has server components for a bunch of languages).
Can you jam with the console cowboys in cyberspace?
pphp
Profile Blog Joined September 2010
Brazil24 Posts
March 07 2012 07:34 GMT
#2435
no C#?
The smart is not the one who knows the most, it is the one who learns the fastest.
Fryght
Profile Joined August 2010
Netherlands254 Posts
Last Edited: 2012-03-07 11:23:19
March 07 2012 11:17 GMT
#2436
On March 07 2012 10:38 tec27 wrote:
Show nested quote +
On March 07 2012 01:13 supereddie wrote:
I never said anything about AJAX (or polling) - using this with a game is not a good idea. server-sent events however, are viable in my opinion (and part of the html5 'standard').

I think streaming is possible, as long a you have a suitable protocol (like rtp, rtsp, mms) and the browser supports the codec.

WebSockets tend to be better for games, since it allows for bi-directional communicatiton, although its less well supported and a tad harder to set up on certain platforms. Still, http://socket.io/ is a really nice library that makes utilizing WebSockets pretty painless (and has server components for a bunch of languages).


Yeah, I've looked into WebSockets, but a while back there was little to no support across the browser boards. Really hope they would get everyone in line. But CSS3 makes very skeptical. I mean, CSS3 is not exactly rocket science and has been around quite long already, yet there is no standard still and we have browser specific implementations *shudder*
bc4m
Profile Joined December 2011
United States17 Posts
March 07 2012 23:52 GMT
#2437
On March 07 2012 20:17 Fryght wrote:
Show nested quote +
On March 07 2012 10:38 tec27 wrote:
On March 07 2012 01:13 supereddie wrote:
I never said anything about AJAX (or polling) - using this with a game is not a good idea. server-sent events however, are viable in my opinion (and part of the html5 'standard').

I think streaming is possible, as long a you have a suitable protocol (like rtp, rtsp, mms) and the browser supports the codec.

WebSockets tend to be better for games, since it allows for bi-directional communicatiton, although its less well supported and a tad harder to set up on certain platforms. Still, http://socket.io/ is a really nice library that makes utilizing WebSockets pretty painless (and has server components for a bunch of languages).


Yeah, I've looked into WebSockets, but a while back there was little to no support across the browser boards. Really hope they would get everyone in line. But CSS3 makes very skeptical. I mean, CSS3 is not exactly rocket science and has been around quite long already, yet there is no standard still and we have browser specific implementations *shudder*

Web development will always be like this, unfortunately it's par for the course. I feel like native games are the way to go but then again I have hardly any game-dev experience.
billy5000
Profile Blog Joined December 2010
United States865 Posts
March 08 2012 07:54 GMT
#2438
question regarding java's static methods vs instance methods (objects).

can anybody explain to me the differences (pros and cons) of these two in laymen's terms? maybe an example too
Tiger got to hunt, bird got to fly; Man got to sit and wonder, 'Why, why, why?' Tiger got to sleep, bird got to land; Man got to tell himself he understand. Vonnegut
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
March 08 2012 09:19 GMT
#2439
well static methods can be called without having to acquire an instance of the class first. In cases like Collections.sort(list) or all the Math.sin(float), Math.round(float) etc. methods, that's rather nice because there's no point in creating a collections object or a math object which wouldn't have any state anyways. Static methods can however not access instance or methods obviously. This can be beneficial though, because it makes them usually easier to understand when looking at the code, because you know there's no instance variables or overwritten stuff that influences the method from outside. All you have inside a static method are the passed in parameters, that's usually easier to grasp. Static methods can say things like "i'm a pure function without state!" like all the Math.* methods, or "use me instead calling the constructor yourself to acquire instances of my class because i have caching!" like Interger.valueOf(int), or they can say things like "well there's this bit of code here that i need for one of my methods, but it might be useful from somewhere else because it only requires values a, b and c, and not all the other 15 instance values i have, so here, you can call it as a static method with only values a, b and c!" (can't think of a good example in the public API right now, usually the extracted static helper methods are only used by other internal classes and not by real outside code).

There are of course also static methods that are just "hey i don't know what i'm doing so i just make a static method that doesn't even really have anything to do with what's in this class". Those cases are either badly design or should be kept to "work in progress" until you properly understood what fits where and can then move or integrate it somewhere it fits.

and well, instance methods are just that. Methods that can only be used when you have an instance of a class and inside the methods, all the classes instance members can be accessed. Also, instance methods are required for making use of polymorphism. You can't make interfaces for static methods. And instance methods save you passing the "target" object as an additional parameter every time. Imagine, you'd have to always call LinkedList.add(list, item) or ArrayList.add(list, item) instead of just list.add(item) regardless of the kind of list you have. That'd be rather ugly and painful.additionally. That's why you should generally prefer to put stuff into instance methods behind a proper interface, because then you can exchange the implementation without having to change any code that uses the interface. That just doesn't work with statics.

A general good guideline: Small, closed off pieces of code (helper methods, pure functions, singleton accessors etc): make them static. Anything else, make instance methods, and if it's used by other code and there might be different implementations in the future, additionally put it behind proper interfaces. In several cases, it might be an option, to actually use both: An instance method that doesn't really do anything but invoke a static helper. For instance, if you were to write your own List interface, for example if you need a "list" that only offers get(int) and sort(), and not add(item), then you could have one implementation that does funny things like return the n-th line from a file and when you call sort(), it sorts the lines in the file on the disc, and you could have another implementation that internally uses an ArrayList, and if you call sort() on that it just forwards the call to the static helper Collections.sort(this.arrayList). This way you have both easily reusable sort-code, AND made that code exchangable through an interface.
Gold isn't everything in life... you need wood, too!
Sandrosuperstar
Profile Joined November 2009
Sweden525 Posts
March 08 2012 23:22 GMT
#2440
Does anyone here have experience with the D language? What did you think of it?
I'm homo for Lomo, gay for GGplay, but at the end of the day I put my dong in Lee Jaedong
Prev 1 120 121 122 123 124 1032 Next
Please log in or register to reply.
Live Events Refresh
WardiTV Invitational
12:00
Group C
Shameless vs GuMihoLIVE!
Shameless vs YoungYakov
Creator vs YoungYakov
Creator vs GuMiho
GuMiho vs YoungYakov
WardiTV624
TKL 42
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko180
TKL 42
StarCraft: Brood War
Shuttle 1148
Mini 572
Soma 514
BeSt 495
ZerO 383
Light 358
Snow 353
Hyun 334
hero 292
Rush 267
[ Show more ]
Hyuk 236
Last 203
Mong 192
Zeus 158
Barracks 83
Pusan 73
Aegong 57
Mind 56
Horang2 44
Free 44
soO 43
JYJ 34
GoRush 32
HiyA 24
Bale 17
Noble 14
JulyZerg 11
scan(afreeca) 10
Terrorterran 5
Dota 2
XcaliburYe103
ODPixel68
Counter-Strike
fl0m1264
olofmeister1195
x6flipin491
Super Smash Bros
Mew2King90
Other Games
singsing1832
B2W.Neo979
Gorgc828
Pyrionflax290
crisheroes270
Sick146
XaKoH 36
ZerO(Twitch)5
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• HappyZerGling 77
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• LaughNgamezSOOP
• intothetv
• Kozan
StarCraft: Brood War
• iopq 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 1196
• WagamamaTV356
League of Legends
• Jankos1894
• TFBlade645
• Stunt639
Upcoming Events
The PondCast
21h 15m
OSC
23h 15m
Jumy vs sebesdes
Nicoract vs GgMaChine
ReBellioN vs MaNa
Lemon vs TriGGeR
Gerald vs Cure
Creator vs SHIN
OSC
1d 23h
All Star Teams
2 days
INnoVation vs soO
Serral vs herO
Cure vs Solar
sOs vs Scarlett
Classic vs Clem
Reynor vs Maru
uThermal 2v2 Circuit
2 days
All Star Teams
3 days
MMA vs DongRaeGu
Rogue vs Oliveira
Sparkling Tuna Cup
3 days
OSC
3 days
Replay Cast
4 days
Wardi Open
4 days
[ Show More ]
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2026-01-13
Big Gabe Cup #3
NA Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
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
PGL Masters Bucharest 2025

Upcoming

Escore Tournament S1: W4
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
SC2 All-Star Inv. 2025
Nations Cup 2026
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.