• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:29
CET 22:29
KST 06:29
  • 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 Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
RSL Season 3: RO16 results & RO8 bracket12Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation14Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA12
StarCraft 2
General
RSL Season 3: RO16 results & RO8 bracket SC: Evo Complete - Ranked Ladder OPEN ALPHA RSL Season 3 - Playoffs Preview Mech is the composition that needs teleportation t GM / Master map hacker and general hacking and cheating thread
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
Data analysis on 70 million replays A cwal.gg Extension - Easily keep track of anyone soO on: FanTaSy's Potential Return to StarCraft [ASL20] Ask the mapmakers — Drop your questions FlaSh on: Biggest Problem With SnOw's Playstyle
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET [BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread EVE Corporation Path of Exile [Game] Osu! Should offensive tower rushing be viable in RTS games?
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
Mafia Game Mode Feedback/Ideas
Community
General
Russo-Ukrainian War Thread The Games Industry And ATVI US Politics Mega-thread Things Aren’t Peaceful in Palestine About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1995 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
Hyrule19158 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
Hyrule19158 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
Next event in 10h 2m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
White-Ra 263
UpATreeSC 220
JuggernautJason75
StarCraft: Brood War
Britney 25081
Calm 2914
Leta 43
Counter-Strike
pashabiceps1558
fl0m1543
Heroes of the Storm
Liquid`Hasu470
Other Games
Grubby3843
FrodaN1964
B2W.Neo759
RotterdaM189
mouzStarbuck180
C9.Mang098
KnowMe75
Trikslyr54
SteadfastSC47
ZombieGrub26
OptimusSC21
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• sitaska21
• Kozan
• sooper7s
• AfreecaTV YouTube
• Migwel
• LaughNgamezSOOP
• intothetv
• IndyKCrew
StarCraft: Brood War
• FirePhoenix32
• 80smullet 19
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 6036
• masondota2862
• WagamamaTV546
• Ler131
League of Legends
• TFBlade1271
Other Games
• imaqtpie1068
• Shiphtur290
Upcoming Events
RSL Revival
10h 2m
Classic vs MaxPax
SHIN vs Reynor
herO vs Maru
WardiTV Korean Royale
14h 32m
SC Evo League
15h 2m
IPSL
19h 32m
Julia vs Artosis
JDConan vs DragOn
OSC
19h 32m
BSL 21
22h 32m
TerrOr vs Aeternum
HBO vs Kyrie
RSL Revival
1d 10h
Wardi Open
1d 16h
IPSL
1d 22h
StRyKeR vs OldBoy
Sziky vs Tarson
BSL 21
1d 22h
StRyKeR vs Artosis
OyAji vs KameZerg
[ Show More ]
OSC
2 days
OSC
2 days
Monday Night Weeklies
2 days
OSC
3 days
Wardi Open
3 days
Replay Cast
4 days
Wardi Open
4 days
Tenacious Turtle Tussle
5 days
The PondCast
5 days
Replay Cast
6 days
LAN Event
6 days
Liquipedia Results

Completed

Proleague 2025-11-16
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
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.