Any support through donation is greatly appreciated!
You don't need a PayPal account to donate.

July 20, 2009

Procedural Generation 3: Cave Source

I wrote an article awhile back, which is still the most visited article on this site, and I was really proud with the efficiency and look of the caves that the algorithm in the second part of that produced.

Anyways, now that I'm also working in Flash, I decided to write an ActionScript3 version of the algorithm. While doing it, I also made some improvements. Now, it's even slightly faster than before, you can set the minimum or maximum size of cave you desire, and I've added some security features to prevent stack overflow with certain setups.

I've taken a couple of maps created with various settings changed. And, because I'm in a good mood, I'll give out the full source so you can all have a look!



DOWNLOAD SOURCE

That has two files, Main.as and Map.as. The Map class contains the algorithm and functions used to generate the cave. I have commented the file as thoroughly as possible, and wrote a big explanation in Map.as explaining a bit how the algorithm works. The files can be opened with any plain-text viewer if you don't have a Flash editor. If you make any use of it, or re-write it in another language, please email me and let me know! I'd love to see what you've done with it, and hear about any tricks of your own you might have come up with.

After I posted that earlier procedural-generation article, I've been getting pretty steady responses from a topic at TIGSource from people who are creating their own dungeon algorithms, and others who are adapting mine into other languages, such as AS3, Java, and Python. I figured I'd share some of what's going down over there, because even recently there's been some pretty neat stuff popping up!

First off, here is a Flash version of the map-generator, created by Kneecaps. You can click on the map to generate a fresh one.



He was also kind enough to post the source, which you can get here. Next up, forum member Cthulhu32 wrote a version of the same algorithm in Python.



He also posted the full source, which can be viewed here at your pleasure. Such awesome folks!

Then, things started to mix up a bit. Zaratustra created an island generator, which was apparantly for an unfinished game. But it was very cool nevertheless! Click on the picture for the full (4000 x 4000) image.



Epitaph64 was next up, and posted a simple Java terrain generator that uses basic recursion. He also posted about it on his site, with the source files.



Fifth decided to try his hand at creating the cave algorithm, and it worked out really well. In the second shot below, he gave the algorithm slight inclination to spin counter-clockwise, which was a really neat touch. The flexibility is part of the reason why I like the algorithm so much. According to him, the generation time was always instantaneous too, which was great to hear.





Next up was hagel who, inspired by the topic, had decided to experiment with some algorithms written in FreeBASIC. The results were cool, and the source can be downloaded here. His was similar to my cave algorithm, in that it used creeps that moved around and "carved" out the trails. While mine only uses one, though, he set it up so you could change the amount of creeps issued, so the caverns where fairly expanded and less linear than my own, as can be seen below.



He also posted some pics of a platform-level generator as well. The first has only 45-degree slopes, and the second shot uses 23-degree slopes as well.





We had another Java setup from Ina Vegt. She made a maze generator, which creates a maze of boxes that you can navigate through with the character. Be aware the this file will not work in Opera, though. You can play it here.

Finally, another Game Maker user, pgil, came along with a GML version of my cave generator, using tiles and entry/exit points in a similar manner. He even posted the EXE and GMK files for those who want to see it in action or check out the code.



Very recently, roboprez posted another Flash version of the map generator, which can be seen here. Click on the image to iterate, and press space to iterate backwards. The land starts to take more shape each time you iterate.

And finally, Hayden Scott-Baron (also known as Dock) has been working on some procedural generating room techniques, and has come up with some very nice looking results.





And that's it so far! I'm delighted with the response so far, and I've gotten plenty of inspiration and ideas seeing how other people have adapted my scripts and also come up with their own. Hopefully anybody else who is interested will learn a two or things from these source files.

If you like the article, please leave a response! The previous ones got plenty of views, and the better response I get to each post, the more I'm likely to write more related articles and do more research in the future.

Thanks to the folks at TIGSource, and all the visitors! :)

READ MORE . . .

July 15, 2009

Testing...

I'm trying to get code blocks working on the site. It seems like every time I want to update the site, I have to re-learn CSS. So bear with me if this post looks strange for a few minutes/hours...

Testing...

And I'll also make a black one...

Testing...

There! Now those are working, if I ever feel the need to write any coding tutorials or just post some snippets on the blog, it'll be easily distinguished.

READ MORE . . .

July 13, 2009

Prioritizing & Motivation

To start off, here's a shot of the latest stage in development:



This is the Pigpens level, where a notorious vampire fiend has gotten to the livestock. Yes, you heard it right -- you'll be facing off with vampire pigs, chickens, and cows in this area... not to mention a few other unexpected goonies.



But the real topic of the day is Prioritizing & Motivation!

I've basically got most of the things that need to be done for the game listed off by now. It's just trying to work out what order to attack this checklist that's the real challenge. Should I finish all the enemies and powerups first, or tackle it one stage at a time? Etcetera. Either way, I've made it my goal to get at least one thing done every day, and have been successful in this over the past week. I find that if I can get just that one thing finished, I tend to have no problem getting a few more, because by then I've gotten myself into a good work mode. So I'd like to suggest this to you all!



When you're working on a project, it can get tough when you have a whole bunch of things to get done; you might feel overwhelmed, or you might just lose interest in the project seeing it all laid out so simply. So just try my method, and don't push yourself too much, just tell yourself to finish one thing off your list. Just one! This might make it seem like your project will take forever, but there's a bit of science to how this works, and it does!

That one thing turns out AWESOME!
For starters, with a whole day (theoretically) to work on just one thing, you'll find yourself putting a lot more thought into it than you would normally! Instead of "just another" thing to do, it becomes "the" thing to do. It becomes a whole goal in itself, rather than a small part of a much larger goal, and this will spark your brain in places you didn't even know existed. You'll look at this item objectively, and see where it stands in your project as a whole, and this makes it really easy to fine-tune it to near perfection.

Suddenly, I'm feeling motivated!
That's right! When you allow your mind to focus like that, it really helps "clear up" all that other junk that was distracting you, whether it be the recent argument with a family member, a surge of negative feelings towards your project, feelings of self-resentment, intimidation over finishing something, or whatever. Your mind focuses in on what you're working on, because you've exploded it into something bigger and more important, and just that little thing becomes a worthwhile endeavor. When you finally finish it and step back, you suddenly realize that you've done an excellent job, and that this is just part of your project as a whole. But your brain has now been turned on in all the right places, so instead of that being an intimidating thing, your mind will immediately focus in on what needs to be done next, or maybe you've already got that planned out. Either way, jumping into it is no problem. It's like running down a hill... it's not that you can't stop, it's that it's just easier to keep running than even trying to stop!

In the end, it's worth it!
Look at your project, after all is said and done. It will be a masterpiece unto itself. Every little detail will have had its turn, been thought out, massaged into something even better than what was conceptualized. Not only that, but you'll find you've learned a lot on your adventure. While working on one aspect, you'll find that the research involved in improving that one particular thing is now part of your own knowledge base, and is something you've learned and will never forget. Now, you are a better designer, a better artist, or a better programmer than you were before.

But the game didn't turn out so great :(
So what? As I said in the previous paragraph, you've developed and refined a whole new range of skills! Your projects can only get better from this point on. If you fail 10 project, your 11th project will be far better than that first one could ever have dreamed of being. So even if you do lose this battle, you gain so much that it's hardly worth even noticing.


Hope you enjoyed the article! I've got a thing to do, now, so wish me luck -- hoping the best in your own endeavors!

READ MORE . . .

July 11, 2009

From Superstition to Game Mechanic

In Skullpogo, there is a stage called the Pumpkin Patch. It is a level of living Jack-O-Lanterns, Witches in the sky, skeletons, ghosts, and other halloweeny creatures. With this fun, albiet a bit cliche, group comes a great set of gameplay possibilities, no?



Witches can fly on broomsticks, but they are also associated with black magic: turning people into frogs, curses, cauldrons of bubbling brew. The amount of ways such fantastic folklore can transist into the world of games is innumerable! But this makes choosing the best way to apply such an idea to a game a challenging task; for some, it may be a bother, but for me it is the most enjoyable stage of creating games!



Today on the menu are a very popular piece of folklore, the Black Cat.



For centuries, Black Cats have been blamed for the worst of the worlds problems. From the worst earthquakes, famines, plagues, deaths in the family, stubbed toes, and burnt muffins, the fault has lain with our small black furry friends. No, this isn't me trying to be subtly rascist, this is something we call "Superstition".

n. An irrational belief that an object, action, or circumstance not logically related to a course of events influences its outcome.

In other words, people believed that Black Cats are bad luck; in fact, many people still do, believe it or not! There have been movies about it, books about it, and even Edgar Allen Poe wrote a story about it. So how does a myth like this come into existence?

In ancient Egypt, cats were actually worshipped. And why not? They are cute, are (or at least can be) graceful, they eat mice and other vermin, and are easily tamed. But over the years, and into the middle ages, cats gained a new reputation. It was believed that Witches were able to transform into cats, and cats started becoming associated with black magic and other satanic beliefs. When a Black Cat crossed your path, it was believed by some that it was actually a Witch in disguise, and you'd be granted bad luck from the experience.



So how can bad luck be turned into good gameplay? I could go the easy route, and make it so that when you hit a Black Cat in the game, you are subsequently punished with fewer powerups, weaker combos, and less enemy appearances for a period of time. But really, how much fun is that? One of my core focuses with the design of Skullpogo is keeping it an all-around positive experience; why make something into a negative gameplay mechanic when it can be turned into a positive one instead?

"Hmmmmmm..."



So who says that the Black Cat has to bring bad luck to the player? Skullboy has enough bad luck as it is; he's kept imprisoned by Wizard magic, and forced to protect them from all sorts of goblins and ghouls, many of which are often products of their own magic foolery! So I decided that this bad luck will go to help you out, because it'll be your adversaries on screen that suffer from it.

So my final idea: hit a black cat, and you go into "Bad Luck Mode"! While in this mode, which lasts for a short period of time, enemies may slip and fall, anvils might fall from the sky and land on their heads, perhaps they will just... spontaneously combust. While this is happening, you can go mad with your pogo stick, picking off enemies that have taken a tumble on the ground and scoring combo points from those unfortunate enough to suffer an unlucky fate.

And all thanks to an age-old superstition, cooked up by fanatical priests centuries ago. Funny how that works.



If you liked the article, leave a comment! This is most-likely the first in a series of game design articles that I will be writing up, which basically focus on taking otherwise mundane or taken-for-granted aspects of games and turning them into interesting and engaging experiments through research and creativity.

READ MORE . . .

July 9, 2009

More Emenies

Yesterday was extremely progressive for Skullpogo. I added several enemy types, and completely re-wrote a core part of the game's framework (to deal with garbage collector issues). Things are goin' fine.


READ MORE . . .

July 8, 2009

Check it out, yo

Our very own Knightmare has come up with some more of her devious Skullboy character designs. The latest are fantastic!



The top two were done in MS Paint (!) and the bottom in Shi Painter. She mentioned interest in a Skullboy comic -- how cool would that be?


In other news, progress with Skullpogo is going very smoothly. I've currently just finished up adding zombies to the game.



If that shot doesn't make sense, I just bounced off his head and knocked it off. Their bodies keep walking after you do so, but another bounce should take them out as well. If you hit 'em just right, though, maybe you can get them in one hit...


READ MORE . . .

July 1, 2009

Treasure World Released

Aspyr Media has released their innovative treasure collecting game,



Err... What?

This is relevant to me because I was hired by Aspyr to design some of the 2D graphical assets for several of the treasures you find in the game. I got the job through my good friend Justin Leingang, who was Creative Director and Lead Designer of the project, and had a blast working on it. I was given nearly complete creative freedom with the design of the assets, and used that freedom to create quite the eclectic array of treasures such as a hissing cat, a dancing robot, a beefy flexing wrestler, a russian dancer, an elephant, and an octopus. So much fun, not to mention great animating practice! Also, getting a first job in the game industry that offered so much freedom, not to mention getting to work with a great guy like Justin, is probably quite rare -- so I consider myself one lucky bug!

The game is ESRB-rated E, for Everyone, mostly suited for younger folks 6 and up, but also good fun for adults who love casual games. Here is the latest trailer for the game:



What is the game about?

If you were wondering about that trailer, I'll explain. Treasure World is built entirely around using the Ninendo WiFi signals that your DS picks up. Every time your DS picks up a unique WiFi signal, your game unlocks a new treasure associated with that signal! What is so innovative and fun about the game is that you don't play it as much on the DS as in real life. Get off your couch and explore the city, the neighbourhood! You'll be rewarded for finding treasure as you walk around, sometimes stumbling on jackpot areas with plenty of signals; sometimes you'll want to take a different route to work or school just so you can see what you find!

So buy a copy of the game, so you can trade treasure with me (once my copy of the game arrives...), and write some music with your audacious finds. Aspyr has launched the website for the game as well, which plays a huge part in the experience:

www.ClubTreasureWorld.com

There, you can create an online profile where you can connect your DS and share your treasures with the other players. You can also trade them, share some great WiFi treasure spots, and also share your musical and pictorial creations made with the game's extra-special features.

Anyways, I can only hope to get another job in the industry some day -- and if I do, I hope it's as enjoyable as this one was.

READ MORE . . .

Site graphics and design © 2009, Chevy Johnston