News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Metroid-Like Game in the works

Started by Ryan, May 18, 2013, 05:50:26 PM

Previous topic - Next topic

Ryan

Hey folks, I've been working on a small pet project for the last couple weeks and thought I might share it here.

I'm currently programming a "Metroid-Like" game in Python, with the goal to have my own original work at some point, although for now I'm just using Super Metroid resources to get things started, so it should look familiar :)  I have a few notes jotted down about what I want my game to be eventually, but for now it's kind of irrelevant, my main focus has been coding away and getting a playable facsimile of Super Metroid. 

I'm programming in Python which is a pretty easy language to work in I find, with pretty lax syntax rules, and it should be easier to read the code if you're unfamiliar with it then some languages.  I'm also using the Pygame and numPy libraries to speed things up significantly.  I plan on releasing whatever code I write through sourceforge as open source, I'm just doing this for fun and if anything I write is useful others are free to play with it, I just haven't gotten around to setting up a project there yet.

What I've been doing to show off the game is uploading small video's to youtube for friends to check out my progress, although I suppose I should probably upload some screenshots as well to post here later. 
You can check out the playlist on youtube here:  www.youtube.com/playlist?list=PLvoq8x17QjoGnyb5tFE4tmPIlTqXU_zp6
[spoiler=Youtube Videos]
Untitled Metroid-Like Game, Test Video 1: Bare essentials
Untitled Metroid-Like Game, Test Video 2: Animations everywhere
Untitled Metroid-Like Game, Test Video 3: Shooting Basics & Sound Effects
Untitled Metroid-Like Game, Test Video 4: Camera panning and aiming animations
Untitled Metroid-Like Game, Test Video 5: Hit detection (really) and weapon animations
Untitled Metroid-Like Game, Test Video 6: More animations, more weapons
Untitled Metroid-Like Game, Test Video 7: Map Design, Tile Trouble
Untitled Metroid-Like Game, Test Video 8: Collisions and bombs mostly

[/spoiler]

I'm mainly useful at coding, so I tend to lag behind on the animation front, ripping and arranging sprites is not exactly my strength, but I like to think the game is starting to look half decent already.

Features:
-Keyboard/Gamepad support (untested for any but my own of course atm) and customizable input
-Fullscreen/windowed mode supported (again untested on any but my own monitor)  The game plays in 640x480, but should scale fairly easy to larger monitors
-Player object basic physics, you can run, jump, aim in 8 directions, turn into a morph ball, and spin jump, not 100% complete, but again, looks pretty good to me
-Weapon fire, most basic beams/charge are working, animations are slow to progress, but the logic is there, missiles & super missiles work, bombs too!
-Basic Monster behavior, can add in monsters with limited AI (such as the ripper) and some basic "freeze" effect
-Collision detection work in progress Player + monster is fine, weapon + monster/tiles is fine, player + tiles is in with a few bugs
-Loading level design from map file mostly working - the game parses a "Tiled" map (basically an xml file) and can fill the screen with tile objects
-2D screen panning implemented, also parallax tiled background!
-sound effects were surprisingly simple to add
-music was similarly trivial


I'm currently working alone in my spare time on this project, mostly for fun, but I would definitely like to have my own game at some point, and I'm enjoying branching out my programming skills (I was taught mostly Java at university, so learning Python for fun now :) )  I focus mainly on the code and have a friend who occasionally lines up a few sprites for me to save me a bit of time in gimp.

Anyway, just thought I'd start a thread here to share my work with anyone who's interested.  I'm open to feedback, particularly if there exists people with better Python skills then me heh heh ;)

Quietus

Looks pretty good so far. :^_^:

For ease (and for lazy people), please make your Youtube url an actual link.

Ryan

Heh heh fixed now, I actually tried to post it as a link originally but got the message that I couldn't post links, although it appears I can edit them in, so at least its good now :)

passarbye


Vismund Cygnus

This is looking great so far. Keep up the excellent work!

Ryan

Glad to hear it's looking nice so far :)

I've made another short update video,  Untitled Metroid-Like Game, Test Video 7: Map Design, Tile Trouble

I'm quite happy with how the weapon animations are looking personally, and the map editor is a lot easier to use then how I've loaded levels in the past, the ability to have multiple layers, and even objects load from that map tool will save a ton of time later on.

I've been struggling a bit with samus-tile collision (in regards to movement really) so I've been a bit stalled in that area, but it's still very high on my to-do list.

Quietus

I like the look of the tile / map editor.  It looked like you had tiles from different tilesets all available at once.  Is this the case?

Ryan

Yes, I can use multiple images with different tilesets, it has options for margins/spacing/sizing as well, so it's quite customizable.  Between that and the ability to have multiple layers, I'm pretty confident it will allow me to design levels containing everything Super Metroid has.

Quietus

OK, we'll give you one week to recreate Eris's visual sex in it's entirety. :cool:

Ryan

#9
It's been a while since my last update, but I have definitely still been working on it, didn't want to post an update since by adding some samus-tile collisions I kinda messed up the physics, so its been feeling a little off lately, but I decided its probably time to post some progress ;)

Main thing of course is some collision detection, no sloped movement "yet" but it's mostly set up and ready to start, missile animations are looking about right, and bombs are in finally, I think they look/sound pretty good.

Untitled Metroid-Like Game, Test Video 8: Collisions and bombs mostly

Quietus

I've resisted long enough.
[spoiler]You sound like David Schwimmer. :^_^:[/spoiler]

As for the update, it seems like you face that nice moment in programming where you just think you get something sorted, and it throws something else out, and each fix throws out the next.  Just keep at it.

It might be nice to see a different tileset for the next movie.  I think most of us are bored to death of Crateria (not just your vid, but generally). :^_^:

Ryan

Heh heh thanks ;)

Yeah fix one thing cause something else to mess up, I know the drill :)

As far as different tilesets, sure, that shouldn't be a problem at all, with a bit of luck the next video will have some sort of room transition and I should be able build various types of rooms without too much trouble

Ryan

It's not dead yet!

I've been away for a bit but I'm strongly motivated to continue the project and feel pretty bad about abandoning it for so long... (one of my real life friends had offered to help me out with the photoshop/graphic side of things, and kind of strung me along for a couple months before bailing)

The typical thing with me is I get real interested in working on a game like this, but end up spending 90% of my time struggling to line up sprites and set up transparencies instead of the actual coding and design I enjoy, until eventually I need a break, this break was way too long though.

The main thing I've been working on the last few days is getting screen transitions to start working, and get some sort of GUI on screen for energy/weapons and so forth, I've got the basics here now, and it *should* be quite feasible to connect up multiple rooms with a variety of tiles now without too much work, I've decided to focus on "big picture" things for a while instead of straining myself on getting animations looking 100% or the engine to mimic super metroid to the finest detail... till later anyway

Small video update:
[spoiler=Youtube Videos]
Untitled Metroid-Like Game, Test Video 9: Not dead yet, Screen Transitions sorta
[/spoiler]

Also I finally got off my butt and uploaded the code to sourceforge, feel free to download and have a look if you want to, you can see what pitiful resources I'm using at the moment, or if you have python and pygame installed you should be able to run it yourself... I think...  at some point I'll try to compile a demo-like version, but that's a job for another day still I think

https://sourceforge.net/projects/metroidliketestgame/?source=navbar

One last thing, I'm currently interested in teaming up with anyone of similar interest, so if you'd like to chip in a bit of time via graphics/coding/design/review/whatever feel free to send me a pm, I feel like it would be more fun/interesting with some other people involved, and I definitely intend on finishing this project if at all possible, it feels like I've already made a huge amount of progress code wise and really shouldn't be too far off from a playable demo, except for the amount of time I end up spending hacking graphics together, and I still have dreams of making my own 2d sidescroller one day :)


Kitsune_Phoenix

Neat. What formats are you going to use for sounds and music? I'd highly suggest ImpulseTracker and/or MO3 (ImpulseTracker with MP3 samples) for music, and Ogg Vorbis/Opus for sounds (and additional music.)

Just some thoughts. I like ImpulseTracker's format because it is sequenced and thus can fit in a much smaller space than an Ogg or MP3, but it retains high quality and is extremely easy to edit (much easier than SPC for certain.)
ImpulseTracker also supports VST plugins such as Echo, Reverb and Flanger. In addition, you can set loop points. And with some clever position-jump trickery you can even have multiple separated songs in one file (Unreal made extensive use of this.)

MO3 is exactly what I said above, it is a compressor that takes ImpulseTracker, ScreamTracker and FastTracker music, and converts all of the samples from WAVs to MP3s (or Oggs) to save even more space.

As for Ogg Opus, think of it as Vorbis Mk II. Smaller, higher quality, and just better overall.

Ryan

At the moment I'm just using the pygame library which has a mixer for basic music/SE Pygame Mixer

I haven't worried too much about using something more complicated since this is getting the job done so far, it works very well with .oggs (not so much .mp3s)

I've also been using a couple converters online to go from .mp3->.ogg when I need to switch format, and that's been working pretty smoothly, I'm pretty sure I've got the majority of the super metroid sound effects converted and ready to go, for actual music I've just been using some OCRemix stuff that comes in .ogg to test out "bigger" tracks then the originals, I could switch the original music in pretty easy though or even have an option in the menu for something mostly trivial like that.

Similar to artwork I'm not really that knowledgeable with the music side of things, I'm *pretty* sure my current mixer can handle multiple channels/loops and the majority of stuff I'd need for the game

Kitsune_Phoenix

A "loop point" is not whether or not a song loops, it is what determines where the song loops.

For example, you have a song that has an introduction before it actually kicks up, and the part after the introduction plays forever but the introduction does not. For instance, the Hive Mecha boss theme from Metroid Prime.

Here are a bunch of links you can look at:
http://en.wikipedia.org/wiki/Impulse_Tracker
http://en.wikipedia.org/wiki/Scream_Tracker
http://en.wikipedia.org/wiki/FastTracker_2
http://en.wikipedia.org/wiki/Modplug_Tracker

http://en.wikipedia.org/wiki/Midi
http://en.wikipedia.org/wiki/Tracker_(music_software)
http://en.wikipedia.org/wiki/MOD_(file_format)
http://en.wikipedia.org/wiki/MO3

http://en.wikipedia.org/wiki/Ogg_vorbis
http://en.wikipedia.org/wiki/Opus_(audio_codec)

Ryan

Honestly I'm not sure exactly how I'll handle songs with intros now that you've mentioned it, my current library has support for Ogg Vorbis which in my current build is working well for sound effects and music that simply loops the whole track, and I suspect it will be considerably more challenging to try and use alternate formats, I can use .wavs of course, but that's even worse from a filesize perspective.  Apparently the mixer has support for XM and MOD as well, although they're a bit untested, and I don't see any functions that specifically will lookup a tracks loop point or options to change how looping works.

Kitsune_Phoenix

#18
All track-looping does with Tracker formats... well, I'll upload a tracker module that you can look at, just open it up in ModPlug tracker.

When setting loop points for a tracker module, you just put a Position Jump late in the song, and specify a pattern to jump to. When the song reaches the position jump, it goes to the pattern you specified, and if the position is earlier in the song then it will go there.

Position jumps can also be used to have more than one song in the same module.
If position 0 is song 1, and there is a position jump in position 0 to jump to position 2, then it will skip postion 1. If position 1 is song two, and there is a position jump in position 1 to skip to position 42, then it will go there. Meanwhile, you could have a position jump in position 41 to go back to position 5 if that is where you want song 1 to loop from.

Changing between songs meanwhile is as easy as telling the game to start playing the file from a specific pattern.

Scyzer

You should really forget about music completely until you have a nicely working engine IMO. I think anything like enemies, physics including collisions, and graphics should be far more prioritised than music.

Ryan

I'm not too worried about it honestly, I have the basics for music, at some point dealing with more complicated tracks will come up, but it's not a huge priority just yet.

I *do* have most collisions working now, I should probably throw in a few more enemies to demonstrate it a bit better, and graphics well, yeah, animations take up way to much time

RT-55J

Never get caught up too much with graphics, especially if you're not much of an artist.

Kitsune_Phoenix

#22
Mostly Off-Topic: I think aesthetics should always come before graphics, in all honesty. Having really high-resolution graphics and smooth animations is great and all but the actual art-style that goes into how everything looks--from tilesets to palettes--can make or break a visual experience.

For instance, Other M had great graphics compared to Metroid Prime, but the aesthetics lacked personality whereas creativity came first in Prime.

Back On-Topic:
I have been watching those videos now, and I have to say very great work so far! ^.^

Mon732

Quote from: Scyzer on May 15, 2014, 11:23:57 PM
You should really forget about music completely until you have a nicely working engine IMO. I think anything like enemies, physics including collisions, and graphics should be far more prioritised than music.

I agree.
Regarding looping tracks with intros you could have the intro in a separate .ogg file then have the game load the rest of the song when the intro finishes and loop that.

Ryan

Yeah I was thinking just splitting the songs up might work, I do have the ability to jump to positions in the track with my current mixer, but it's a lot of work for not too much gain, for now I won't be spending much time on it, but its good to have some plans ready for the day I feel like tackling it.

Unfortunately there's only so much coding I can do before I have to start fiddling with graphics, there's what, somewhere around 100 frames of animation just for Samus alone in a single suit? each one has to be aligned and ordered before I can even start coding when to show what, one of the main reasons I started with Super Metroid graphics instead of "custom" is that it's a lot quicker to take existing sprite sheets and modify them to my use then come up with something new.

The good thing is though that I have most tiles ready to go, although a fair number need some transparency editing, so I should be able to show off a fairly nice looking level for the next update, and usually enemies don't have too many different frames of animation which helps me out a lot.

I have some mixed opinions on Other M... suffice to say that's pretty much not the direction I want to go with this project for a variety of reasons, I'm aiming at snes-era animations give or take, there's actually quite of a lot of spare resolution to play with as far as details go, but unless some artist feels like creating higher res sprites it's pretty unlikely I'll be pulling that off any time soon.

The thing I really need to learn how to do is in code color edits, I know the very basics about it, but I need to figure a way out to let's say palette swap the power suit to the varia suit in code, instead of needing the images for every animation on file and edited by hand... and that *should* be a fairly easy job, making the screen/area fade or flash to a specific color are more animation type problems I'll have to look at eventually