Posts for: #GameDev

Clay Bang Physics Troubleshooting

Oh for the love of Clay-Bang Physics

When I initially thought of making the clays fly in my game, I thought of using lines with randomized curves and making the pigeons fly along the line.

Once I finally got to making it, Love2D has a very extensive physics engine which is a port of Box2D so I thought “What if we use physics instead?”

I believe that once humans have a complete understanding of physics, we can be the masters of our own universe. I also believe that with enough physics calculations, I can be the master of clay-bang’s universe. Maybe once I finish this game I’ll set my sights to dark matter research, but for now, I’ll master projectile motion.

Read more

Time to add buttons to Clay-Bang

It is time to add some menu functionality to Clay Bang. I had followed a previous tutorial creating some buttons and running them in main.lua

pretty meh

This is good, but I want these to be centered. These are my three buttons in menu.lua. They will help with state management too.

self.buttons = {
  {text = "Start Game", x = 100, y = 100, width = 200, height = 50, action = function() State = "play" end},
  {text = "Settings", x = 100, y = 200, width = 200, height = 50, action = function() State = "SettingsMenu" end},
  {text = "Quit", x = 100, y = 400, width = 200, height = 50, action = function() love.event.quit() end},
}

In games, you are able to resize your window to different resolutions. How am I supposed to click if I only have a 30x30 monitor?

Read more