Adsense with Letterbox Scale

0 favourites
  • 14 posts
  • Hello,

    I was wondering if anyone was successful in a creating page with ads AND had a game using the "Fullscreen in browser" mode, like Letterbox Scale.

    I want the game to scale based on the user's browser window, but I also want to have an ad next to the game. Of course, I can't place the ad within the game in Construct because, obviously, the ad cannot be scaled (Unless someone has a method of placing HTML with games that doesn't scale with the rest).

    The best I was able to come up with was placing the ad in a div with an absolute or fixed position at (0,0), but unfortunately, this covers up part of the game. And since the game is scaling, there's no way to reserve say 160 pixel on the left in game for an ad, because the reserved area will change depending on the user's window size.

    Any help/ideas would be greatly appreciated. Thanks in advance.

  • Maybe you should try with Anchor behavior

  • Thanks for replying.

    I think I've found a solution. You can use the Pode HTML Pack (http://www.scirra.com/forum/plugins-pode-html-pack_topic51522_page1.html) that has a div module which allows you to use any HTML you want. The best part, it doesn't scale the elements when using Letterbox scale.

    The only thing I've noticed is that if you use the browser plugin and request full screen mode, the html disappears. Not sure if there's a workaround for this, but if I find one, I'll post it here.

  • I tought you already used this plugin before you create a thread XD

  • Hi, does someone knows if this kind of ads implementation is in conformity with google adsense policies?I have some doubts because of this article

    Google adsense article

    tks

  • Actually, for AdSense, I don't think it is. But, Google does offer ads for games, although I have yet to explore the policies for that service. Take a look here: google.ca/ads/games/index.html

  • Actually, for AdSense, I don't think it is. But, Google does offer ads for games, although I have yet to explore the policies for that service. Take a look here: google.ca/ads/games/index.html

    Tks, but i think in the game ads service from google you need to have an absurd number of players per day in your page to access the service.I have to figure out this because i need to implement ads in my games.

  • Hmm. Well, there are other ad services out there that specialize in in-game advertising. Have you checked any of them out?

    ad4game.com

    game-advertising-online.com

    web.ad2games.com/_launch

    advertisegame.com

    epicgameads.com

    I've only briefly looked into these and I don't know how many players are required to use there service (or if their payout is worth the trouble). I'd imagine some of these smaller networks might be a bit more sympathetic to the indie developer. I do know that some of these allow you to use other ad providers in addition to their services, which is a bonus.

    Again, I haven't done enough research (spending all my time on development) so I don't really know much else. I'll let you know if I do come across anything viable.

  • Actually, I just read Google's docs for their service and they require that the game is built with Flash: "You can only integrate AdSense for games on web-based Flash games." Can't say for certain if that's still valid in 2012, but that's what it says.

  • Actually, I just read Google's docs for their service and they require that the game is built with Flash: "You can only integrate AdSense for games on web-based Flash games." Can't say for certain if that's still valid in 2012, but that's what it says.

    -1 bad point for Google.

  • d640k thanks for this info, i'll dig into this next week to find the best solution.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • d640k

    Maybe you should try to implement ads outside the game canvas? Try this:

    1. Set absolute position of ad DIV as 0,0

    2. Set absolute Y position of Game DIV as adDiv.Height

    3. Paste this to your Index.html:

    // Size the canvas to fill the browser viewport.

              jQuery(window).resize(function() {

                   cr_sizeCanvas(jQuery(window).width(), jQuery(window).height()-50);

              });

    // Resizes canvas size at start to fit the ad banner

              jQuery(document).ready(function() {

                   cr_sizeCanvas(jQuery(window).width(), jQuery(window).height()-50);

              });

    Adjust the value "50" to your adDiv.height.

    Works for me. Hope it will work for you :-)

  • I've heard of Adsense accounts getting shut down because of HTML5 game integration. It breaches the TOS and is strongly not recommended.

  • 've heard of Adsense accounts getting shut down because of HTML5 game integration. It breaches the TOS and is strongly not recommended.

    This. Two people I take seriously were kicked off Adsense in the last 2 weeks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)