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! :)

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

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)

Flash Punk Example – Lights & Shadows

Mentioned this on twitter and on the FlashPunk forums, but forgot to post anything about this here…
Screenshot
Basically this example shows how to create a simple, yet fast and flexible light system using Flash (and more specifically, Flash Punk, although it’d be easy to use in straight up AS3 as well, with a few modifications). It allows you to create lights where ever you choose, and then move them around, resize them, and modify how bright they are.

Try it out here, download the source here, and check out the topic on the Flash Punk forums here.

Ongoing projects

I haven’t updated this in a while, so I figured it was time. Hopefully, sometime in the near future, I’ll have more time and ideas to start really making this blog a bit more interesting (and more frequently updated), but for now, this will have to do! …

 

WINNITRON 1000

I have been spending the last several weeks/months working with local indie game developers in Winnipeg, working on our arcade machine, titled the Winnitron 1000. Probably most (or all) of you will already have heard of it, but if you haven’t, it’s definitely worth checking out. It’s basically an arcade machine that plays indie games, and can update/sync the games, along with sessions (how long people play what game) and highscores online. I’m really excited that I was able to take part in the development of this machine.

 

Flash Punk Community Competition: DUNGEONPUNK
DUNGEONPUNK

A game I created in 72 hours for the Flash Punk Community Competition. Was really fun to take part in this and make my game be one of the 33 entries (may have to login to view them). My goal with this game was to basically make a hard Zelda-like Shooter, and I think I accomplished that quite well. I have plans to develop this further (or perhaps even recreate it with new graphics, randomly generated, levels, more items and monsters, with my brother), so be on the lookout (if you like following my stuff :P ) for this one… You can play the competition entry version here, and play the current build here!

 

Secret Project – Prototype name “TUNA STAR”

A secret project I’m working on with Alec Holowka… Can’t say too much about this yet, though I can say it will not contain Tuna (and probably few stars as well).

 

And that’s pretty much it from me, for now! :D

 

Flash Punk for School Project

I’m still in highschool (senior year! only a few more months to go!), and of course I have really stupid annoying school projects that I need to do. One of them (for gym.. I thought we just had to run around and stuff, but apparently not?) wanted us to make a video of a fake exercise product, in groups of a few people. We could either make a video, or do a presentation. The person I was making it with wasn’t really into doing any kind of acting, live or on film, and I certainly wasn’t either (I’m definitely not an actor), so we decided to do it all computerized. At this point, I thought it would be awesome to use Flash Punk for this project, so that’s what I did. The other guy making the video with me will later do voice overs, and maybe a little bit more art, but this is basically the final project (though without sound, as I don’t want to post that version up without the guy who will be making the sounds consent).

 

So, here’s what I’ve made of the video. Below I’ll explain the “scenes”.

 

VIEW THIS THING

 

 

Scene 1: The Intro scene – tell the viewer why they should buy it
Scene 2: This scene will say something along the lines of “Do you look like THIS, or THIS? If so, buy the Muscle Band now and you could look like THIS”
Scene 3: Customer Reviews
Scene 4: Wrap up, tell the viewer to buy it and look like the muscle man.

 

 

Yup.

Nisus – A Collaboration

Over the last few days I’ve been working on a new game, that I’m quite excited about. Firstly, this game is a collaboration between myself, and Connor Ullmann (known on the internets as Time), which has been working out wonderfully. I’d say we make quite an awesome team.

 

So, what is Nisus? Put simply, it’s a teleporting, time travelling, post-apocalyptic, platformer about a strange creature with even stranger powers. Basically, you’re running through an abandoned area, that has been overground, teleporting your way out to the wilderness. It’s kind of – actually, why don’t you just play it? It will explain what the game is all about better than I can.

 

Note that this version is still very WIP. We’ve been at the game for only 3 or 4 days, so there’s still not a ton to see, but we’re both very pleased with what we have.

 

 

 

 

Advanced Platform Engine [FP1.3]

I recently started creating an Advanced Platform Engine for Flash Punk 1.3. I think it’s come together quite nicely, but I’m still looking for some general suggestions & feedback on what to add next, and obviously any feedback I can get on the code already there.
 
You can check the Flash Punk forum topic here.
 
Or you can get all you need right here in this blog post!
Download:Open Sourceness!
Give it a go: Play!
Ogmo: Get!
 
Anyways, hope people find this “advanced” open source platform engine useful. Any feedback, again, is obviously very welcome.
 
Cheers!

FlashPunk Open Source Platform Engine

Hey, I updated my Open Source Platform Engine to Flash Punk 1.3, and also cleaned up, and commented (a frequently asked addition) the code.

 

Check it out on the Flash Punk Forums!

 

I’m hoping in the near future, after Leap 4 Blue is all wrapped up, to recreate the engine with a whole lot more features. Basically make like a super customizable, easy-to-use, readable, Flash Punk platform engine that people can use.

 

Currently, even though this current engine is really, really simple, I’ve seen a large number of FP users who have stated that they use the engine, so I think a fair amount of people would find a more in-depth engine to be useful.

 

It’s a thought. Probably be fun to make. Maybe finish that tutorial as well while I’m at it.