Jump to content

How to run HTML sites.


plicatibu
 Share

Recommended Posts

Hi.

I'm pretty new to HTML games and I've many doubts. I'd like to ask you friends answers to them.

- In classic arcade sites (with flash games) the folder structure is like the following:

www/

js/ (it holds all javascrip files)

css/ (it holds all css files)

swf/ (it holds all flash games)

img (it holds all images)

AFAIK HTML games will use images and JavaScript files that may have a name clash.

What's the best practical folder structure used by you guys that own HTML sites?

- How do I prevent my games to be used by third parties? I mean, I sponsor / develop a game in hope to bring users to my site. As anyone can just save the game and put it into it's own site, it means I can severe cut in my revenue.

- Let me say I made / sponsored a game and I included ads in it.

How can I distribute it in a way that publishers don't' remove it?

Any other advice about running HTML game sites is very appreciated.

Thanks.

Link to comment
Share on other sites

It seems to be a common practice to have a subfolder per every HTML5 game.

So the structure may be as following

www/. . js/. . . . script.js. . css/. . . . style.css. . . . print.css. . img/. . . . logo.png. . games/. . . . game1/. . . . . . index.html. . . . . . game.js. . . . . . img/. . . . . . . . texture.png. . . . . . snd/. . . . . . . . music.mp3. . . . game2/. . . . . . index.html. . . . . . game.js. . . . . . img/. . . . . . . . background.png. . . . . . snd/. . . . . . . . music.ogg
This way you would have no clashes between different games.

It is also recommended to have games either open in separate tabs or iframes to avoid JS source clashing between many.

Link to comment
Share on other sites

Thank you for replying.

 

 

It is also recommended to have games either open in separate tabs or iframes to avoid JS source clashing between many.

 

 

 

@YellowAfterlife I'm a bit confused here (my English is very bad. Sorry.).

 

What you mean open in separated tabs? Do you mean in browser? As a publisher I cannot force users to open games in tab.

 

How do I do to iframe the game and don't let users to access it directly. And,as important as prevent usersw to directly access the game, how do I prevent Google to see duplicate content?

 

 

Regarding other question, no one else have any tips?

 

 

Thank you all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...