HighJam #1 – Berzerkatron

UPDATE: The results of HighJam #1 are online. Berzerkatron got Second Place in Theme and Third Place in Graphics! Thank you to all those who have provided feedback. I have since updated a post-jam version of the game and to celebrate the results a new update has been uploaded. You can find out more on Itch.io.

As part of my effort to participate in one game jam a month, the month of February is HighJam. This is the first game jam is organised by HighSight Gaming, a Twitch Streamer who specialised in Indie Games with Indie Insights for a while (a show which Gemstone Keeper appeared twice on), although now it’s been replaced with a new show analysing classic games, In Hindsight.

The theme of this jam was Atari Remakes, specifically to quote the description: “you must reimagine any Atari 2600 game of your choice”. One of my favourite 2600 games made by Atari was Berzerk, originally released at arcades in 1980 and was ported to 2600 in 1982. While the rules stated that I was not limited to the graphics, sounds and mechanics of the original, I felt like doing a “modernized” look wouldn’t do so well. The concept in my mind was to do a reimagining that would be in the style of Jeff Minter. It’s most likely due to the man’s past work, I had an image in my head of a “Berzerk 2000” of sorts, with a psychedelic feel, visually creative backgrounds and random sound samples.

Click here to go straight to the game!


Here is how I developed two of the most interesting concepts of this game:

The Level Rotating Transitions

This was a feature I was really keen to make, and once I found it was possible and implement, I wanted to keep silent about it so people can witness it while playing and see what their first reaction to it was, and when watching HighSight’s Playthrough (Skip to 01:54:30) I think it’s safe to say it worked. The initial version of the cube shader was by gre on gl-transitions.com, a website I’ve used recently for Gemstone Keeper.

The shader itself fakes perspective by skewing both textures so it appears thinner when further away, and moves both so it appears like a cube.

I modified the texture to remove the reflection at the bottom as it seemed unecessary and added a variable and functions so it could not only rotate it clockwise in the Y-Axis for horizontal transitions, but rotate it in the X-Axis for vertical transitions, it was then a case of using a uniform variable for me to define which direction I want the shader to rotate towards. You can check out the modified shader in the Assets folder of the game.

Randomized Levels

Funnily enough, having the levels be randomized wasn’t out to be creative but because I couldn’t think of a quick method of creating a huge array of level designs (the original Berzerk had somewhere in the range of 1024 different level variations!).

When looking through the original Atari version, I figured the levels were all configured into a 3×3 grid (I realised I was incorrect afterwards, as the Atari 2600 had 4×3 grid levels and the Arcade version had 5×3 levels), and then by defining each segment to a binary number I could determine which segment should have walls in either or all four directions.

I’d then construct a path between the player’s starting segment and the segments of each available exit, for the the remaining segments that have no value set, I’d use a random value. This last step had to be constrained as to have as few empty rooms as possible. However, as the above gif shows, not all levels are fully explorable. I also use the grid to determine which areas enemies and civilians should appear in.

Backgrounds

Unfortunately, I didn’t have the time to plan out or work on the brilliant background effects Jeff Minter develops, but GLSL-Sandbox is an excellent gallery of GLSL shaders that render brilliant visuals without any additional assets. I decided to pick ones that were monochromatic and were visually interesting without pointing too much attention from the game itself. I also used my multipass shader system to apply a shader that added a diamond gradient and another that made it possible to crossfade between different backgrounds.

Civilians

Interestingly, the idea of civilians to rescue (idea taken from Robotron and Llamatron) was kind of a last minute idea. I added this part of the game to encourage players to explore the level and add pressure to spend more time in the level while involving Evil Otto.

I did run out of time to implement some things I wanted like particle effects, but I’m happy I managed to get a playable version done. I did take one or two days off to have some leisure (and charity work) but I feel this is worthwhile. Hopefully enough people will vote and leave a good rating on this game.

Advertisements

Global Games Jam 2018

One of my New Years Resolutions is to take part in at least one games jam each month. This was a goal I set myself so I could develop more variety of games for the year of 2018. For myself, the games jam of January (and first games jam of the year) was Global Games Jam 2018, taking place on site at Staffordshire University in Stoke-on-Trent.

https://static-cdn.jtvnw.net/ttv-boxart/Global%20Game%20Jam.jpg

I’ve regularly participated at GGJ since 2013 at the Stafford Campus, however in 2016 the Stafford Campus eventually closed its doors and all the departments (Computer Science, Game Development, Web Development, Film, TV and Music etc) were all moved to the Stoke Campus. I skipped 2017 after a lot of regular GGJ attendees were put off by travelling to Stoke and hearing that because of security issues they couldn’t allow overnight stay. Near the end of 2017, one of my friends asked if I was interested in going since she was going as well, so I thought “Sure, why not?”.

Stoke Campus has improved a lot since I went there on rare occasions as a Student, and GGJ became a lot more organised on that site. Gone were the days where getting a table or a PC being a free-for-all, as people had to get tickets in advance for what kind of room they want, and each room had plenty of machines with the latest software (especially for Unity and Unreal Engine 4 developers). Gone were the days of little to no security or support since all rooms required a badge to get into (all attendees received badges at the start of the day) and the jam had volunteers available to provide support for the entire 48 hours. Gone were the lack of food and drinks on site as free fruit, tea and coffee were available on site, and with both Subway and the University’s Student Union Bar open all weekend and a short walk from the site.

The games jam began with a keynote, featuring tips & tricks from Unity, an ad for the Amazon Appstore, a celebration of 10 years of GGJ, a talk from Robin Hunicke and an 80s style workout video from Thorsten S. Wiedemann. The audience was riffing the whole keynote up until the theme announcement, which was fun and all but I did feel bad for Robin’s talk as she was giving an inspiring talk that was meant to encourage interesting stories and concepts, but the six minutes of nonstop talking with an unchanging shot of the San Francisco Bay Area bored almost everyone.

The theme was Transmission, and the theme announcement segment implied this could be anything from communication, to mechanical to passing one thing to another. Our team consisted of myself, my friend Kira, programmer James and two 3D modellers, Benz and Matt. We came up with the idea of a twin-stick shooter where you move along sound waves. James did an incredible job of generating sound waves visually using vertex shaders and lining up the player position with the line, Kira created a tone generator for the game to use, and I worked on enemy behaviour, management, bullets, GUI and main menus, and we all chipped in where we could to get the game in a finished state. Benz and Matt worked on the in-game models, as well as a nebula skybox. Here is the progress in tweets:

So we managed to finish with about an hour or two to spare, which is very good for us. I hardly post much about what I’ve worked on at GGJ because in most of the events they end up not finished, but this is the third out of five GGJs that ended up being finished. So here’s our game: Formants

Let’s see what the games jam of February will be.

New Years Resolutions

Good evening everyone! It’s no doubt that 2017 has been a hell of a year following what happened in 2016, but we fought through and we are still here fighting! This year has also been huge in terms of game development for me. I managed to finish SEVEN games this year, six from game jams such as #RemakeJam, PROCJam, Jamchester and Three Ludum Dares!

https://img.itch.zone/aW1hZ2UvMTYzMjc3Lzc1MjE2Ni5naWY=/315x250%23c/L0i8g2.gif  https://img.itch.zone/aW1hZ2UvMjAxMDM1LzkzOTE3OC5naWY=/315x250%23c/q5QpUK.gif

The seventh game was the nearly two year project Gemstone Keeper, which made an initial release on March 31st earlier this year and has since had numerous updates, although grouped together as four updates. The most recent of which was 1.0.4 that was announced on 21st of December. The game is currently on part of the Steam Winter Sale, and is currently 50% off!

Gemstone Keeper also had a second smaller release as it was ported to Linux, the build being available on Steam in June. I documented the progress to port the game in three blog posts (part 1, part 2 and part 3), and got a small amount of coverage from dedicated linux gaming websites as a result.

There was also an accomplishment in travel as well, 2017 was the year I went to both GDC in San Francisco and Develop in Brighton for the first time! Both events were great opportunities to meet up and socialise with fellow game developers and listen to talks from great minds such as Ken Perlin, John and Brenda Romero, Jordan Mechnar and Tim Sweeny.

As for 2018, I want to set some goals. As with many New Years Resolutions, chances are they will be forgotten and unaccomplished, but considering I managed to lose weight this year, I might pull through with a bit of committment.

First one is that I want to take part in at least one game jam a month, meaning I’d be finishing 12 games next year. I like the challenge and creativity from game jams, but this year I feel like six isn’t enough. At least spacing out the game jams to one a month will give me time to find a weekend or so to get my head down and finish something.

Second one is to get a game on console. It’s not like I haven’t bothered trying before (I’ve reached out to Nintendo about developing Gemstone Keeper for the Switch to no avail), but it would be nice to expand my work beyond desktop PCs and web development. Porting my own game to Linux should show how when I put my mind to it, building a game to another platform by hand is possible, and it would be great to show I can do that on one of the three main systems.

Thanks for reading and have a happy new year everyone!

The More You Have, the Worse It Gets

Ludum Dare 40 took place last weekend, the theme was the title above. Honestly it wasn’t the theme I was hoping for, but in the end, I took an idea I had and adjusted it slightly to work.

The idea I had was that a single level would slowly get corrupted and change, you can shoot away the corruption, but touching the corruption would kill you. This already could fit the theme quite well, the more corruption in the world means the worse it is for you. I wanted players to move around a lot, so I had the additional goal of collecting glitch boxes, which would create more corruption over time.

I used HaxeFlixel to develop the game, as it was bread-and-butter for me in game jams such as Ludum Dare, especially when there is not much time to work on an idea (I had spent the entire Saturday out with friends for winter festivities, all I did was write notes on what the idea would be, so in all I only had around 11 hours to work on a game).

b056


To get the corruption to update and move around, I used the tilemap system and updated the grid with Conway’s Game of Life algorithm, that way it gave the impression of mutating outwards or dying out depending on the numbers. Fortunately, with recent updates to HaxeFlixel, you could do collision response based on specific tiles, so it was easily possible to remove tiles and change the map when bullets collided with it. The extra artefacts also use Conway’s Game of Life. although the grid is 4 times larger than the main corruption grid.

The artwork was done in Photoshop, although it was a very simple and rushed job. The “corrupt” graphics was a multicoloured character set that I had to create and tweak by hand to fit into a 10×10 pixel grid.

The music was a combination of cgMusic and LMMS, quite a good combo to have because it meant I let one program generate a music set, then import it into LMMS as a midi file for me to set instruments (using soundfonts), effects and tweak the melodies how I like.

I managed to upload the game with around 30 minutes left before the compo deadline!

b05c

On Tuesday I fixed that timer, which appeared broken when you reached a minute because I messed up how the string was being built. It took a few uploads for those changes to appear, something that kind of frustrates me about HTML5 and how web browsers will not always clear out the cache if the content has been changed.

GIF

Feel free to play the game on itch.io as well as rate or comment on the Ludum Dare page.


This wasn’t the only games jam I did this winter, I also took part in PROCJAM, where I built a planet generator. It’s not my best work to be honest, although I was able to work and improve my 3D OpenGL rendering in the Vigilante Framework.

Managing Content and the Joys of Smart Pointers

Hello everyone, I figured I’d write a post about something I’ve been working on for the last week or so, partly as a bit of advice for some budding programmer wanting to write a bit more low level games programming stuff, but also to try and explain why it has been several weeks since I last posted about a small prototype I’ve been working on, and why I have been posting less stuff on Twitter than usual.

To put it basically, a lot of C++ work, mostly involving Gemstone Keeper. I decided to go back to it one more time after a lot of bugs and feedback came in. By the time I’ve posted this, Gemstone Keeper has been updated to version 1.0.3, which includes bug fixes, UI updates and two new enemy types.

j7fcaz6

 

While most of this wasn’t planned (most of this would have happened much earlier if I was notified on Steam within days of it being reported), but it had been on mind for a particular reason.

To put it simply, I have been updating my C++ game framework, the Vigilante Game Framework. This is the framework that I had built up alongside the game it was made for, Gemstone Keeper, before open-sourcing it in the hopes that it could be improved for more projects. I noticed a problem with the content management system, and as such I had spent the last two weeks researching and implementing a new way that would make it more optimal while keeping it stable. Because of this, Gemstone Keeper will soon be updated with this improvement among other bug fixes, and any future games using the VFramework will feature this too.

dytc50n


Here is the original code for loading and setting an sf::Texture in my content system, according to the repository for Gemstone Keeper this was initally written around Feburary 2016, and aside from one change in April this remained how it was:

bool VContent::LoadTexture(const sf::String& name, sf::Texture &texture)
{
   if (FindTexture(name))
   {
      texture = textureDir[name];
      return true;
   }
   else
   {
      if (texture.loadFromFile(name))
      {
         VLog("%s loaded", name.toAnsiString().c_str());
         textureDir.insert(textureDir.begin(), std::pair<sf::String, sf::Texture>(name, texture));
         return true;
      }
   }

   VLog("Error loading texture: %s", name.toAnsiString().c_str());
   return false;
}

The approach should be fairly straightforward:

  • If a texture exists, set it to the texture object and return true.
  • If it doesn’t exist, load it using the texture object. Return true if load is successful.
  • If it cannot load, return false.

However there is one problem, setting the texture object doesn’t set the reference, despite passing the object in as a reference (hence the &). Instead it creates a copy, with a new texture ID and references.

Performance wise, this doesn’t have much of an issue, however memory wise there could be a concern with creating several sprites with the intention of using the same texture, but it isn’t. The intent of a content manager is to load, unload and store a single instance of an asset, with any objects merely referencing that content. I investigated a number of approaches (and spoke with eXpl0it3r of the SFML team) to find the right one.

The approach I finally went with required the following changes:

  • The load function should return the object itself as a non-pointer reference, not a bool. This is to ensure that if the loading or finding process goes wrong, the program should let you know and fail. The reason for a non-pointer is to ensure you wouldn’t return a NULL object. Returning a reference makes sure not to return a newly created copy.
  • If it cannot be loaded, an exception should be thrown. Exception handling is an ideal alternative to responding to function returning false, because it’ll make a function closing on failure much easier.
  • The texture should be stored as a unique pointer.

The reason for a unique pointer, instead of a regular or “raw” pointer, is to ensure that the object only has one true owner, and that once it’s dereferenced (either by closing the game or unloading it) it’ll be properly destroyed and unable to be used by other objects, all with little to no difference in performance. While a unique pointer cannot have more than one reference, the raw pointer can still be obtained and used, just make sure that once the content is unloaded there aren’t any active objects still referencing it.

This is what the texture loading function looks like now (from the Github Repository):

sf::Texture& VContent::LoadTexture(const sf::String& name)
{
   auto found = textureDir.find(name);
   if (found == textureDir.end())
   {
      std::unique_ptr<sf::Texture> texture = std::unique_ptr<sf::Texture>(new sf::Texture());
      if (texture->loadFromFile(name))
      {
         VBase::VLog("%s loaded", name.toAnsiString().c_str());
         textureDir[name] = std::move(texture);
      }
      else
      {
 #ifndef __linux__
         throw std::exception(("Error loading texture: " + name.toAnsiString()).c_str());
 #else
         throw ("Error loading texture: " + name.toAnsiString());
 #endif
      }
   }

   return *textureDir[name];
}

To use the functions in this format, I had to change a lot of objects around the game. Textures, Images, Fonts and SoundBuffers all changed to use raw pointers, and the returned values from the functions are converted to functions as well.

texture = &VGlobal::p()->Content->LoadTexture(filename);
sprite.setTexture(*texture);

This ensured that the object being set is has the same reference as the object being returned, no more copying data, no more instantiating new objects to handle the copy.

I’ve also turned a lot of other objects into unique pointers, particularly the objects in VGlobal, which is intended to only have one instance of. It’s ideal since these ones are all destroyed at the end, and in a scenario where an object could be replaced with another one, the unique pointer can destroy the old one in order to replace the new one.

Other small changes I’ve made to update the framework includes all objects that load textures now having an optional area rectangle. This was mainly put in if multiple sprites use the same texture, but different atlases. Best example would be in the LoadGraphic and setSize functions of VSprite, where the default parameter will ensure the whole texture is used, else the animation system will restrict the render area of the sprite to that rectangle. While sf::Texture does have the ability to load a rectangle area of a texture to an object, I feel like this only adds a separate texture, instead of the one loaded and taken from VContent. At some point I’d like to use this more for Gemstone Keeper and other games, as I see reducing the texture count and having more render calls using the same texture would have additional benefits, no matter how small.

Hopefully more changes like these will benefit games I make with this framework, I’d also like to use more smart pointers, maybe shared pointers for my general objects, but for the time being, I’ve got a project to get back to.

All the jams!

I was meaning to post this sooner, but along with work piling up and losing track, I did quite a few game jams. Three in particular: RemakeJam, Jamchester and Ludum Dare.

  

I’ll mention Running The Marathon first, because I only finished the game two days ago from posting. This was made for Ludum Dare 39, which makes it the 10th Ludum Dare I participated (and 9th I submitted a game independently). This was a bit of a last minute entry because until Saturday evening, I had no intention of making something for LD. What changed my mind was a game idea I was coming up with as a joke, running a marathon and making sure you don’t run out of energy. What I ended up with was a bit of a joke on the Track & Field concept, by having rapid button presses make your chances at success worse. Because of how little time I worked on this, the background animations and sounds are lacking, although I do think the running animation on the player turned out okay.

4i8mLl.gif

As is the tradition of Ludum Dare, voting will be going on by all participants for a total of three weeks. Any Ludum Dare entrants can go to the game’s Ludum Dare event page to vote and comment.

Next I’ll talk about Dash Dodge, which was developed for Jamchester 2017, a professional games jam that I took part in last year. This year, I was in a team which consisted of another programmer & sound designer (Jessica Winters) and two artists ( and ). All in all, this was a great team to work with, and we had a heavily planned out game about combatting bosses using only dashing, with a time travel element, although we may have over-anticipated our goals a bit. Needless to say, we made a game with a nice visual style and some neat mechanics thrown around. Hopefully at some point in the future I would like to work with these three again at some point.

Finally, there is 8-Bit Theater: Black Mage is in a Shooting Game. This game, developed for RemakeJam, is a remake of a previous game of mine. In particular, this is a remake of the first game I ever made from back in 2010. What was great about working on this is that I still have the original source project and most of the original assets and notes, although I did have to dig through Google for a copy of GameMaker 8.1 in order to view the original project. Sadly because of lack of time (I rarely allow full days of focus for these game jams, I’ve noticed), I just about managed to remake the original two levels and boss. This wasn’t for naught though, as way back when it took me over a year to reach this far, and this time I managed to achieve the same amount in less than a week. I also took advantage of my own game framework to try out some technical challenges, such as parallax scrolling.

Game Jams are fun, I like taking part in them for those short bursts of game ideas and development challenges. Sadly participating is made more difficult when my day-job takes priority, but when I get a chance to take part I’d like to take full reigns!

Now time for some voting and other challenges!

Gemstone Keeper on Steam Right Now

https://i0.wp.com/i.imgur.com/EprkPSq.gif

Check out the Steam Store, and you’ll see that Gemstone Keeper has a page where you can add to your wishlist, purchase the game and write a review for it. I greatly appreciate seeing people buying the game and giving it a good review, it really means a lot after realising that this game has been in development for nearly two years (May 2015 – April 2017). Reviews in particular are important because I’d like to collect a list of issues and make fixes, and hopefully add a bit more to the game over the course of a year. Gemstone Keeper will also be shown at Insomnia 60 at the Birmingham NEC and maybe a few more events if people find an interest.

In particular I want to thank Vincent Rubinetti for his contributions for the game. While he was the person I had in mind to do the soundtrack from the point I listened to his music in INK, I was a bit nervous about approaching him with the demo I had. However after a few emails back and forth, we made an agreement and we were underway for producing a great accompanyment to the game’s visual art style and atmosphere.

https://i2.wp.com/i.imgur.com/ajrVcHB.gif  https://i2.wp.com/i.imgur.com/24gcQz8.gif

In addition, I’d like to apologise for leaving this two days late; I couldn’t plan ahead because I spent the last few days sending out emails and twitter DMs in the hopes to get the game looked at by people; I fixed bugs and adding some last minute features such as damage numbers appearing whenever you hit something with your bullets and being able to type the seed you want to use in Score Mode.

On the launch day, I was at Rezzed, where I did talk to a few people about my game, but mainly walked around and tried out a selection of great titles. By the time 6pm rolled around, I hung out at an after party and chatted to a few developers.

Then the day after was my birthday, so I figured I would post on social media, but spend most of the time away from the game and more with friends and family to celebrate and relax.

https://i2.wp.com/i.imgur.com/prEWNzt.gif https://i2.wp.com/i.imgur.com/Fi4QFr6.gif https://i2.wp.com/i.imgur.com/DTZmFdO.gif

As for my future plans, aside from this game’s maintenance, I’m hoping to return to smaller games for a while. In particular I want to try a few more game jams and experiment a bit more, I have a few ideas I want to try out, and now I have a little less pressure on me to work a bit on them.