Posts Tagged ‘pixel’
-
Pixel Perfect scaling a Phaser game
1st Aug 201420With GBJam3 just started today I tend to get asked this a lot on twitter: “How do I scale my game and keep it crisp?”
This is a perfectly valid question and is essential for games that rely on pixel art. And the answer is that there is no 100% fully cross-browser compatible solution. There are various CSS hacks and vendor prefixes you can try, but they won’t work on everything.
However, if that was my final answer there would be no point in this blog post, right? When we created our lowrez jam game, which was a game running at a 32×32 resolution, we came up with the following approach that works much more reliably than any CSS hack. Here’s how to get it working:
For this example I’ll assume you are making a GBJam game, so you’ve a restriction of 160 x 144 pixels. The same as the original Gameboy resolution. First create your Phaser game object:
var game = new Phaser.Game(160, 144, Phaser.CANVAS, '', { init: init, preload: preload, create: create, render: render });
The important things to note here are:
- Use the un-scaled resolution
- Always use Phaser.CANVAS as the render method
- Give an empty string as the DOM parent (the 4th parameter)
Once the game object is created we use a new object to hold our scaled canvas:
var pixel = { scale: 4, canvas: null, context: null, width: 0, height: 0 }
-
New RGCD Logo
31st Aug 2012If somehow you’re not already familiar with RGCD, you should be. Now even cooler with a brand new logo by yours truly.
-
Soundbytes 10 Poster
2nd Nov 2011If you’re into retro gaming, chances are you like chipmusic (or chiptunes) as well. For a couple of years now I’ve been pixelling posters for the Soundbytes chipmusic event series in Melbourne, but this is the first one I’ll actually be attending, yay! You can see all the posters in the series HERE.
-
Pixel Application for Mobile Phones
15th Sep 2009Here’s a little app I concieved years ago, while I was still wasting a couple of hours every day riding the bus to work. It’s a program for making pixel graphics, and has a very streamlined interface that has been designed especially for use with mobile phones, on the bus, in a park, on the toilet…
This is a mockup for 176*208 phones. I might make another one in 240*320 soon.
Here’s a version with the help overlay turned on, which gives you a glimpse of the awesomestness of the interface 😀
So, if you are a J2ME or Symbian programmer, and interested in this kind of endeavours, drop me a line.
Hire Us
All about Photon Storm and our
HTML5 game development services
Recent Posts
OurGames
Filter our Content
- ActionScript3
- Art
- Cool Links
- Demoscene
- Flash Game Dev Tips
- Game Development
- Gaming
- Geek Shopping
- HTML5
- In the Media
- Phaser
- Phaser 3
- Projects
Brain Food