BobF

Members
  • Content count

    109
  • Joined

  • Last visited

About BobF

  • Rank
    Advanced Member

Recent Profile Visitors

1,183 profile views
  1. Game data

    Thanks, Mario, interesting graphic. Keep in mind though that you also need to know how much quality competition exists for each genre as well in order to use the information to decide which genre provides the best opportunity. And, of course, the time and resources needed to develop a good game for a genre is an important factor as well. For example, puzzle games have a big market and can be easier to create than an FPS, but the number of existing puzzle games your game would be competing against would be quite large.
  2. Canvas elements responsive

    If you're targeting modern browsers then check out CSS's flexbox.
  3. Keep in mind that Adsense for Games requires 1 million games views per month to participate.
  4. How Would I Move My Player?

    You're recreating the player at coordinates (0, 0) on every frame. Try creating the player just once somewhere outside of "draw" and then move line "player.create()" to after the lines that update the player's position (and consider renaming "player.create" to something like "player.draw"). Move the canvas and context declarations outside of draw as well because you don't want to waste CPU cycles doing that for every frame.
  5. I prefer DigitalOcean, but if you want an even cheaper VPS then vultr.com offers a small VPS for $2.50/month that should be good enough for demo purposes.
  6. About game hosting

    You may want to check out Photon. I have not used them yet, but I probably will unless I decide to take the time to roll my own multi-player solution. You can make a one-time $95 payment that gives you 5 years of service as long as you stay under 100 concurrent users. That's a good price for what they provide, but once you need more than 100 CCU the price jumps to $95/month.
  7. Your use of an implicit return in an arrow function is invalid in both case 1 and 2. An implicit return in launch_player should look more like this: launch_player = (count) => count + 1; You can read more about using implicit returns with arrow functions here.
  8. Interesting idea! Out of curiosity, I tried to find ad space auctions on ebay but I didn't see anything. Maybe I wasn't searching for the right term.
  9. I suspect your first scenario is a tad faster because the JS engine does not have to look as deeply in scope to find the location of xSpeed as it does in the second scenario. The presence of xSpeed at the higher scope makes other variables at that same level a bit slower to find as well. But I agree with Matt, JS engine optimizations will almost certainly make any performance difference negligible. If update is the only function that references xSpeed then from the perspective of good design xSpeed should be declared within update.
  10. Experience with Photon Engine?

    I don't think I've ever seen anyone here mention that they use Photon. I have the feeling only a minority of people here are doing multi-player, and most of those seem to have rolled their own solution. I've looked at Photon with interest in the past and plan to take another look when I finally get around to adding multi-player capability. Photon seems pretty well established, and they run on Azure which should help with reliability and scalability. But Azure has also caused them a couple of bad outages which you can read about in their blog. I would enjoy rolling my own solution, and it would likely save money on monthly fees, but Photon is tempting since their turnkey setup should be solid and would save development time.
  11. Care must be taken when referencing "this" in a callback function because the value of "this" will likely not be the object you actually want when the callback is invoked. You can ensure the callback references the desired "this" object by using bind: canvas.addEventListener('mousemove', playerShootingModule.updateRotation.bind(playerShootingModule), true);
  12. You can't do anything like that because the JavaScript has to run in the browser, and the page hasn't even been delivered to the browser yet. The information you found stating ajax is necessary is correct (note that you could use jQuery's ajax since WordPress loads jQuery). Basically, you could write a simple PHP script that resides on your server and whose only job is to increment the game level value in the SQL database for a specified user. You would then add a bit of ajax code to your "storeNewData" function to call that PHP script. Note that you probably don't need ajax to read the game level from the database because the current game level value can be encoded directly into the page itself by your WordPress PHP code. You just need your JavaScript to write the game level to the database during game play, and you're on the right track in attempting to do that from storeNewData. Note that when using ajax to increment the game level, a clever user may dig through your JavaScript code and find the PHP URL used to do that. Without a deterrence, the user could conceivably use that URL to directly increment his game level without actually playing the game to do so. Just something to think about.
  13. Thanks. BlackMoonDev! One other question: Does Adsense for Games allow you to specify that you only want family friendly ads (i.e., no alcohol, no tobacco, no violent video games, etc)?
  14. Interesting. Is the ad revenue better than other ad networks you've tried? Have you found any significant advantages or disadvantages for HTML5 for Games that you can share?