DEV Community

Cover image for A plushy controlled game (Part 1)
Tom Cools
Tom Cools

Posted on • Originally published at tomcools.be on

1 1

A plushy controlled game (Part 1)

I have been fascinated by video games ever since I saw the first level of Mario. They dominated a big part of my youth and are what got me into programming in the first place. Building a website for our Call of Duty clan was probably one of the first times I came into contact with HTML and CSS.

Recently however, my fascination has shifted from playing games, to discovering how they are built. Physics are a big part of what makes a game feel natural, making things fall with gravity, being blown away by wind, etc.
I had no idea how to even start coding physics, until colleague of mine told me about this great book he had read: The Nature of Code.
The book describes in incredible detail how you could program physics in a pretty clear and straightforward way.
Best of all, you can find it online, for free! :o

Next to the physics part, how your audience interacts with your game determines a lot of the experience.
I have always loved the idea of using a camera to control your game so I decided I wanted to use my laptop camera as the main way to interact with the game.

What are we building?

So what do you get when you mix physics and computer vision? A demo concept "game" controlled by a plush animal! So fluffy! <3

In this first post we will focus on the basic elements of a game.
We'll cover how to draw items on a canvas and program in some realistic looking physics. As this blog post contains a lot of examples with Javascript which could not be posted on dev.to, please read the blog on my own personal website.

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay