Brand Focus

Dealing with Social Collision? Check Out These Quick Tips!

Dealing with Social Collision? Check Out These Quick Tips!

Okay, so I’ve been messing around with this idea I’m calling “Social Collision.” It’s kinda like, simulating how people bump into each other, you know, like at a party or something.

Dealing with Social Collision? Check Out These Quick Tips!

Getting Started

First, I just needed some, like, digital people. So I whipped up these little circle things. Nothing fancy, just basic shapes.

Making them move

Then, I had to get them moving around. The first thing I tried was just random directions. I put a loop and then they just, like, zoomed all over the place. Totally chaotic, looked like a bunch of ants on a sugar rush.

  • Created basic circle objects to represent people.
  • Gave them random initial directions and velocities.

Bouncing Off Walls

Of course, they kept flying off the screen. So, next step was making them bounce off the edges. That was pretty straightforward. Just check if they hit a wall, and if they did, reverse their direction on that axis. Feels Kind of like playing pong with the edge of the screen, i guess.

The Collision Part

Now for the fun stuff – the actual collisions! This took a bit more thinking. Basically, I needed to check if any two circles were overlapping. If they were, they needed to “bounce” off each other. The easy mode i used is to just reverse their directions when they hit. Made them look like little bumper cars.

  • Implemented a simple collision detection system.
  • When two circles overlap, reverse their velocities to simulate a “bounce.”

Adding More

Then I set up the number and let them run from 10 to 50 to 100, it really became interesting. I also made some small changes, now they are looked more like gas molecules bouncing around. That’s it, simple, right?

Dealing with Social Collision? Check Out These Quick Tips!

It’s still super basic, but it’s kinda mesmerizing to watch. I might try adding some more, like, “social” rules later. Maybe some circles are “friends” and try to stick together, or some are “shy” and try to avoid others. Could be cool!

Shares:

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *