Ludum Dare 22 and future of Abandoned

Last December I created a game for Ludum Dare, a competition in which you need to create a game in less than 48 hours. The results were posted yesterday, and it turns out my entry, Abandoned, won 2nd place out of over 700 games! Really exciting with the results, and ready to continue development on the game now that I have some more free time.

Abandoned Level

I intend to continue working on Abandoned and release the full game later in the year (hopefully in a few months from now?). I’m not entirely sure what I’ll be developing it in, but I’d love to eventually create an iOS version. Currently I’ve been learning Unity and slowly making progress on porting the game to that, but I’m also considering developing it in Flash first (what it’s currently made in) and then once it’s complete, porting the full game to iOS.

We shall see! Either way, I think it’s going to be awesome.

Posted in Game Development · 7 Comments

My Dark Delusion

I’ve been spending the last several weeks working on this game called My Dark Delusion (WIP title). I’m not exactly sure what it is yet, but it will probably develop into a top down abstract shooter of some sort. We’ll see what happens. For now though, you can check out the main menu and the basic look of the game (select window + hit enter)

(note you will need Flash Player to run this)

Posted in Game Development · 6 Comments

Hannigan the Green

I don’t know yet. But maybe something? Thinking about procedurally generated levels for this (as always). “Hannigan the Green” name by Chevy Ray ;)

Posted in Game Development · 2 Comments

Game Development Adventures of May

I realized today that I haven’t actually posted any updates as to my current projects, and have really only posted small articles on procedural generation (which is just as cool), so I thought I would take a bit of time and update people on what I’m working on. A lot of the stuff I can’t go into much detail, but I can at the very least post some screenshots and say that I AM working on stuff.

 

Main Project
The last several weeks have been spent working on a procedurally generated bug game, that I can’t talk too much about at the moment. I’m working on this with my Brother, Liam. He’s doing all the art and music, and I’m programming it. Our progress had slowed down for a bit as both of us were busy with other things in our life, but lately we’ve picked up progress again and are moving steadily ahead.
Though I’m not going to go into a lot of detail, I will post a screenshot. A few things to note is that a lot of this is still very much WIP, most obviously the player (he’s being recreated completely at some point).

Bugs and Plants
Bugs and Plants

Prototypes
The last few days I’ve also been working on a new prototype with Alec Holowka and Tom Rab, which is quickly taking shape and becoming interesting. I don’t want to talk about it too much either, but it’s generally going to be some form of a turn-based strategy platform game…. if it fleshes out.

Commands
Mocking up some of the commands

Websites and Other
I’ve also been working on a bunch of websites over the last several weeks! The one I most recently finished was the brand new Flash Punk website, as the previous one was getting fairly outdated and desperately needed a fresh look.

Still a ways off
Liam and I are also starting to plan out a game we want to make later this summer – hopefully after our bug game is completed. I’ve posted a few things about this earlier, and we still fully intend to make this game a reality. We figure that this game is going to be one of our longer games to create (and play?), though obviously I have no good estimate as to how long it will take. I’m not even sure when it will get started.
One thing I can say for sure, though, is that the game is going to be made in Monocle Engine, a new open source and in-development C++ Game engine. Truly looking forward to working with that.

Cheers!

Posted in Game Development, Web Development · 5 Comments

Procedural Generation – The Caves

Over the last several months I have been researching and experimenting with different types of procedurally generated maps. I was working on a top down, zelda-like game that used procedural generation to create the dungeons throughout which the player would explore, encountering monsters and hidden treasures. Development never got to far on this game, but it was a great learning experience and I got my maps to a state I was really happy with.

Over the last week, I’ve been doing more procedural generation for a game that my brother, Liam, and I are creating. It’s going to be a rather simplistic and casual game when done, but one of the most exciting things about it is that every level is completely generated from scratch, creating rich, varying, environments every time you play. You can check out what’s been done so far (as of this post) here.

Since posting that, I asked if people were interested in me writing up the process that my generation takes to create the maps seen in the demo above. I got enough interest that this definitely seemed worth while, so here it is!

 

PART ONE: THE BASICS

Before I explain anything, make sure you’ve actually seen how the generation looks in-game. If you missed the link above, see it here.

The idea for this game was to create a vast cave with interesting tunnels, pockets, and enclosures. I started off with a number of different methods that ended in very interesting shapes but nothing quite like how I wanted. I searched around a bit for different methods and ran into Chevy Ray’s example that he posted here. I never actually took a look at the code for this (not sure if it’s available or not?) but I liked the basic approach he was taking, along with his results. My end method is relatively similar to what he was doing, with some variations.

CREATE THE MAP
The first thing that my generation code does is create a 2D vector (array), containing ID’s (integers) of the different types of cells. To start, I create a 400×300 size grid, all with the value “1″. In my case, ID=1 stood for walls, and ID=0 stood for empty space (titled floors, even though they’re not, really). Later on I add Water, which is ID=3, but that’s not important right now.

THE MINER
Once the map is created, I then create a “miner”. In my case this is actually just called a “Cell”, but it makes more sense if you consider it to be a miner. The miner is created in the center of the map (200×150) and is labeled as “active”. When generating the map, I create a loop that goes through every active miner, and runs their “dig” function. When the miner “digs”, it picks a random cell around it, that is not yet an empty space (ID=0) and digs it out, moving itself in that direction.
For example, if the miner was at 5×4, and decided to move UP, it would dig out the cell 5×3, and move itself there.

Whenever a miner digs, it also has a small chance of spawning a new miner in a random direction. In my generation code, the chance is about 8% that a new miner is added.

If a miner has no walls surrounding it (ID=1) then it unactivates itself, and stops digging. If this miner happens to be the last miner alive, then it just moves around until it finds a new wall to start digging.

CALL OFF THE DIG
Depending on how you want your maps to look, there are a number of different ways and times you can stop the miners from digging.  You can stop the digging when there is only 1 active miner left, which is what I was originally doing. The problem with this though, is sometimes you’ll have gigantic maps, and sometimes your maps will be 4 cells big. It’s too random for me.

Instead, what I decided to do was say that once 400 miners had been added, STOP digging. 400 is just a random number I chose, after experimenting with higher and lower values, and this size seemed to represent a good amount of miners for the size of level I wanted.

WHAT WE’VE GOT
At this point, my levels were generally looking like this:

The general shape is awesome (in my opinion) but it’s cluttered with horrible little bits of dirt everywhere! Which is why we needed ….

 

PART TWO: CLEAN UP!

So, as you can see from the image above, the map definitely needs some cleaning up. If we were to stick a player and run around in that it would feel horribly awkward and cluttered. This had me stumped for a little bit, because I was trying to think of ways to alter the original generation to remove these oddities. In the end though, I decided it would be much easier to simply run through my map one more time, and remove anything I found unfitting. So, I ran through every cell in the map, checking the following with each cell:

LONELY WALLS
These cells were walls sitting all by themselves with no one around. If I found any walls that had no adjacent walls (up/down/left/right) I would remove them.

STRANDS
These cells only had 2 adjacent walls, in most cases creating long strands of walls. These looked really awkward and just took up space, so I removed all of these as well. This also gave the map edges a more rounded look.

TINY ISLANDS
These cells were a group of 4 cells. I removed these as well.

This might sound like I over do it, but ultimately the end results are a lot cleaner:

 

 

PART THREE: WATER(FALLS)

This is by far the easiest part of the entire thing. I had a few people think that the water actually may be part of the generation, but, it definitely isn’t. Water is added in at the very end, after we have the result above.

THE POOLS
The pools at the bottom of the map are really simple. No, they aren’t generated by waterfalls, and no, there isn’t some magic algorithm that makes them. All I do is grab the lowest empty cell (ID = 0) in the map, and fill every cell 20 cells high from that point up, with water. That’s it.

THE WATERFALLS
The waterfalls are also really simple. I grab 4 random points that are adjacent to a wall (above it) and create that point as the start of the waterfall. Then, the water just automatically keeps moving down until it finds a wall below it, at which point it moves left/right until it either can’t anymore, or it can move down again. Once the water can no longer move down, it stops, renders out the waterfall (to a tilemap) and removes itself (well, the thing that generates the water fall does – obviously the graphics for the water doesn’t).

 

 

PART FOUR: TILE PLACEMENT

Not going to go into a lot of detail at all for this, because it’s not really part of the generation. But basically once the map was fully generated, I create a bunch of vectors (arrays) of different areas for quick access, such as floors, water, ceilings, sides of walls, etc. Once I have these, I can really easily and quickly place tiles (for example, I can just run through all the right-side walls placing the respective tile).
  

CONCLUSION

That’s it! Hopefully it was an interesting read and helped you make your own maps. If you somehow missed the live example of this in action, you can find it here. Feel free to post any questions or comments, I appreciate them! :D


 

Posted in Game Development, Tutorials/Articles · 11 Comments

Entity Art

I realized that I posted this art for a game that my brother, Liam, and I have been working on, on a bunch of other sites, but not my own. So here it is!

This is for a game that Liam and I are making over the next few months. The art above was a collaboration between the both of us.

Posted in Game Development, General, Uncategorized · Leave a comment

Simplifying Level Creation – Source

I recently posted a blog post about how I was generating quick levels with dynamically-placed tiles, and a fair amount of people I talked to asked if I could share an example/source for how this worked.

 


“An example of a level with automatically placed tiles”

 

So, today I threw together a quick example using FlashPunk for people to download and mess around with!

 

DOWNLOAD: Get it noooow
Try it out, and tell me whatcha think! :)

Posted in FlashPunk, Game Development, Tutorials/Articles · 7 Comments

Simplifying level creation

Over the last few weeks and months I’ve been having fun creating levels that don’t really use tilesets, for numerous different games. Instead, I’ve been using different level editors that produce shapes (by placing a bunch of points around) that are loaded into the game and used as the walls. You basically end up with levels that look something like this:

The walls are created from a bunch of nodes laid out in ogmo editor.

Last night, however, I decided it would be fun to try and place tilesets over these walls automatically, to create really dynamic and interesting levels. This way, I don’t have to painstakingly place each tile in every location as I flesh out vast levels. Instead, I can trace the shapes I want, save the level, and BAM the basic key tiles are automatically placed.

Looks pretty, right? Well, it’s just a single grass tile, and a single dirt tile, looped over and over again across the edges of the walls that would otherwise look like this:

So, I had a few people asking me how I got the grass tiles to loop like that. It was actually really easy. Basically, I would loop through all of the nodes that ogmo editor output for each wall, creating a bitmapdata (this is in Flash, AS3), drawing a line from one to the next. Then I would fill in the shape. After it looks like the image above, I would loop through all of the nodes again, except this time placing grass and dirt tiles (rendering them each to their own bitmapdata).

What would happen is that on each node, it would look back to the previous node and figure out the distance between the two. Then, it would divide this distance by the width of the grass tile, and place one at each interval between the two nodes, while at the same time figuring out the angle for each grass (which is just the angle from the last node to the current one).
Then my loop would go onto the next node and do the same thing all over again, until all the places between every node of the wall was filled with ever-so-lovely grass.

I think I’ll probably throw together a quick flash punk tutorial on how to do this in the next few days, for those that are interested on the exact details :D

Posted in FlashPunk, Game Development, Tutorials/Articles · 6 Comments

Infinity Jet

Infinity Jet from Noel Berry on Vimeo.

Short trailer of a game I’ve been slowly working on over the last few weeks. Art, design, coding, all done by myself, music by my brother Liam Berry.

Posted in Game Development · Leave a comment

Rockets Fly by Saws and Such

Not much to say at this point, as I honestly can’t say where this game is headed yet. But hopefully within the next week it will be refined and the details will be figured out and I can share more.

But, basically I have a mouse-controlled rocket game where you select gems (that weigh you down) while avoiding nasty hazards like saws and spikes.

Posted in Game Development · 2 Comments

Hey GDC!

I’m planning to head down to GDC later this year, to meet up with other game developers, from around Canada, and the world. It’s pretty exciting. I’m definitely looking forward to the Independent Game Festival, and really interested in seeing how the awards work out for all the finalists.

So, in case you don’t know what the GDC is.. it’s the Game Developers Conference that is held in San Fransisco, USA. It’s basically a place to meetup with game developers from around the world, talk, hang out, learn, and see what everyone is up to, and what new projects people are programming, designing, and composing. I’ve never been to it before, but I know a fair amount of the developers who are going (including a few locally from Winnipeg).

Anyone else planning on attending?

Oh, also! In case you haven’t heard… You know the Winnitron 1000 that I and a handful of other game dev’s from Winnipeg created? Well, turns out that a lot of people like the idea, so we recently sent the software for the Winnitron 1000 off to Vlambeer in the Netherlands, and the Winnitron now has a new friend. Meet Winnitron NL! Exciting stuff! Looks like there may be a bunch more popping up in the future around the globe as well :D

Posted in Game Development · Leave a comment

Captain Protagonist – Devlog 03


Inventory, at its best

Alrighty, Liam and I have been working on this game on and off the last few days. Liam has bee spriting some of the bad guys, inventory items, and a new player sprite (not yet seen in the screenshot above), and I’ve been working on getting the player to run around the dungeon(s), and open up his inventory.

So, as you can see in the above screenshot, the Inventory is a rotatable circle with a bunch of item slots in it. By hitting the up/down key, you can slide the Armour, Weapon, and Item menu in/out (currently in view is the Weapon menu). Each menu has 4, 5, and 8 slots, respectively (armour/weapon/item). The currently selected item is the one in the top slot, and by hitting right/left you can rotate the entire menu so that a different item is in the top slot. You can only have one weapon/armour equipped at one time, and items you use as soon as you select them (by hitting X) in the menu.

Currently, we are still unsure as to what kind of weapons, armour, and items you will be able to collect in the game, but we’re thinking that armour will include a few sets of actual armour (that stop certain types of damage), and maybe things like charms and bracelets that allow you to move faster (like the magic equipment you find in roguelikes). We still need to think up some weapon ideas, but we have 2 so far. One you can see in game, above, which is just a general blaster gun. You hold X to charge it up, and then release the key to blast a wave or burst of something that hurts badguys. The other item is still a secret.
Lastly, in terms of Items, we’re thinking of having potions.. and … other things? Honestly not too sure yet.

Anyhow, that’s pretty much it for now… We’ve been a bit busy the last few days (going to SNES parties and such) so haven’t made a ton of progress, but it’s coming along! :D

Posted in Captain Protagonist, Game Development · Leave a comment

Captain Protagonist – Devlog 2


First screenshot, with invisible torches!

I thought I would talk about about what we did with the game today, and also explain in more detail how the random generated maps work (so far).

So, today Liam started spriting some of the character (based on my concept art from yesterday), and I began to figure out how I was going to create the levels, based on the randomly generated maps that are made. I’ll talk a bit more about the entire process later in the post. Even though you can’t see exactly what’s going on from the screenshot, I have the entire map now a playable area, ready for you to walk around in. I didn’t spend too much time with how the tiles are placed, based on the floor and wall positions, so it’s generally a bit buggy, but you can kind of see how tiles will be placed based on where the walls are. There’s some weird bug where random, long lines, of the ceiling tile are just placed across the floor, which I’ve definitely got to fix, but the basics is in there.

The next part I’m going to work on, in terms of the random generation, is getting corridors to act a little more randomly and natural (as was suggested by multiple people). Right now, they’re basically just straight lines, and it gives the game a kind of weird feeling to have all these interesting caverns and dungeons of different shapes and sizes, to be joined by these very mechanical looking, L-shaped tunnels. It can kind of destroy a bit of the atmosphere the game already produces, so that has definitely got to be fixed.
Secondly, I need to start working on how the map will be populated. I haven’t really thought about this idea too much, but when talking to people on skype, I was linked to a really interesting post on how Spelunky generates some of its hazards and monsters. I haven’t read the entire post yet, but I think I may use a method similar to this (if I can) because it seems like a smart and interesting way to generate content throughout the dungeon. We’ll see how that goes! :D

OK, so, onto the randomly generated worlds. I thought it would be fun to (try and) explain how I’ve gone about generating my dungeons. Not sure how interested people will be, but I find this stuff really fun to think/talk about (as do many people I’ve talked to!), so hopefully you will too :)

My Dungeon Generation Code!
1) Make a 2D array of a bunch of integers, and start them all off as 1 (1 is the value that we consider to be a wall). If you don’t know what an array is, just think of a list of values, and a 2D array means that you basically have a grid of values.

2) Then, we create a randomly sized room (with max/min proportions) at a random position in the 2D array, however we do not yet carve out the rectangular room

3) If the room is NOT the first room, then we carve out an L shaped tunnel from the current room, to the previous room. For example, if we had two rooms, it might look like this:

Image

4) Continue until you have X amount of rooms, all connected. Note that we still have not actually carved out the rooms in the 2D array, except for the passages (where we put 0′s). So, there should be 1′s everywhere in the array, except for where we put corridors/passages.

Now that we have created the general map of the rooms, we want to make the rooms have funny shapes (anything except rectangles). This part is a bit tricky, but I figured out a way (slightly based off someone else’s example) that works quite nicely.

1) Go through each room, and pick 0-3 points along the top of the room, 0-3 points along the right of the room, 0-3 points along the bottom, and 0-3 points along the left side. Stick all of these points into an array (or in Flash, I personally use a Vector). We should now have a bunch of points that look something like this:

Image

2) Re-order all the points in a new array/vector, so that they are ordered in a clockwise manner. To do this, you’d order the points at the top by their X value, the ones on the Right by their Y value, and so forth. Then, create a BitmapData (I’m doing this in AS3), and draw a line from the start point, all the way around, so you get this:

Image

3) Finally, fill in the inside of the shape with a solid color (same color as your lines). BitmapData’s have a handy dandy fill function for this, that do it for you.

4)Transfer the pixels that are red (or black, or whatever. Whichever ones represent the floor), and carve it out in your array, so you get the shape where ever your rectangle room was before.

Now you have the basics of what I’ve done to generate my levels. the 0′s represent the floors, and the 1′s represent the walls. Later in my code I actually remove all the walls except for the ones that surround the floors (because that’s all you realistically need once you start actually placing wall objects or w/e).

End result:

Image

(Note you get the long caverns because I do not stop rooms from overlapping. You can get this really natural feeling caverns that way)

Hmm. That’s all I have to post about right now. Any questions on the generation I’ll gladly clear up/explain better!

Posted in Captain Protagonist, Game Development · Leave a comment

Captain Protagonist – Devlog 01


My attempt at character concept art!

Captain Protagonist is a game I’m currently working on with my brother (title WIP). If you’ve been talking to me over skype (or checked out my latest blog post, previous to this one), you’ll see I’ve been spending the last week or so working with randomly generated maps (along with other things, of course). After creating my Flash Punk compo entry, my brother and I decided it would be really fun to try to develop a game similar to that, but with more items/weapons, randomly generated worlds, and a more polished graphical look. Just take that basic idea, and make it a full, playable, game.

OK, so, what is Captain Protagonist? He’s a self proclaimed Captain, who plays as the protagonist as you run through a randomly generated, fantasy sci-fi, caverns & dungeons, fighting boss battles at the end of each “level”. Wait, what? Think of the early zelda games (Zelda 1, A link to the past), and then take a roguelike, and mix it with a bit of Spelunky magic and you’ve got the game Liam and I are aiming for.

So, we have yet to create a story for the game (thus the somewhat un-descriptive title), but the general idea is that there are 2 modes to the game. Mode 1, is called “Adventure Mode”. This is where the randomly generated worlds come in. Each Adventure will consist of 4 (or maybe more eventually, we’ll see), randomly generated dungeons, at the end of which will feature a pre-set boss fight (not randomly generated). Throughout each dungeon, you will be able to collect different items and weapons (in a system similar to the Zelda games).
If you haven’t played a Zelda game, basically each item you collect goes into an inventory, and when playing the game, you can switch between them whenever you want. Items do not have stats or w/e (like in an RPG), but rather have different functions and reactions when using them (ex. you could have a sword, or a fire rod that blasts fire, etc). Once a weapon is collected, you never lose it. The dungeons are filled with different sci-fi (robots, aliens, etc) creatures, but at the same time we’re hoping to add some interesting fantasy creatures as well, if we have time and feel that they would add an interesting touch. Once you reach the end of a randomly generated dungeon (going out the exit door), you will be faced with a boss battle. The boss battles are ALWAYS the same. At the end of random gen. dungeon 1, you will fight boss A, end of random gen. dungeon 2, you will fight boss B, etc. This it to give the game replayability, while at the same time making it feel like you’re still progressing through a a game with pre-made levels.
I think the idea of having bosses that stay static each time you play, is a bit more interesting (plus I have no idea how to randomly generate bosses?). This also ensures the bosses become harder, the further you play.

At the end of all 4 randomly generated levels, and 4 static boss fights, it adds up all your points (or whatever – be it treasure, coins, etc), and sticks you on some kind of leaderboard (hopefully…). We hope to get this game sponsored, and figure that when you get a game over (or complete all the random. gen levels) there will be some kind of leaderboard so people can compete, and come back to “get a higher score”.

The second Mode (which may or may not be added, depending on how big this project will be) is “Story Mode”, which has a brief story, and then throws you into a few pre-made levels we have created. We want to make a few levels ourselves – to create some really Zelda-esque dungeons (think Link to the Past dungeons). As much as randomly generated stuff is cool, and will give replayability, we think it will be important to have a few things that are human-made, thrown in there.

So, this is a pretty damn big project (for us at least). I don’t want to go overboard here and take too big a bite (I’ve done that before…..), so I’ve basically outlined everything we hope (emphasis on HOPE) to have in the game. We may cut back on some features, simply because I know (for my self, personally) that making a game that takes more than 3 months to develop, is too big a game for me. BUT WE SHALL SEE.

Anyhow, my goal here is to write devlog’s as we progress with the game. I’ve finally gotten to the point where I’m happy with the randomly generated map, so I think it’s almost time we got started on actually making bits of the game.

Any comments, ideas, suggestions, whatever, are totally welcome and appreciated :)

Posted in Captain Protagonist, Game Development · Leave a comment

It’s Been Randomly Generated!

I’ve been spending the last week working on randomly generated levels, for a game I’m making with my brother. I started with an approach where it would make a bunch of rooms, in a grid, and then create paths through the grid to the end, like so.

However, after a lot of thinking and tweaking (and rendering the levels out into an actual tileset (hit M for mini-map)), I decided that wasn’t really what I wanted to go for at all. So, I then spent the next 3 or 4 days reading about how to generate roguelike levels, but couldn’t really find anything I liked, until I stumbled upon this, which actually explains, step by step, how to code a roguelike in Python. I didn’t actually read any of the code, but I used the method he describes there, which generally seemed like it should work for what I was trying to accomplish.

However, it still didn’t seem quite right. I had some cool stuff being generated, but it was really blocky and square looking.
Random Gen. Map, Blocky
So I decided to try to make the rooms anything but rectangles, to give it a more natural feel. That’s when I found this, which explains a method that worked really well for what I wanted.

Finally, I decided to make it so the individual rooms could overlap, to create this really interesting, natural feeling, underground caverns/dungeons.

My end result is this. I’m pretty pleased with it, generally.
(hit R to create a new map)

Posted in FlashPunk, Game Development · 6 Comments