Posts

Minigame Monday: Get it out!

Image
  Get it out! The concept: This week, I was given the suggestion of doing some kind of sliding block puzzle. One approach to this would have been to build up a framework, and then create a few positions and allow the player to play through them as seperate levels. That wasn't the route I went down; instead I decided to create a game that would automatically generate its own positions for the player to solve. The challenge: The big challenge here is of course finding a way of generating puzzle positions, but first I needed to decide on a format for the game, and build up a framework. I decided the puzzle would involve a grid containing a number of balls that would all move together on a key press, and the player would have to work out how to move the balls in such a way that they will only enter allowed cells, while trying to move all of the balls out of the grid through holes in the edge. While setting this up, I made sure to work on variable grid sizes, to allow the size of the gr...

Minigame Monday: Asteroid Universe

Image
  Asteroid Universe: The Concept: Do you know what shape the universe in the game asteroids is? I found out when I was younger by watching the Royal Institution Christmas Lectures that it's actually a donut. If you project the game onto a donut, you'll find that if you go off the top, you come back on the bottom, and if you go off the side you'll come back on the other side, just like the game. But what if the game universe was a different shape? This week's minigame experiments with that, allowing you to change the shape of the universe as you play. The Challenge: So to change the shape of the asteroid universe, first I needed to recreate the game. I started with the ship physics. Controlling rotation was simple, drawing the rotated image less so. The issue with rotating the image is that pygame images are by default positioned at their top left, so if you rotate them, they rotate around that, rather than around their center. This needs to be accounted for when rotatin...

Minigame Monday: A Shade Different

Image
  A Shade Different: The Concept: This was actually an idea suggested by my sister, after seeing the concept on TikTok.  You are shown a number of blocks of colour, one of which is slightly different, and you have to click the different one. Simple, right? This was a slightly quicker minigame, as I'm also working with a team for Game Off 2020, so look forward to that at the end of the month. Ironically, given the title, it's also very similar to Moles in Holes in terms of mechanics; the player's goal is to click on the right area of the screen. However, in this game rather than testing the player's reactions, it's testing their ability to see colour. The Challenge: As this game is mechanically similar to Moles in Holes, I was able to treat it as an exercise in adapting and repurposing code. One nice thing about doing this is it gives you a chance to review and check your previous code. One small thing I noticed was about the ordering of functions. In python you can ...

Moles in Holes

Image
  Moles in holes: The concept: I wanted to make a minigame with a little more polish this time, so I decided to make a configurable wack-a-mole game. The game itself is pretty standard: Click on a mole, it goes away and you get a point. Missclick, and you lose a point.  The challenge: I wanted to put some effort into making sure the code was super clean. One way in which I did this was using helper functions to avoid duplicating long statements. For example:     def GameCoordToScreenX ( self , x ):         return ( x * self . hole . get_size ()[ 0 ] + ( x + 1 ) * XSPACING )     def GameCoordToScreenY ( self , y ):         return ( y * self . hole . get_size ()[ 1 ] + ( y + 1 ) * YSPACING + TOPBAR )     def GameCoordToScreenPos ( self , pos ):         return ( self . GameCoordToScreenX ( pos [ 0 ]), self . GameCoordToScreenY ( pos [ 1 ])) These functions allowed me to avoid hard...

Minigame Monday: Snaker

Image
  Snaker: With the minigames I've made so far for MM, I've used Python and pygame as an easy way to quickly write simple games, something the language is great for. However, one downside to writing games in Python is that they can't be played in browser. I took a look into ways around this problem, and the main issue is that normal pygame operation would involve blocking browser updates, thus making it impossible to embed. While there may be ways to get around this using slightly different libraries, it would require a lot of refactoring code to fit. So instead of trying to use a language not designed for web apps, why not just switch to one that is? I decided to make a game in JavaScript using Phaser. ...tiny problem, I hadn't used Phaser before, and slightly bigger problem, I also hadn't used JavaScript, so making something at all playable using a language and framework I was completely blind to in a single day might be a bit of an ask. But I wasn't going to l...

Build a body

Image
Build a body Build a body was the first full game that I made, during lockdown. I wanted to make a full game in Unity, making all the assets myself, and using C# to tie them together. Seeing as I had no knowledge of 3D moddeling techniques, I knew that the bulk of the actors would need to be made out of primitives. I soon arrived at an idea where the player would start as a simple ball, rolling around, and then could find other primitives (cylinders and a block) with which you would construct a body. The order in which you find the other objects affects what you turn into, and each combination of objects has a unique way of moving. The player hopping between hills The player as a ball by the river The two images above show some of the objects that move by using Unity physics. The ball rolls around with an impulse added by the player's controls, and the hopping ball is similar but instead only moves when in the air after the player has jumped. One thing that was really useful for me...

Imperfect Control: Gameplay

Image
 As promised, in this post I'll be talking about the gameplay in Imperfect Control. As the name suggests, I wanted to do something different with this game rather than creating a typical roguelike where the player moves around the rooms. Instead, I had the idea of having the player move the enemies. Each room then becomes trying to perform the correct movements to destoy the enemies (by moving them into hazards), while at the same time making sure the player wasn't hit by any of the enemies.  Spawning: I wanted each room to have a separate parameter (which I called hazard level), detailing how difficult each room would be. Each room could then be generated with a seperate value as part of the map (Part of the reason for this was that one of the powerups I was hoping to add would reveal the hazard level of nearby rooms, unfortunatly I didn't manage to implement this). To control the spawning of each room therefore, I assigned this hazard level, and therefore the spawning, to...