Gemstone Keeper: Playable at EGX

After many years of working on games, I can proudly confirm that Gemstone Keeper will be shown at EGX from the 17th – 20th October at the ExCel Centre in London, and it will be the Nintendo Switch version with both the single player Campaign Mode and the multiplayer Survival Mode. It will be part of the Tentacle Zone, ran by Payload Studios, alongside 17 other great indie titles.

There have been a few minor changes since it last appeared at Insomnia, however I do not intend to make anymore changes outside of bug fixes and other technical hitches as it’s getting closer to the end of the year.

I’m honestly excited, while I’m still a bit annoyed that the largest games expo decided to move to London (in a decision that not everyone was happy about), it’s been difficult to get an opportunity to show your work there. Next week I’ll be putting some time to make sure a demo build is ready that can handle hours of uninterrupted gameplay. If you plan to go to EGX, be sure to look out for the ASCII amongst the green tentacles!

I should also close off by giving my love to all the game devs who took part in Ludum Dare this year, I decided to hold off on taking part because of a lot of travelling I did the week before. I’ll definitely look at going back for the next one, especially since my hopes is that Gemstone Keeper will be on the eShop long before then.

 

Advertisements

Insomnia Report

Last week, I was one of 24 indie game developers who showed off their games in the Indie/Tentacle Zone, part of the Insomnia Gaming Festival (i65) at the Birmingham NEC. Over a four day period, thousands of gamers got an opportunity to try our games, some in development for platforms, others being in early access or recent release. For me, it was an opportunity to show Gemstone Keeper for the Nintendo Switch, to see what bugs people would find in the port running on proper hardware for an extended period of time.

The first thing I noticed when I arrived on the first day was the stands were great! When I last went to Insomnia back at i61, the Indie Zone had the blank, cubicle-like, walls with one table, which had been used as far back as the Indie Zone’s introduction around i52 back in 2014. It was an acceptable setup considering that Indie Zone spaces were free to those who applied and PC setups were provided. Last year however, the Indie Zone was being operated by Payload Studios, the developer of the game TerraTech and managers of the Tentacle Zone at EGX and Rezzed, they managed to deliver by replacing the plan walls with backdrops that featured banners of our games! (we provided the poster art for them to print)

That didn’t stop some developers going the extra mile: Space Lizard Studio created a cardboard scenery around their table to match the theme of their Papercraft Horror game, Paper Cut Mansion. The developer told me that it took them two weeks in their spare time to create it and it looks impressive! Rhys510 on the otherhand, didn’t bother with a table with a monitor, system and controller, as their game was on a fully functional arcade cabinet!

On each day, the doors opened to attendees at 10am for priority attendees, and 10:30am for everyone else. What appeared to be a surprise to most of the indie devs was the amount of people who turned up on Friday, particularly in the morning. It was anticipated that Saturday and Sunday would be the busiest days, with Friday and Monday being the least due to it being near the end of the school holidays and a bank holiday respectively. The morning was espected to be quiet in general because that would be time people would explore the whole event and jump into the other areas that required queues, such as the Borderlands and MediEvil stands, or the Ubisoft Experience. This wasn’t the case, Friday morning had attendees trying out each indie game. While the crowds wouldn’t compare to Saturday, it was still a good first day.

This was the crowd on the Saturday.

While having more people to keep an eye on and try your work is more hectic, it does make the work of showcasing go a lot quicker. Retro Revival was a decent showing, but not many people turned up to its indie section, which made the whole event feel a lot longer. Plenty of people managed to try out the game, both the standard single player mode and the multiplayer survival mode, I ended up making a procedure where if I see an individual or a single child with parents approach, I’d let them try out the single player mode, but when a group approached the table, I’d ask if they wanted to play multiplayer, and set up the controllers if they said yes. This ended up being a good strategy, as groups might lose interest if only one person plays at a time (although I noticed pairs who went straight into the single player mode took turns at each level).

There were some technical hiccups though, as before the first day I had technical issues that prevented me from creating new builds for the Switch (lesson for the future: never update the SDK or firmware before your big events). I was fortunate to have a working demo build from a week before that I could use, but even then it had slowdowns and it even crashed at one point, which required a force restart. This was the case for both the Friday and Saturday, fortunately on Saturday evening I was able to fix two main issues that were causing crashes, and with my notebook that had an entire page filled with minor bugs in it I was able to get through and create new builds for both Sunday and Monday.

Overall, I’d say I had a great time. I got to try out a number of the games such as “Bubbles the Cat” from Team Cats N Bears, Velocity G by Repixel8, Robot Champions and many others, and hung out with a group of them on the Sunday (sadly I missed out on the pub quiz that took place on the Friday).

The next event I plan to show Gemstone Keeper will be at EGX in London in October, so I hope to see as many (if not more) players there!

Gemstone Keeper (for the Switch) for the Public!

Hello everyone! It’s been a while, but my game development focus has been majorly on Gemstone Keeper for the Nintendo Switch! Significant progress has been made to it, plus Ironbell and I (as well as feedback from devs of Naezith) have been continuing our work on SFML-Switch, fixing issues that we find. The submission process is currently in its early stages and with any luck there will be an announcement on its release later this year.

The biggest areas of progress to Gemstone Keeper that have been made is that the Switch release has a local multiplayer mode called “Survival” where up to four players can fight an infinite amount of enemies until the last player dies.

Another big change to Gemstone Keeper is that the graphics have been significantly upgraded to a higher resolution to accomodate with the Switch’s HD displays. While it might seem strange to do this, but the painstaking process of using much larger fonts to generate the textures in the game results in a significantly sharper display overall. To the untrained eye it might not appear noticeable, but when compared side by side or in a split screenview, the differences become crystal clear (pun intended).

Back in June, the Switch port had a public test run at the Retro Revival Festival in Walsall (where I was also selling some games from my private collection). Despite some major technical difficulties, I managed to get some good feedback and players to try out the game, so I’d say it went pretty well!

From the event I also got to speak to Chris O’Regan from the video game podcast group Cane and Rinse, and after he got to have a go at the game and got in touch after the festival, he invited me on the Sausage Factory to talk about the game, as well as my development background and games design! I had a good time talking, although I usually get nervous when speaking in a mindset of having an audience, I like talking about my work and how I feel about games that show a more technical aspect over an artistic or epic approach to them. So if you have under an hour to spare, why not try hearing us talk for a bit?

Gemstone Keeper Episode of Sausage Factory

But that was back in June, what about now or next month? Well I’m happy to confirm that Gamepopper will be returning to the Indie Zone of Insomnia Gaming Festival as part of their i65 lineup (for the first time since i60 back in April 2017). Both myself and the game will be there for all four days of the festival, but do also come down for the rest of what indies have to offer.

There will be one more event in the near future where players can try out Gemstone Keeper, however I’m going to hold back on announcing it until after the final details get sorted.

 

Ludum Dare 44 and Console Game Development

As some of you were made aware, I took part in my first games jam of the year. While I said in my End of 2018 In Review that I’d be taking a break from game jams, Ludum Dare felt like the ideal event to take part in as it was in late April and is still one of the biggest and favourite of the online game jams. Even then I wasn’t fully aware it was happening until the week before when theme voting was about to begin, and it happened to be on the weekend where I had no urgent plans. So as the days drew nearer, I made my preperations for a 48-hour game dev session.

Continue reading

SFML 2.5.0 Update (Or how I learned to hate RenderTextures)

 

 

On May 6th, the C++ Simple and Fast Media Library (or SFML for short) was updated to stable version 2.5.0, adding various updates including more optimial iOS support, bug fixes, added functionality for Text and Audio and various optimizations. For such a big release, it made sense to upgrade and get my Vigilante Game Framework updated, and why not update Gemstone Keeper while I’m at it?

Well it took nearly a month, but I did manage it in the end. Gemstone Keeper 1.0.5 has been uploaded to Steam, both for Windows and Linux!

As the title suggest, a lot of the work had to do with the updates to the sf::RenderTexture object. However, I don’t absolutely hate them, they are extremely useful for rendering a scene to an area of the screen, or to apply post-processing effects to. However the problem lied in how I was using them, and how the fixes done in the latest update effectively broke my engine’s rendering system.

The initial update showed promise, as my most recent game worked fine, but moving onto the framework’s examples and Gemstone Keeper showed that a lot of things weren’t rendering at all.

Vigilante Framework currently renders 3D models using Modern OpenGL, and while it was working fine with SFML 2.4.2, it rendered nothing with SFML 2.5.0. The solution was embarrassingly simple despite the amount of effort put into fixing it, including implementing my own version of SFML’s glCheck function and re-writing SFML’s own OpenGL example to run with modern OpenGL. When rendering the 3D scene, I modified some of the OpenGL states, which wouldn’t be an issue before but now those OpenGL states carry over into other contexts. The solution was to simply make sure that the GL states were reset BEFORE rendering the scene using a sprite object.

 ///Render 3D scene and apply to a sprite.
 RenderTarget.resetGLStates(); //Reset the GL states to the default for SFML
 Sprite->Draw(RenderTarget); //Render the sprite.

Gemstone Keeper however uses legacy OpenGL, and while I could have updated the VFrame source code but that could take more time to fix. Regardless, I was able to get it working by rearranging other objects that define sf::RenderTexture, including the bloom post processing effect and the help popup terminal.

Gemstone Keeper’s other graphics were another story. The approached I had been using up to this point was to render text objects onto a single rendertexture, and then store the generated texture to be used as a sprite, particle or tilemap. While this was okay for the time, but it is rather inefficient and bad for graphical memory.

I wanted to do a single-texture approach, where all the graphics are rendered onto a single texture, and a rectangle area is specified when creating renderable objects, for a while but I kept putting it off. SFML’s update, causing any newly created render textures to dereference generated textures, it was time to take this approach on. The best part is that most of the work was already done by myself with the additional code of Jukka Jylänki’s MaxRectBinPacker algorithm, all that needed doing was to change how I defined renderables from setting the texture to whatever the name of the genrated texture is to the name of one texture sheet, and to get the correct rectangle from a map/dictionary, searching by string ID.

CaptureCaptureCapture

Now this doesn’t mean the entire game’s visuals are rendered from one texture. Including the 3D gemstones, any assets that use a repeated texture grabs a subsection of the main texture as a copy, same applies to the VBackdrop as well. Getting the icon was a more painful looking process of converting the entire texture sheet to an sf::Image, so I can load in a subsection to a new sf::Texture object, and then convert the new texture object to an sf::Image in order to set it to be the application icon.

sf::IntRect iconArea = TextureData::p()->GetTextureRect(TextureData::p()->GetPortalTextureName(true));
 sf::Image image = VGlobal::p()->Content->LoadTexture("TextureSheet").copyToImage();
 sf::Texture tex;
 tex.loadFromImage(image, iconArea);
 VGlobal::p()->App->setIcon(iconArea.width, iconArea.height, tex.copyToImage().getPixelsPtr());

Like I said, not pretty.

So enjoy Gemstone Keeper, the number of you who own it. Now back to doing more stuff in C++…

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!

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.