Posts

Showing posts from January, 2023

Minigame Monday: Pathing

Image
  Pathing: The concept:  Sorry about not putting out a minigame last week! I was suffering from a nasty cold, which luckily has mostly gone now. For this minigame, I wanted to use C++ scripting in Unreal. I started with a top down game, and was instantly interested by the pathing that the player followed when you gave it a location (in other news, I've been looking into the A* pathing algorithm, but in this game I didn't play with the algorithm, I just used it). After tweaking how the player was controlled a bit, I decided to make a maze game, where the character will automatically path, but will path into barriers that will reset their position if the player doesn't take care of them. The challenge: The big issue I faced here was finding the right Unreal API to do the things I wanted to do. At first, this project lulled me into a false sense of security; holding down the button made the player move directly to the cursor; I didn't want that, so I adapted the code so ho

Minigame Monday: Node Problem

Image
  Node Problem The concept: Back to Python for this one; I saw something I thought was pretty cool looking in the header for a website, so I decided to remake it and expand on it. The concept is a series of dots, moving randomly, that form lines between them as they approach each other, with the strength of the line increasing as they get closer. This creates a very cool looking effect, with shapes forming and vanishing as the nodes move past one another. This minigame therefore is less of a game, and more of a digital toy. The challenge: I decided that the best way to do this was to have a seperate class for the nodes, so each instance of a node would store the nodes position, speed and direction. It would also have a function to move the node, using a bit of trigonometry to calculate the correct position to move to: self . pos = ( math . sin ( self . rot ) * self . speed + self . pos [ 0 ],                  math . cos ( self . rot ) * self . speed + self . pos [ 1 ])  For instanci

Minigame Monday: Selection Boxes

Image
  Selection Boxes: The concept: Happy new year! For my first minigame of 2023, I wanted to do another game in Unity, and practice with some of the areas I wanted to learn more about. The main thing I wanted to do was play around with converting between screen and game co-ordinates, so this turned out to be another project where I started working on the game before I actually knew what the gameplay would be! After getting the rough behaviour in, I quickly realised I wanted to make a level based puzzle game using it. The challenge: My rough idea was that I wanted the player to be able to draw a box on screen, select objects, and move them around the screen. Breaking this down into steps, the first thing I needed to do was draw the box. To do this, I recorded the point at which the player first clicked, and then converted this point and where the mouse currently was into a box. I then converted these co-ordinates into world space, making sure to provide a z co-ordinate away from the camer