JoshChittick

Member
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

190 Neutral

About JoshChittick

  • Rank
    Member
  1. Coding horror experiment in HTML 5

    <html> <head> <title>Horror!</title> </head> <body> <div> <canvas id="canvas" width="800" height="600"> Your browser does not support the canvas element </canvas> </div> <div style="display: none"> <script> window.onload = function() { var canvas = document.getElementById("canvas"); if(canvas.getContext) { var canvasWidth = canvas.offsetWidth; var canvasHeight = canvas.offsetHeight; var context = canvas.getContext("2d"); var lastTime = 0; var keys = new Object(); var delta = 0; context.fillStyle = "rgb(0, 0, 0)"; context.fillRect(0, 0, canvasWidth, canvasHeight); var sprite = document.getElementById("sprite"); var x = Math.random() * (canvasWidth - sprite.width); var y = Math.random() * (canvasHeight - sprite.height); function Draw() { if (Math.random() > 0.9) { var grad = context.createLinearGradient(0, 0, canvasWidth, canvasHeight); for (var i = 0; i < 2; i++) grad.addColorStop(i, "#" + Math.floor(Math.random()*9999999).toString(16)); context.fillStyle = grad; } context.fillRect(0, 0, canvasWidth, canvasHeight); context.drawImage(sprite, x, y); } function keyDown(e) { e = e || window.event; if(e.keyCode == '87') { y += delta; } else if (e.keyCode == '83') { y -= delta; } else if (e.keyCode == '65') { x += delta; } else if (e.keyCode == '68') { x -= delta; } } function Update() { var now = Date.now(); if(lastTime === 0) { lastTime = now; } delta = now - lastTime; lastTime = now; } var fps = 60; var intervalId = setInterval(function() { Update(); Draw(); }, 1000 / fps); document.onkeydown = keyDown; } } </script> <img id="sprite" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTFH80I3AAABDElEQVRYR8XOC27CMBBFUVbQNWVnzc4pZETGTk4+tiVa6UjtA9/p4/Xz/Gccv4njzjzPTdQ4wHGleAs1NzgudrHfn1t279AucFy0HD0y9A8o2EXtxDEo1kPtxDEo1kPtxDEo1kPtxDG0hVLbO45hGyn/PqO3xziGMjJC7cQxnMXu7uVnxtGhEboRODoyQjcCR0dG6Ebg6Ehp9PuJoyMjdCNwDAr1UDtxDIr1UDtxDIp9jHy3xjEo9qbPrr5/jGNQrIfaiWNSsIWaNY41he9Qa4+j6Yjo7TGOVh4oD2638s01jpVpmuL37cHS5rP1zTWOlXdsCZZHTqzfRws4VtYYjlH55hpH0zHRW3o8/wAvkCGGQzdTzQAAAABJRU5ErkJggg=="/> </div> </body> </html>
  2. You can't really draw a circle like that in code, round things are faked, you need to use trigonometry to plot each point.   Loop from 0 to 2?, for a rough circle, plotting points at:   x = cos(?) * r + pos.x; y = sin(?) * r + pos.y;   pos is your offset or 0, as your radius increases it won't move since sin and cos go from -1 to 1.
  3. 5 months finally did over 1,000kms in my car... Anyone want to buy it? :)
  4. Cleanup ancient spreadsheet by removing borders found in the middle of nowhere, standardise border widths, change neon colours to pastels, align text correctly, add conditional formatting, use the same formulas. No no no this is wrong, where is the old data, change it back.
  5. Snowballing and Turtling

    This sounds quite fun. I think removing fog of war is okay, check out the Starcraft maps Zone Control, and also Starcraft Evolves UMS. I imagine it playing out something like this, with a giant brawl, and position being everything (except coordination will be more difficult because you have individual players for each units, rather than controlling a single army)
  6. Agreed Inkscape can do 16.7million colours too, just like Flash, or Illustrator. While SVG's do have some use, making cartoony graphics with clean lines, or rescalable UI and buttons, this software doesn't appear to solve any problems? Not only is converting a photo to a vector relatively useless - why do you want to scale a photo up that much, you could just load more, most cameras take photos at a very high resolution - vectors are also very low performance compared to standard bitmap data. I don't see any GPU's out there that let you push SVG points. Unless your photo is very repetitive, you are going to end up with an SVG rectangle for every pixel, making very little space gain (if not negative, SVG is stored in XML), and also reducing rendering performance. Flash less interactive than your app? You could develop the Flash IDE in Flash theoretically.
  7. Making money with HTML5 games, thoughts?

    Simon, you seem to be concentrating on multiplayer games only: Even World of Warcraft has problems with people finding ways to modify the client. People cheating in PvP by removing walls \ doors from their local maps, making other characters heads much larger so they can be seen from a distance etcetera. Yes this could be solved if they went ahead and did server-side collision checking, but apparently it's not worth the work and extra processing power required for that very large company. Imagine how much easier it would be to modify if they gave the whole client source to everyone? People already reverse-engineer 'private' servers for many of these pay-to-play games, but it does take months to years before they get released. I see two issues. - Modification and re-hosting (especially if they reverse engineer the server too), removing the need for users to spend money on the original game at all. - Easier hacking & modification, now nothing can be calculated client-side. Your 'perfect solution' is at the level of rendering server-side and pushing through video, and just letting the client send input. (Not a solution that is going to work for Australian players) You can say it is irrelevant and that the game has been designed incorrectly if something is dependent on client-side calculation, but I think it's just a reality in many games.
  8. Making money with HTML5 games, thoughts?

    I think a large part of the problem is that Javascript is the only language you can use to hit all the browsers supporting HTML5, and it is plain-text and cannot be pre-compiled. Although tools exist to minify and obfuscate your Javascript there are many tools to do the reverse. I don't think transactions are the big problem, they can occur securely, but actually restricting the benefit. Imagine you download all the HTML, Images, Sounds, Javascript with your browser, re-host them, and removed the Javascript saying if (purchased == true)... Well, now users have no reason to complete a purchase. Of course with an MMO you can validate server-side so other clients won't see you in all your epic gear, and you can't spend your fake gold where you edited variable x, but you get the point.
  9. Coral Blitz - The Underwater Puzzle Game

    [size=4][font=arial, helvetica, sans-serif]We are happy to announce 100% of revenue for June will be donated to the Marine Conservation Society – the UK charity for the protection of our seas, shores and wildlife. Reg Charity no. England and Wales No. 1004005 | Scotland No. SC037480. Furthermore we will be making ongoing donations of 5% profit.[/font][/size] [font=arial, helvetica, sans-serif]Please try it out, give us feedback, and share to your friends, it's a worthy cause![/font]
  10. Hey GameDev'ers! Just wanted to announce my latest game, an underwater themed 'blitz' puzzle on Facebook. Very grateful to anyone who has a go, and optionally gives some constructive feedback! Try it out today! [url="http://apps.facebook.com/coralblitz"]http://apps.facebook.com/coralblitz[/url] [img]http://dl.dropbox.com/u/6606174/titleshot.png[/img] [img]http://dl.dropbox.com/u/6606174/gameplay.png[/img] Feel free to like us on... [url="http://www.facebook.com/coralblitz"]http://www.facebook.com/coralblitz[/url] [url="http://www.twitter,com/coralblitz"]http://www.twitter,com/coralblitz[/url]
  11. Puzzle Attack is a match-3 game developed by myself, based on some other popular Facebook games. In this journal I want to talk about the benefits of integrating social networks such as Facebook into your game, and how you can measure these benefits with services such as Google Analytics. First let me say, it's incredibly hard to develop a Facebook integrated game while travelling in China! I can't test the game in production or any of the sharing features whatsoever, I submit all errors as 'events' to the Google Analytics api to track any errors, none so far other than a few connection errors when I ran the game locally. I made a few changes the other day so you can see a number of connection errors. (0 = Connection Failed, 2 = Web Service Error, 7 = Database Error) You can also track data such as the major landing pages, (always the same since this is a game rather than a web page we are tracking) and the exit pages. It is concerning me that more people exit mid-game than from the main menu, and there is a 15% bounce rate in the initial connecting page. I track events such as inviting friends, and sharing highscores \ achievements via page views. The sharing clearly correlates with new users joining. It's really interesting watching the daily progress, the game has not been marketed or shared anywhere (previous to this post), but somehow I got a hit from a player in the Philippines, and it has spread to a number of players there, and branched over to Malaysia and the USA. I'll be sure to share future progress when \ if there is a larger data-set.
  12. Puzzle Attack

    [img]http://puzzleattack.com/resources/920x368.png[/img] [url="http://www.puzzleattack.com"]Puzzle Attack - Play Here[/url] Decided I'd have a go re-creating some popular Facebook games in Flash, Puzzle Attack is heavily integrated with Google Analytics which was very easy to do. Analytics works great, the game was played by one person in the Phillipines who shared their score, and I've watched it spread over that country, over into Malaysia, then another branch started in France, going over Europe now. [img]http://puzzleattack.com/resources/ScreenshotCrop.png[/img] Has standard Match-3 Blitz (1 minute) game play, mtx for extra currency which can be earnt normally through daily rewards and playing matches.