I'm interested in writing a custom platform engine and then posting the finished MFA back here. I think this will help me become a better coder and, if all goes well, help someone else out as well with the open source MFA. I've been working on a Mario platform movement but want to make it a bit more general with more movement types.
So, this brings me to my need for movement ideas. So far, I know I need the basics:
Walking
Running
Jumping (double, variable height)
Crouching
Skidding (while crouching)
Sliding (while running and changing directions)
And then the special objects:
Springs
Conveyors
Horizontal Moving Platforms
Vertical Moving Platforms
Plus, the advanced movements:
Climbing on ladders (vertical)
Climbing on poles (horizontal)
Flying
Swimming
And, the specialized movements:
Wall jumps
With special environments:
Low Gravity
Wind
Can you guys help me fill in the gaps? I think it'll be a fun exercise. I'll post the finished MFA back to this thread when I'm done.
Originally Posted by -Adam- Cannon launching
Rolling
Id also say pushing blocks, it's kinda a movement I guess :3
Excellent! I like the idea of the rolling (sounds sort of like Metroid). And the block pushing does sort of fit into this type of engine. My only question is the cannon launching. Is that sort of like a spring (Y movement up) with some X movement added?
Well, as long as that spring facet is expanded to include built-in pogo stick support, you will already have a winner of a movement even without any other features.
Although ledge grab isn't really necessary, just thought it would make it complete
Slopes! Definitely!
The ledge grab I'm going to have to think about how to implement -- especially if the engine gets wall jump. Do any of these movements/actions become mutually exclusive?
In sonic for the game gear there were pogo stick springs that latched onto sonic when he touched them, and you could bounce all the way through the level with them if you didn't hit anything.
Advanced Movement:
Slopes
Climbing on ladders (vertical)
Climbing on poles (horizontal)
Flying
Swimming
Special Abilities
Wall Jumps
Rolling (Metroid style)
Block Pushing
Ledge Grab
Growing and Shrinking (Mario style - to drop through gaps in platforms)
Mid-air Dash
Speed Boost
Special Objects:
Springs
Pogo Stick (sort of like a Spring that sticks to the sprite)
Conveyors
Horizontal Moving Platforms
Vertical Moving Platforms
Cannon Launching (Spring + X Movement)
With special environments:
Low/High Gravity
Wind
Ice-covered Ground
Great help, folks! Anything else you can think of?
Running up a wall to get up it, or you can run up the wall then hit the opposite direction to back flip off the wall. I would imagine it would have a strong horizontal velocity so you can get the drop on an enemy chasing you or something. Also swinging on ropes or what have you. Is there gonna be crouch walking? Also if you are going to have ice covered ground how about ground that is hard to move in, like how it happens in a racing game if you go over dirt.
Thanks for all of the excellent input! I really do appreciate it. Also, I am quite serious about this project. As most of you know, I've been working on my "first great project" ... Captain Plokey. But lately, I've become somewhat obssessed with custom platform engines. Over the past few months, I've downloaded just about every engine I could find. The cool thing about these engines is that while many have common features - many also have some radically different code. Most of the engines have been pretty basic, but there are a few which I've been really impressed with! I can't name all of my sources (as some have asked me not too) but I will be handing out a few "coding trophies" to them all as I accumulate the points.
While all of these engines have been great (and fit the style of their respective games), I've really been intent on building a near "feature complete" engine. I've seen so many different cool features and wondered how they would integrate into a single engine. Additionally, the reason that I created this thread under "Klik Coding Help" is that I want to (1) get feedback from you guys and (2) make this open source.
While I understand why some of you don't make your games open source (especially if you intend to sell the game), I am a huge fan of open source. I would not have made any progress on this stuff if I didn't have help (or tutorial-style code) from others. Folks who make code available to me (if only to help me understand what they did) have my gratitude! So, if I am able to help anyone else out by making my code open source to them - then that would make me very happy. Even Captain Plokey (when it is finished) will be open source.
Recently, I responded to a thread on mfgg.net about open source engines. One of the long-time forum moderators urged people to not make their custom engines "open source" because he felt people would simply take the engine and (without modification) create a game. This would (and has) resulted in a number of games that play and feelt the same. While I understand this may frustrate the folks who frequent the site looking for "new and different" Mario games - I also feel the open source engines are indespensible tools for the casual game developers. How else will we understand how some of the more complex features are programmed? Additionally, some of these feature complete engines demonstrate how some sections of code must be "turned off" or "disabled" so that other parts can be executed. There are so many benefits to looking at a near feature-complete engine that I just can't understand why someone would try to deny someone from viewing one. Anyway, I don't think either of us will ever agree on that topic.
But, I'm going stick by what I believe in and attempt to do the following:
1. Create a "near" feature-complete custom platform engine (I say near because you'll never have everything - but you can do a lot)
2. Elicit feedback and help from you guys (again, that's why this is under "Klick Coding Help")
3. Publish the "open source" custom platform engine to the Downloads when it is finished
As there are a lot of features, I think I'll post incremental versions so that you guys can see the progress and make comments. I've started to make the sprite which I'll keep fairly basic:
I've been working on slope movement lately so hopefully I'll have a version 0.1 to publish soon. Again, thanks and keep the ideas coming!
Okay, I drew the "Walking" animation for the sprite. For some reason Jasc Animation Shop is dropping some of the colors but here is an animated GIF that, for the most part, shows what it will look like:
I'm using the Super Mario engine I was working on as a base. So, if it feels a little "Mario-ish" ... well, that's why. Hopefully it'll feel more generic ... or "universal" ... as features are added. I'm hoping to have something I can post within a week or so.
(click image to enlarge)
Also, I am using a cr*pload of counters. I don't know if that is the best way to build the engine or not... but it seems to work. Once I get the MFA post, you're constructive criticism is definitely welcome.
Alterable values would be a more contained system, but there's nothing wrong with counters if that's what you want to do. Easier to read what's going on at runtime.
Originally Posted by OldManClayton Alterable values would be a more contained system, but there's nothing wrong with counters if that's what you want to do. Easier to read what's going on at runtime.
Yeah, I tend to give "pretty pictures" to all of my counters so that I can easilly read them in the Events Editor.
What he means is keep the counters on screen and put a string next to them that describes them. When I use alterable values for my x, y and stuff like that I always use "set counter" equal to "alterable value a" or something like that. This makes the counter display what the alterable value a is.
But since you are using counters already just put them in number mode and place a string that describes them next to it. It's convenient when you can easily see exactly what is going on with your values.
Gotcha. Sounds like the only thing I was missing then was the descriptive text string. At one time, I had over 15 counters (no lie) on screen to show me what was going on. I had them placed in various locations and groupings so that I knew what they were. Textual descriptions would definitely be easier.
just for specifics if you still want. its not that hard. it does make it a lot easier than counters.
edit: just read dudehuge's comment. and no thats not what i mean. i mean using a string to display everything. it allows you to entirely use alt values and still display the numbers on screen, with any other descriptive text before or after or wherever. you use the STR$() function to insert a value into a string, and the newline$ variable to insert a newline for each row of information.
no problem. hope it makes it easier to organize your engine .
also
double jump
reverse dash/avoid (castlevania/smash bros melee style)
alternative gravity. gravity to the top, left, or right, as well as bottom of screen.
grapple hook
swimming
jet pack (thrust engine)
HangGlider movement using accurate gliding with wind resistance and air currents to provide lift (updrafts) and allow for a more dynamic feel (wind direction) (gusts of looping air)
Breakable weapons that can be carried over to the next stage
Chameleon style background blending of the character to reduce chance of being seen by the enemy by a % (affects AI)
ShapeShifting (once a shape or creature has appeared on screen, that form becomes available to change into)
Destructible Terrain (smashing chairs, tables, windows, breaking walls, chopping down trees)
Enemy reaction based upon attack blow dealt to them (if you kick em in the nuts, they grab em and fall to the ground coughing or whatever)
Loss of Limb (attack hits the arm, it gets cut off) and appropriate response (enemy has just one leg, they have to hop, or grow another back)
Throwable Items (anything not bolted down and not too heavy should be able to be thrown)
Digging (got a shovel? .. ground soft enough? .. you can dig!)
Blood Loss (character gets injured badly, they need to find a medi-kit or complete the level fast, as their lifeforce will deplete)
If they make it to the next level they get healed.
Angel/Demon Wings with flight that reacts to the wind and the wingbeats (flapping of the wings), along with glide ability (see Hanglider movement above)
Liquid Viscosity (varying degree of movement slowdown in liquid depending upon type of liquid) aka internal fluid resistance, aka fluid friction or thickness
Slip and Fall (try to move too quick on ice or a skateboard to start, then you fall) (need to work up speed slowly to keep from falling at high speed)
Variable walking and running speeds ... acceleration and deceleration
Alterable clothing/Appearance (it gets tattered/blood stained/ripped the more you get damaged)
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
Advanced Movement:
Slopes
Swimming
Climbing on ladders (vertical)
Climbing on poles (horizontal)
Flying (normal)
Flying (with:Jet Pack - continuous key-hold thrust engine)
Flying (with:Angel/Demon Wings- keystroke-driven wingbeats/flapping with gliding)
Reverse dash/avoid (Castlevania/Smash Bros Melee style)
Special Abilities
Wall Jumping
Rolling (Metroid style)
Block Pushing
Ledge Grabbing
Growing and Shrinking (Mario style)
Mid-air Dash
Speed Boost
Chameleon (background blending of the character to reduce chance of being seen by the enemy)
Special Objects:
Springs
Pogo Stick (sort of like a spring that sticks to the sprite)
Conveyors (left and right)
Horizontal Moving Platforms
Vertical Moving Platforms
Cannon Launching (Spring + X Movement)
Grappling hook
Hang Glider (movement using gliding with wind resistance and air currents to provide lift)
Breakable weapons (that can be carried over to the next stage)
Throwable Items (anything not bolted down and not too heavy should be able to be thrown)
Shovel (digging)
Special Environments:
Low/High Gravity
Reverse Gravity (gravity to the top, left, or right, as well as bottom of screen)
Wind (constant X movement)
Ice-covered Ground (slower accelleration/deceleration)
Destructible Terrain (smashing chairs, tables, windows, breaking walls, chopping down trees)
Liquid Viscosity (varying degree of movement slowdown in liquid depending upon type of liquid)
Game Mechanics
Enemy reaction based upon attack blow dealt to them
Blood Loss (character gets injured badly, they need to find a medi-kit or complete the level fast)
Alterable clothing/Appearance (it gets tattered/blood stained/ripped the more you get damaged)
Wow. If you're able to make this thing with all those features and do it open-source and free an' all that ... You'll deserve the Nobel Peace Prize or something ..
Well, a TDC trophy from everyone who downloads it at the very least ..
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
I have to say, a lot of those features that were requested seem like overkill. Especially with the whole blood loss/tattered clothes thing. Half those features wouldn't be used in most games.
Personally, I'd leave in the basic movement and those extra features that would get a lot of use, and remove some of them. But it's your call.
Originally Posted by MBK Wow. If you're able to make this thing with all those features and do it open-source and free an' all that ... You'll deserve the Nobel Peace Prize or something ..
Well, I can't promise I'll be able to do them all.
I'll probably be able to do most of the movements and then pick and choose some of the other interesting features. The nice thing about this being open source is that if I make it modular enough others should be able to extend it with more movements without too much difficulty. I think the success will all be in the overall architecture of the engine - not the individual movements. I just hope I'm up to that task.
Originally Posted by RedEchidna I have to say, a lot of those features that were requested seem like overkill. Especially with the whole blood loss/tattered clothes thing. Half those features wouldn't be used in most games.
Personally, I'd leave in the basic movement and those extra features that would get a lot of use, and remove some of them. But it's your call.
True, some of the non-sprite movement features won't be used in most games. I'll try to pick out a few of interesting ones and leave the rest to others. But, the cool thing about brainstorming and coming up with a "wish list" like this is that it gets the creative juices flowing. Even if a number of these features never make it into the engine - it's still fun (and healthy) to dream up new possibilities and applications.
For instance, before Cecil mentioned "reverse gravity" - I would certainly not have included that in the engine. As a matter of fact, when he DID mention it - I sort of groaned because I had NO idea as to how something like that might be integrated into my current engine. However, after letting the idea percolate for a while I think I may have a workable solution.
For example, one way to do reverse gravity might be to:
- Have two different sprites (one right-side up and the other upside down)
- Each sprite would require its own set of detectors (obviously the upside down sprite's would be reversed)
- Have both sprites move together but HIDE the upside down sprite at the frame start
- When gravity is toggled from NORMAL to REVERSE:
--- You could disable the Normal Movement group and enable the Reverse Movement Group
--- Hide the normal sprite and display the upside down sprite
- The Reverse Movement Group would essentially be a copy of the Normal Movement Group with the "Y" movement modified
This may not be the BEST way to tackle this problem but I do think it would work. I am using two different sprites for the Growing/Shrinking so, to some extent, I'm already doing something similar.
Anway, even outrageous ideas are good ideas in a brainstorming session.
Originally Posted by Mr G That's "really" big to-do list
Good luck making it
Baby steps! It's all about the baby steps!
Actually, I'm sure I won't finish all of it. But, it should be fun to pick out some of the more interesting features and work on them. I think this is where I stand today:
Advanced Movement:
Slopes
Swimming
Climbing on ladders (vertical)
Climbing on poles (horizontal)
Flying (normal)
Flying (with:Jet Pack - continuous key-hold thrust engine)
Flying (with:Angel/Demon Wings- keystroke-driven wingbeats/flapping with gliding)
Reverse dash/avoid (Castlevania/Smash Bros Melee style)
Special Abilities
Wall Jumping
Rolling (Metroid style)
Block Pushing
Ledge Grabbing
Growing and Shrinking (Mario style)
Mid-air Dash
Speed Boost
Chameleon (background blending of the character to reduce chance of being seen by the enemy)
Special Objects:
Springs
Pogo Stick (sort of like a spring that sticks to the sprite)
Conveyors (left and right) Horizontal Moving Platforms Vertical Moving Platforms
Cannon Launching (Spring + X Movement)
Grappling hook
Hang Glider (movement using gliding with wind resistance and air currents to provide lift)
Breakable weapons (that can be carried over to the next stage)
Throwable Items (anything not bolted down and not too heavy should be able to be thrown)
Shovel (digging)
Special Environments:
Low/High Gravity
Reverse Gravity (gravity to the top, left, or right, as well as bottom of screen)
Wind (constant X movement)
Ice-covered Ground (slower accelleration/deceleration)
Destructible Terrain (smashing chairs, tables, windows, breaking walls, chopping down trees)
Liquid Viscosity (varying degree of movement slowdown in liquid depending upon type of liquid)
Game Mechanics
Enemy reaction based upon attack blow dealt to them
Blood Loss (character gets injured badly, they need to find a medi-kit or complete the level fast)
Alterable clothing/Appearance (it gets tattered/blood stained/ripped the more you get damaged)
There are a couple of other movement engines which I plan to "leverage" and see if I can roll some of their ideas into this one. *cough* wall-jumping from TOPH3R's engine *cough*
By the way, I think Assault Andy nearly choked on his sandwich when I showed him the MFA with all of the detectors I have in the engine. So, big warning, I not only have a cr*pload of counters - I also have a massive collection of detectors. I have ZERO idea if this is the best way to do it but it does seem to be working.
That said, I'm doing my best to comment this engine and keep it well organized.
Originally Posted by DudeHuge There is this Sonic game engine that uses so many detectors it would blow your mind. Doesn't matter though since it works amazingly.
Where can I get that Sonic engine? I am a huge sucker for well-made engines.
I would much prefer it if it was 1 single object with no seperate detector objects or counters and using behaviours, it would make it easier to drag and drop it into a project.
But I'm sure someone wouldn't mind changing the file to be like that after you've finished
Originally Posted by Klikmaster I would much prefer it if it was 1 single object with no seperate detector objects or counters and using behaviours, it would make it easier to drag and drop it into a project.
At the risk of sound like a complete noob, how do you add a "behavior" to an Active Object?
Originally Posted by Klikmaster But I'm sure someone wouldn't mind changing the file to be like that after you've finished
They need not wait until it's finished.
I should have something to post within a week or so. It'll be far from complete and probably just include the features I've completed so far. It'll also likely have numerous remnants from my Mario engine (which should be cleansed in later releases). But, it should give folks an idea of where I'm headed. I'd like to get this first 1.0 version somewhat stable as I figure people will either like it - and have confidence that I can get somewhere with this. Or, they'll think its just another MFA ball of garbage - and dismiss the idea entirely as some flight of fancy. So, here's hoping for the former.
True! The list does need levers and hidden walls! Probably even destructible walls (once you put shooting in it).
To be honest, the engine does already have something similar to the levers (if not the hidden walls). Since I am working off of a Mario engine I was compiling, I had P-Switches in it. I think the P-Switch acts pretty much the same as a lever might (except that once it is pressed it can never be "unpressed" - unlike a lever which can usually be toggled).
Do a Spelunky-like procedural level generator.. and you'll have an engine about as good as Spelunky's
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Originally Posted by DudeHuge There is this Sonic game engine that uses so many detectors it would blow your mind. Doesn't matter though since it works amazingly.
Where can I get that Sonic engine? I am a huge sucker for well-made engines.
You can find the sonic engine (named Static Engine) and a lot more on the tutorial pack I've uploaded Check my profile to see.
Okay, I think it is time to show you what I'm working on. Before you download it, please read these comments:
First, this is a Work In Progress and is by no means finished. It has a complete lack of polish, multiple bugs, some poor custom animation, and some ripped animation (which needs to be removed). Please don't judge this completely by what you see today. I think it's far along enough to show folks where it is headed but certainly not there.
Only a handful of the actions we listed are actually in this engine. I think the last list I had (with completed actions being crossed out) is fairly accurate.
As I said before, this is a conversion of a Mario engine that I was working on. You will see NUMEROUS references to Mario in terms of graphics, comments, and objects. For this first release (well, actually v0.3) I think it is okay to leave them in. Once this engine gets a few more custom movements (flying, swimming, etc.) I'd like to completely remove all of the Mario references and make it as generic as possible.
I DID NOT WRITE ALL OF THIS ENGINE. I put a TON of work into it but I did not start from scratch. I feel the work has been enough to "make it my own" but I am not about to take credit for other people's work. So, people that had an influence on this engine include: David Newton (of course), Matthew Phizacklea, Ross McKisseth, and Justin Aquadro. In the MFA file, the first code group is called README. You'll see EXACTLY what each person put into the engine.
Although David Newton's engine had influence on this one, this is not an adaptation of David's excellent custom platform movement tutorial. If you are familiar with that engine, I think you'll note some significant differences (specifically, the lack of constant gravity even when standing on a backgroud or solid object). This is more an adapatation of Matthew Phizacklea's engine (which, as I understand it, was an adaptation of Arf's engine). We all stand on the shoulder's of giants.
My biggest contributions to the engine are around slopes, ladders, and most of all organization. I've done a lot of work on just about everything but those are the main areas. The slopes were built to match the movement in Super Mario World.... as were the ladders. Unfortunately, while ladder movement in Super Mario World is really about crawling on vines (and allows the player X movement in addition to Y movement) - I don't really think it works when the ladder "looks" like a ladder. So, I don't like the ladders in this VERSION of the engine for two reasons: (1) The X movement needs to go. Only Y movement on the laddder. And, (2) my climbing animation stinks. I like the walking, running, lookup, crouch, and slide animations but the climbing just bites. It'll be better in the next VERSION (which I can probably get out in a couple of weeks).
I think OMC is right - this probably needs to move OUT of the forums and INTO a project page. I would LOVE to work on this with anyone who is interested. If you are at all interested, I think this is modular enough to "fairly" easilly support new movement types. I think the stuff that needs to be added is:
** 1. Add a new movement NUMBER to the MOVEMENT TYPE counter
** 2. Add a movement check under the SPRITE MOVEMENT - SPECIAL / CHECK MOVEMENT group
** 3. Set which groups need to be activated/deactiveted under SPRITE MOVEMENT - SPEICAL / ACTIVATE MOVEMENT
** 4. Add the logic for the movement under SPRITE MOVEMENT - SPECIAL / (name of the new movement)
** 5. Add the animation for the movement to ANIMATION
See, it's as easy as 1-2-3! (Haha! Or, as easy as 1-2-3-4-5)
It would be fun to tackle most of the list. Once I get more time to "cleanse" the engine of the Mario stuff and fix the Variable names and images, adding new movements should come relatively quickly. PLEASE join in if you are at all interested. If you do add a movement, just add your name to the list of CREDITS under the README section.
All constructive criticism is welcome. You can even tell me to go jump in a lake and that I've just wasted your time. Just please know that I am a simple man and will usually sacrifice speed/size if it means things are more straightforward and easy to understand. I know that is not the way everyone does it but I find myself getting lost in the code when it gets too complex. So, you'll notice I use a lot of counters with pretty pictures. For me, it works. If it doesn't work for you, my apologies... take what you can from this and adapt it. You are more than welcome to take whatever you think is worthwhile.
I am writing this as quickly as I can. I'll review it later for spelling errors and word omissions.
I hope you find at least part of it worthwhile. BTW, PLEASE check out the RUNNING (HOLD CTRL), SLIDING (running and then crouching), and SKIDDING (running and then changing directions). I think they work well.
Being able to hold down and jump on platforms to fall through them would be a huge plus. It's a very solid engine. Perhaps you could add the ability to look up and down. I half expected this when I was playing it as it would fit so nicely with the animations.
Originally Posted by Smirnoff Being able to hold down and jump on platforms to fall through them would be a huge plus.
That's a very cool idea... and I don't think it would be that hard to add. Just out of curiosity, what games use that particular mechanic?
Originally Posted by Smirnoff It's a very solid engine.
Thanks! I've had fun working on it. Assault Andy has been helping me with Captain Plokey but I've really been interested in custom platform movement lately.
Originally Posted by Smirnoff Perhaps you could add the ability to look up and down. I half expected this when I was playing it as it would fit so nicely with the animations.
I think you're right. So far, I've only been focused on the platform movements but it would be nice to add in an intelligent camera. Originally, when I was trying to replicate Super Mario World, I was going to try to create a camera which emulated that game. As this is a generic engine, I don't think the SMW camera is necessarilly the best one to use.
I know the "look up" and "look down" camera action is used in Sonic games. Do any other games use that camera movement?
Thanks for all of the feedback, guys! It's been extremely helpful.
Also, I've created an offical project page for this engine (per OMC's recommendation). If any of you are still interested in contributing ideas, evaluating builds, or providing constructive feedback - please visit the page. Also, if you'd like to work on coding some of the movements - please FEEL FREE! Your help would be greatly appreciated.
Apologies if it's been suggested, I didn't have time to look over every suggestion but:
Moving Blocks (more than just platforms, things that can push you off platforms and such, such as those sliding blocks that come out of walls etc.)
Rotating Platforms (think Yoshi's Island, so if you stand on one side your weight rotates the platform around that way)
Has anyone mentioned Crawling?
Perhaps the rotating platforms might something not directly linked to your platform movement, but if you made your platform movement behave properly for such objects it would be nice. Essentially making it so the character would slide down slopes too steep, and not clip through this object would suffice.
This rules. May I also suggest a few things. Not sure if these are already mentioned or not.
Variable friction values of both ground and feet: Ice is included but this could give an array of ground grip and shoe grip combinations, allowing things like spiked boots for walking on ice and skis for intentional loss of friction etc. Rain affects ground friction?
Weapon recoil: eg if firing guns you will be pushed back by the force expended, which could be dangerous or handy whilst airborne and also allow for rocket jumps etc.
Oxygen meter for underwater
Kick objects: similar to pick up and throw but good for quickly using ground objects and stones etc as a weapon.
Bash: For using any picked up object as a bashing tool rather than throwing it.
Sneak: for undetected movement
Health affected movement: Eg slower walking/limping, limited jump height when hurt etc.
object weight: Held objects have weight which affects walking speeds, jump heights and ground friction etc.
Wall running. Certain wall sections the player will run on horizontally if the player is moving fast enough.
Also, vertical wall running. Same as above except for running up a wall.