Friday, April 1, 2011

Gearing up to 2.5

The Flixel team (i.e. Adam Saltman) is hard at work on the next version of Flixel. If you've been watching the twitter feed, you can see that it's a pretty big upgrade. I'm digging the multiple cameras, myself. Anyway, I don't know yet how difficult it would be to migrate a project in progress from the current flixel to 2.5. My tentative plan is to do another update or two for Jumper (Yes, I'm still working on it, just not able to devote a lot of time to it these days) under the current library, and then take a swing at the conversion process.

Tuesday, March 29, 2011

BFXR

If you recall, I used DrPetter's program sfxr to make the sound effects for Project Jumper. Well, the lovely thing about open source code is that people keep poking away at it, and now increpare has created a new, feature overloaded version that he's calling bfxr. I've been getting pretty good sounds out of the thing by just mashing buttons at random. Just imagine what someone that actually knows what all those sliders mean could do!

Saturday, March 19, 2011

Not all effort results in progress

I got it in my head today to make a useful variation of FlxSprite. Basically, I just want to add some simple masking, a function that will let you mask of portions of the sprite as transparent.

The actual pixels of a sprite are stored in a BitmapData object called _pixels. So my bright idea was to store all the masking info into another BitmapData object called _alphamask, and combine the mask with original image to get the masked out image. A little research, and it looks like BitmapData.copyChannel() should let me transfer the alpha channel data from _alphamask to _pixels without touching anything else on the image.

Tuesday, March 15, 2011

Organization

One of the things that doesn't leap out at you right away as a new game developer is just how many files start building up, and how important it is to keep them organized. The project I'm working on right now (yeah, the one that's keeping me from Project Jumper. Sorry!) started out in my head as a pretty simple Arkanoid style game. Surely that won't involve too many files, right? I'll just use the standard src/com/developer/name file structure, and that should be fine.

Hah. Maybe I'm just too addicted to making new classes for every little bit of functionality, and maybe I could cram all my graphics into spritesheets, but still, my folders are becoming a cluttered mess. The OCD part of me that makes me rename/reorganize all my music to a very strict scheme is going insane that I haven't sorted my files into categories and subcategories.

Well, while this project is too far along to make a reorganization worthwhile, I think it's actually a good lesson. The aggravation I'm starting to suffer at the end of this small game will teach me to avoid the same aggravation on a larger scale when I start working on more ambitious things. This is just another of those times when mistakes are actually more beneficial than success.

Thursday, March 10, 2011

When to start level design

As I'm getting closer to turning Project Jumper into an actual game, it's time to start putting some levels together. It got me thinking about the logistics of level design, and when you should get started on the process. For Jumper, I've put it off as long as I can, because I (intentionally) haven't really had any direction in mind as I make this game. If I include doors, teleporters, and spikes in the level, then I'm committing myself to those things. On the other hand, if I just throw together game elements as I think of them, I can slap them down willy-nilly onto the test map just to demonstrate them, but it doesn't really make for a good game level.

I suppose in a real project, the ideal solution would be to do all your planning first, so that it doesn't really matter what order you do things, you're always following the script. The thing is, that's not really practical for a solo project where you're not even entirely sure what you'll be able to execute successfully. It would suck to design 10 large levels that rely on a rope swinging gimmick, only to find out that you're not going to be able to make a satisfying rope. Or whatever.

On the other hand, if you DO make the levels ahead of time, it gives you direction in your coding. You already know what your game has to be able to do, it's just a matter of implementing it all. I think this is probably the best way to go once you've got some confidence in your ability.

There is a third option that occurs to me, though, and I just might end up implementing this for Jumper. Make small levels as you need them, each one implementing whatever new mechanics you've come up with since the last one. At least in Jumper's case, this could let me keep bolting things on indefinitely, or at least until the program just collapses under its own weight.

Tuesday, March 1, 2011

Memory management

Project Jumper isn't really having any memory issues yet, but sooner or later there's a good chance that it will come up, especially since I'm not doing a thing to conserve memory. Fortunately, someone who's paid more attention to this sort of thing than I have has put up a blog post on this topic. If you're worried about overloading your RAM, check it out.

Honestly, this is as much a memory aid for myself as anything else. Uh, no pun intended.

Project Jumper Part 13: Push and Shove

Man, it's been a little while, hasn't it? I've been poking around with other projects lately, along with the oh-so-pleasant jobhunting process, so Jumper hasn't been getting my full attention. But I've reached a point in that other project where I've realized I have to tear out a whole big chunk and rewrite it. And I don't really want to right now. So here I am!

Actually, this is a weakness I've long recognized in my own creative process. Maybe you can sympathize. I start working on an idea, and then when I'm not 100% certain about which direction go, I stall because I'm afraid of taking a wrong path. For some reason, the fear of having to throw out any amount of work makes me more likely to do nothing at all. Obviously, this isn't very productive. Even partially unusable progress is still progress, and nothing educates like failure. Heck, I'm even using version control, I could always just rewind to before I went wrong, and no harm done.

Oh, well. The nice thing about Jumper is that I've got real motivation to press forward even if I don't know what I'm going to do. Even a trainwreck would make for a good blog post! So anyway, let's get back to work.

Sunday, February 20, 2011

Open Thread: Got any questions?

On various forums and such, I always see questions about how to get the basics of programming working. I thought I'd just leave a spot here for people who are trying to follow along with Project Jumper, but are still confused.

So, go for it. Is there anything in Jumper that I've done that you don't understand? Anything I covered too quickly? Even basic stuff that I haven't covered at all?

Saturday, February 12, 2011

Organizing your game

Not too long ago, I mentioned how neat it was that FlxG has properties on it that you can access from any of your classes, like FlxG.score and FlxG.state. I was considering making my next update all about how to use that concept to your advantage, but someone's already beaten me to it. Photon Storm has a new post up that covers everything I would have said, so you should probably just go there and read it. :D

Monday, February 7, 2011

Side Project: Loading and Saving local files

For a side project I'm working on, I need to make a map editor, since my data will be structured in a way that's not really convenient when using DAME or whatever. That, and it's a good learning experience.
In any case, I need to be able to load and save .xml files that are stored locally on my harddrive. Apparently, this used to be a huge pain in the neck to do with Flash, and I should probably be doing this sort of project in AIR anyway, but it turns out there's a fairly way to do this.
NOTE: You have to be using Flash Player 10 for this to work.

Saturday, February 5, 2011

Project Jumper Part 12: Odds and Ends

Things are almost starting to look like an actual game at this point. In fact, I'm almost not embarrassed to show people the product to date. From here on out, I'm going to try to keep the most current version of the game up on Kongregate, mostly just to try and give it a little more visibility. I'll still be posting the incremental versions as well, so nothing's changing there.

A few posts ago, evgeny asked about integrating flash movieclips into flixel, and about multiplayer. Unfortunately, I don't think I'm going to be covering either of those in much depth, if at all, for a couple different reasons.

Multiplayer is a great thing, but it's actually fairly tricky to pull of in Flash. Basically, it's all about how you get the players communicating with each other. The most direct way is have both players' clients talk directly to each other, like a direct IP connection or your classic LAN game or something. Unfortunately, Flash doesn't really provide the tools to make this feasible. Another way to do it is the client-server model, where each player's client dials in to a central server to get the data it needs. This actually does work, but it requires you to actually have a server, and that's a little beyond the scope of this tutorial, I think.

As for integrating movieclips, actually that doesn't seem like a terribly hard thing to do. The only thing is that I don't have the actual Flash development tools, nor am I likely to get them any time soon, nor do I really know how to create/animate vector art in general. So, really, I'm just not the person to be asking! If you want to go about it, maybe start with this code snippet on FlashGameDojo, and run from there.

If someone either has a good tutorial on either of these topics, or would like to write one, feel free to let me know so I can either the tutorial up here or provide a link or whatever.

OK, time to start tweaking things!

Wednesday, February 2, 2011

Project Jumper Part 11: They're Everywhere!

A new rivalry is born!

You know, there's a great bit play area here; it's way to much for even the most epic of duels between helmutguy and Skel-monsta. We need to add a little more danger to the world. To that end, it's time to give Skel-monsta some friends.

Sunday, January 30, 2011

Still active

Just making a note here that I haven't stopped working on Project Jumper, I'm just really slow. Also, I'm planning out a new, better organized project to make better use of what I'm learning here. Anyway, the next installment should be coming out just as soon as I get it all worked out. Thanks for your patience.

Saturday, January 22, 2011

Project Jumper Part 10:The Beginning and the (Bad) End

There's starting to be an actual game here, sort of kind of, so this seems like as good a time as any to actually give the game a little structure. That is, let's make an opening menu, a death screen, and let the game reset when you need to.

An opening menu is a good time to have a pretty splash screen, showcasing your artistic talent and getting the player excited about what he's about to play.

I'm going to use plain text on a plain background, and the finest crafted monochrome yellow triangle as a pointer. Ah, yeah.

Tuesday, January 18, 2011

Project Jumper: Interstice III

Again, stuff added in bold is new. Not that there's a lot of it.

  • Display map
    • Scrolling
    • Layers (e.g. background)
  • Display player sprite
  • Move player sprite
    • Left-right
    • Jump
      • Mario style controlled jumps
    • Ladders
  • Map collision
    • Tiles that can be jumped through from below
    • Harmful tiles
    • Special effect tiles
    • Different environment types, eg water
  • Text boxes/popup messages
  • Sound/Music
    • Background music
    • Sound effects
  • Collectables/powerups
  • Camera
    • Follow player
    • Stay in map
    • Follow target other than player
  • Cut scenes
  • Changing levels
  • Continous map (load area changes seamlessly)
  • Main menu
  • Save games
  • HUD
  • Enemies
    • Ability to kill/be killed
    • AI/pathfinding
  • Multiplayer
  • Weapons/Ability to fight enemies
    • Projectiles
    • Stompin'
  • Different movement types
    • Climbing
    • Swimming
    • Flying
    • Double jump
  • Editable controls
  • Pushable blocks/crates

Monday, January 17, 2011

Project Jumper Part 9: Agility Training

It's time to improve helmutguy's maneuverability. I've got a few things that I want to do here.
  • Mario style jumping
  • Double jumping
  • Ladders
  • Walljumping
 I'm not sure I'll actually get to all of them, though. Remember, I'm making this up as I go.

Wednesday, January 12, 2011

Project Jumper Part 8: This isn't stomp at all! Fixing the delay in embedded sounds

I fully intended to spend this update on giving helmutguy a more robust set of physics, including the ability to stomp on Skel-Monsta's head. Instead, that stupid delay at the beginning of embedded mp3s has been driving me crazy, so I'm going to fix it once and for all. While we're at it, we'll get our first taste of editing the actual flixel files to suit our needs.

Sunday, January 9, 2011

Project Jumper Part 7: Lock and Load

Well, I think that helmutguy has been defenseless long enough. Let's give him some way to fight back. I'm going to go with two different abilities; that should establish some basic principles.
  1. Pew pew lasers
  2. STOMP
This is really only 5 pixels tall, but it looks pretty sweet zoomed in.

Saturday, January 8, 2011

Need more help with FlashDevelop?

This is as much a bookmark for myself as anything else. Michael Williams has a tutorial over on tutsplus that explains a lot about how and why to use FD either instead of or alongside the official Flash IDE. It also has a lot of tips and tricks to help you code faster and more efficiently. Be sure to check out the comments also, there's some good tips in there. I've now got a bunch of new post-it notes next to my monitor with keyboard shortcuts I didn't know about before.

Wednesday, January 5, 2011

Project Jumper: Interstice II

Let's just take a look at our progress so far. Anything bold is new stuff I've thought to put on the list.
  • Display map
    • Scrolling
    • Layers (e.g. background)
  • Display player sprite
  • Move player sprite
    • Left-right
    • Jump
      • Mario style controlled jumps
  • Map collision
    • Tiles that can be jumped through from below
    • Harmful tiles
    • Special effect tiles
    • Different environment types, eg water
  • Text boxes/popup messages
  • Sound/Music
    • Background music
    • Sound effects
  • Collectables/powerups
  • Camera
    • Follow player
    • Stay in map
    • Follow target other than player
  • Cut scenes
  • Changing levels
  • Continous map (load area changes seamlessly)
  • Main menu
  • Save games
  • HUD
  • Enemies
    • Ability to kill/be killed
    • AI/pathfinding
  • Multiplayer
  • Weapons/Ability to fight enemies
    • Projectiles
    • Stompin'
  • Different movement types
    • Climbing
    • Swimming
    • Flying
    • Double jump

Project Jumper Part 6: Sound; Bleeps Bloops and Frustrated Screams

OK, time to buckle down and get sound sorted out. You guys have no idea how super excited I am this. No idea.

Actually, for the most part it's not too bad. Yeah, Flash only lets you embed mp3 files. But a lot of the time, that'll work just fine, and if the limitations aren't anything that will affect you, then everything is gravy.

Obviously, we're going to need some sounds. Let's make a quick shopping list:
  • Background music
  • Player jump
  • Player death

Saturday, January 1, 2011

Project Jumper Part 5: Killing the player, aka Failure Is Always an Option.

Happy New Year, everyone! I hope you had the most excellent of holidays. Me, I'm celebrating the new year by getting helmutguy killed.

Incidentally, my original plan for this installment was to get started with sound. On the surface, it seem like it's a straightforward and simple thing to do, right? Make sound, embed the sound into your program, play the sound when appropriate. Done. Simple. If only! It turns out, you can't embed a .wav file into flash! It only supports mp3s. I could just convert all the sounds I make into mp3 format first, but there are certain technical reasons why that's not super great for sound effects. There are workarounds, but I'm going to fiddle around with them and see what works best.

Meanwhile, it's time for danger!