• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 02:25
CEST 08:25
KST 15:25
  • 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 1 - Final Week6[ASL19] Finals Recap: Standing Tall12HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0
Community News
Esports World Cup 2025 - Brackets Revealed9Weekly Cups (July 7-13): Classic continues to roll2Team TLMC #5 - Submission extension2Firefly given lifetime ban by ESIC following match-fixing investigation17$25,000 Streamerzone StarCraft Pro Series announced7
StarCraft 2
General
Who will win EWC 2025? RSL Revival patreon money discussion thread Esports World Cup 2025 - Brackets Revealed Team TLMC #5 - Submission extension The GOAT ranking of GOAT rankings
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event $5,100+ SEL Season 2 Championship (SC: Evo) WardiTV Mondays Sparkling Tuna Cup - Weekly Open Tournament
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
External Content
Mutation # 482 Wheel of Misfortune Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome
Brood War
General
BW General Discussion Flash Announces (and Retracts) Hiatus From ASL Starcraft in widescreen BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone
Tourneys
Cosmonarchy Pro Showmatches [Megathread] Daily Proleagues CSL Xiamen International Invitational [BSL20] Non-Korean Championship 4x BSL + 4x China
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile CCLP - Command & Conquer League Project The PlayStation 5
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Stop Killing Games - European Citizens Initiative Russo-Ukrainian War Thread Summer Games Done Quick 2025! Things Aren’t Peaceful in Palestine
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 2024 - 2025 Football Thread NBA General Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Men Take Risks, Women Win Ga…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 553 users

The Big Programming Thread - Page 122

Forum Index > General Forum
Post a Reply
Prev 1 120 121 122 123 124 1031 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
Hyrule19035 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
Hyrule19035 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 States3696 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 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 3h 36m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 238
mcanning 42
StarCraft: Brood War
Zeus 1144
Noble 33
Bale 7
PianO 0
Dota 2
ODPixel398
NeuroSwarm111
canceldota0
League of Legends
JimRising 779
Counter-Strike
Stewie2K1137
Super Smash Bros
Mew2King114
Other Games
summit1g13069
WinterStarcraft337
Trikslyr39
SortOf18
Organizations
Other Games
gamesdonequick3179
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH391
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota213
League of Legends
• Rush2208
• Lourlo1592
Upcoming Events
Replay Cast
3h 36m
WardiTV European League
9h 36m
ShoWTimE vs sebesdes
Percival vs NightPhoenix
Shameless vs Nicoract
Krystianer vs Scarlett
ByuN vs uThermal
Harstem vs HeRoMaRinE
PiGosaur Monday
17h 36m
uThermal 2v2 Circuit
1d 9h
Replay Cast
1d 17h
The PondCast
2 days
WardiTV European League
2 days
Replay Cast
2 days
Epic.LAN
3 days
CranKy Ducklings
4 days
[ Show More ]
Epic.LAN
4 days
CSO Contender
4 days
BSL20 Non-Korean Champi…
4 days
Bonyth vs Sziky
Dewalt vs Hawk
Hawk vs QiaoGege
Sziky vs Dewalt
Mihu vs Bonyth
Zhanhun vs QiaoGege
QiaoGege vs Fengzi
Sparkling Tuna Cup
5 days
Online Event
5 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs Zhanhun
Dewalt vs Mihu
Hawk vs Sziky
Sziky vs QiaoGege
Mihu vs Hawk
Zhanhun vs Dewalt
Fengzi vs Bonyth
Liquipedia Results

Completed

2025 ACS Season 2: Qualifier
RSL Revival: Season 1
Murky Cup #2

Ongoing

JPL Season 2
BSL 2v2 Season 3
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
BSL20 Non-Korean Championship
Championship of Russia 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters

Upcoming

CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
BSL Season 21
K-Championship
RSL Revival: Season 2
SEL Season 2 Championship
uThermal 2v2 Main Event
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 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.