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

Hugo Shortcodes Pt. 3

Finally, a shortcode worth making

I have returned with a shortcode that ended up being pretty handy for me.

When using links with Hugo in Markdown I can use [text to display](url) to display the links and it works. It’s clickable, it takes you to the site, nothing wrong with it.

Me being me of course, couldn’t overlook the simple thing that the URL’s don’t take you to another tab. What is this, the 90s?

Read more

Advent Of Code 2024 Day 1

Better late than never!

I’ve never done Advent of Code, which is a series of Christmas themed programming challenges. I’m always looking for ways to strengthen my Python so time to join the game. A new puzzle is released every day and I’m 12 days behind so let’s get started!

The Chief Historian is missing!

He hasn’t been seen in months and we need to find him before the big day when the sleigh goes off.

Read more

Hugo Shortcodes Pt. 2

Riveting conclusion

In my previous post I had an initial tutorial for creating shortcodes. I had made a floating image with some text on the right. I thought I had succeeded, that I won. When I looked at it again the CSS styling and editing was gonna be tricky. I had lost the Markdownification that Hugo makes so my headers and text just looks like plain HTML text. fixing that would’ve taken me a while.

Read more

Learning Shortcodes in Hugo

Pictures are worth a thousand words

I wanted to start adding some content to my showcase and thought of displaying an image of the repository with some text next to it. Sounds easy enough, right?

The Hugo framework is amazing, really fast and really easy to add content. In other posts, I was ok with slapping the image on it but encountered some limitations with needing to modify the images.

Read more