Quantcast
Browsing all 229 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

HTML5 Canvas Particles Fountain Explosion with Gravity

One of my previous posts talked about implementing gravity in our canvas experiments. Eventually, we made a realistic bouncing ball. We’ll kind of extend that experiment to make a quick fountain...

View Article


Image may be NSFW.
Clik here to view.

Moving/Scrolling/Sliding Background in HTML5 Canvas

Sometimes your game or canvas experiment might have one or more layers of animating backgrounds that are set in motion for the player’s movement or some other reason (like creating a parallax effect?)....

View Article


Image may be NSFW.
Clik here to view.

Canvas Text Gradients for Backgrounds and Strokes

Text gradients are super easy to achieve with HTML5 Canvas. Process Here’s the process: Step 1 Create your CanvasGradient object with createLinearGradient. Step 2 Add your Gradient Color Stops. Step 3...

View Article

Image may be NSFW.
Clik here to view.

HTML5 Canvas and Friction

So you started moving an object on your canvas by manipulating vx and vy, i.e., velocity on the x and y axis. But then, you just realized that in real world scenarios the speed of an object reduces...

View Article

Image may be NSFW.
Clik here to view.

Canvas Rotating and Scaling Images Around a Particular Point

Transforming objects in your HTML5 Game or Experiment requires a bit of understanding regarding how they work. The behaviour and end result is not as intuitive as CSS3 transform functions like rotate()...

View Article


Image may be NSFW.
Clik here to view.

Different Tools for Our Sketching Application

It is important for our painting application to have different tools like: Line tool to draw straight lines. Rectangle tool to draw rectangles. Circle tool to draw circles. Eraser tool for erasing...

View Article

Image may be NSFW.
Clik here to view.

Rendering Animations with Moving Objects on Canvas

Moving objects on HTML5 Canvas is really easy. I should have written on this topic before writing on gravity but it’s never too late! Let’s get started with the basics. Canvas Coordinate System I’ll...

View Article

Image may be NSFW.
Clik here to view.

Optimizing HTML5 Canvas to Improve your Game Performance

So, I have coded a game this month for the github game compo. Named it “Pappu Pakia“. My first HTML5 Game with beautiful graphics by Kushagra. When I was done coding, it was pretty exciting until I...

View Article


Image may be NSFW.
Clik here to view.

Controlling the Frame Rate with requestAnimationFrame

Limiting the frame rate while using requestAnimationFrame can be a common want especially when coding Games where you want your animations and mechanics to not exceed a particular mark of frames per...

View Article


Image may be NSFW.
Clik here to view.

Fixing Node Mysql “Error: Cannot enqueue Handshake after invoking quit.”

TL;DR You need to establish a new connection by calling the createConnection method after every disconnection. I was using the popular Mysql module for Node.js which is node-mysql and everytime, after...

View Article

Image may be NSFW.
Clik here to view.

Parsing CSS In Javascript

Recently I have been working on a project where a user can change some values inside a UI widget via form elements like input fields, range, etc. that would in turn change CSS code inside a CodeMirror...

View Article

Image may be NSFW.
Clik here to view.

Time Based Animations in HTML5 Games: Why and How to Implement them

If you’re new to web based games development, especially HTML5 games, then you might be dealing with slow performance on low end devices like mobile phones, tablets, old laptops etc. This is a general...

View Article

Image may be NSFW.
Clik here to view.

Games Physics: Basics and Implementation of Predictive Collision Detection

Few days ago, I wrote a post about why time based animations are better than frame based animations. However, in animations done as a function of time, some serious problems could arise. One of them is...

View Article


Image may be NSFW.
Clik here to view.

Scaling Your HTML5 Canvas to Fit Different ViewPorts (or Resolutions)

I am going to share a neat little trick that was learnt while working on an HTML5 game recently. The game is pretty much like our HTML5 Doodle Jump. We had to make sure that the game scales down very...

View Article

Image may be NSFW.
Clik here to view.

Remote Mobile Web Application Debugging with Weinre

Weinre (WEb INspector REmote) – pronounced as ‘winery’ – is an excellent tool that reuses the code from the webkit web inspector to allow remote webpage debugging (basically what firebug or chrome dev...

View Article


Image may be NSFW.
Clik here to view.

Using Adobe Edge Inspect for Cross-Device Web Page Debugging and Synchronized...

Using Adobe Edge Inspect you can inspect your webpages (like you do in chrome dev tools) across various remote devices (mobiles, tablets, etc.). You basically connect multiple iOS or Android devices to...

View Article

Image may be NSFW.
Clik here to view.

How To Use Twitter OAuth with node-oauth in your Node.js / Express Application

I am building a Node.js application where I want the users to be able to signup with their twitter credentials rather than remembering another set of username/pasword. My framework of choice is...

View Article


Image may be NSFW.
Clik here to view.

Remote Web App JavaScript Debugging with JSConsole.com

I’ve written a few posts on remote debugging before, using edge inspect and weinre. They’re definitely very good at the problem they try to solve but today I came across a new Javascript-only remote...

View Article

Image may be NSFW.
Clik here to view.

Run CoffeeScript Node.js Apps on Heroku

If you’ve written your Node.js app in coffeescript entirely and at the time of deploying on Heroku wondering how heroku would execute your coffee code, then here’s the simple process that you need to...

View Article

Image may be NSFW.
Clik here to view.

Using CoffeeScript over JavaScript in your Node.js Application or Module

If you’ve wanted to code your next Node.js app in CoffeeScript then it ain’t that hard. Since coffeescript is just a little language that compiles down to javascript it is pretty much compatible with...

View Article
Browsing all 229 articles
Browse latest View live