Platformer/Fighter (Could Use A Proper Engine)

This is the place to post your own creative works for other to play or give feedback on!
Forum rules
This forum is for posting and collaborating upon third party work. Please do not post request-threads, and avoid posting artwork that is not your own unless it is being used as a reference.

Platformer/Fighter (Could Use A Proper Engine)

Postby KaTsuO_O » Sat Mar 09, 2013 9:42 pm

I got inspired by some of AnotherArrow's work to make a Platformer/Fighter. Now when he have chosen to go in another direction, I feel that it is a good time for me try to make one myself. However, I'm not the greatest programmer, so my engine is pretty much a mess. It gets the job done for most part, but I'm having a hard time trying to implement certain things. One example being double press to run. So if there is anyone who can do a decent Platformer engine in As2, then that would help.

Controls:

Left: Walk Left
Right: Walk right
Up: Jump
Shift: Turn around
C: Run (only when unarmed)
F: Switch between gun and fists
Space: Shoot

(Click the blue text bellow for fullscreen)
Click to Play
(Javascript Required)

Character Model Test Room.swf [ 135.24 KiB | Viewed 13196 times ]



Character Model Test Room.fla
(842.33 KiB) Downloaded 642 times
Last edited by KaTsuO_O on Sun Mar 10, 2013 1:07 am, edited 1 time in total.
Don't create a porn game if you're only interested in porn.
Wise words regarding criticism http://www.youtube.com/watch?v=-98ZFl1sKt4
User avatar
KaTsuO_O
 
Joined: Tue Nov 02, 2010 6:03 pm

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby QuizmasterBos » Sat Mar 09, 2013 10:23 pm

That's pretty good! I especially love her walkcycle; very smooth and it doesn't 'cut' awkwardly when you stop holding a direction.

At first I found the use of the 'shift' button a bit confusing, but it actually works surprisingly well. Did you put the slight pause before being able to switch around after jumping in deliberately?

The jump animation can still use some work. Since she doesn't bend her legs (yet), she just sorta floats up.

Love the gun, it looks good, sounds good and it works well. However, since it does take a while to take out, I expect it to become very problematic in tight situations.

I like the character. Did you make her up yourself? The only thing I see improvable there is the eye-color. It blends in too much with the pupils and the black headwear.
Sadly, you can't see much of her until you zoom in. I hope you are thinking of zooming in the camera a bit, or putting multiple zoom options.
Also, nice jiggle-physics :D

Overall, I have to say that it is a really good start and I don't agree it is a mess. It is extremely well-made, especially considering the situation. I hope this project gets off the ground, I'd hate seeing this disappear; It's too well-made. Please keep working on it.
User avatar
QuizmasterBos
 
Joined: Wed Aug 15, 2012 1:31 pm

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby OwnerOfSuccuby » Sun Mar 10, 2013 12:51 am

Just as example - may be it will give some ideas:

Double jump:
Example:
download/file.php?id=6218
Code:
download/file.php?id=6223

Double press too run:
Example:
download/file.php?id=6219
Code:
download/file.php?id=6224

But i hope you understand that the platformer game type is one of the hardest of all game types on flash ?
For an example "Edfarf" - is if i did not mistake - platformer on AS2 - corta staplatformer use the same looking code if i am not wrong.
But i little dislike edfarfs controll type. You will need a lot of time to make levels / enemys / anymations for it / code all bosses and etc.

Just as example MiMs platformer - if i am not wrong works with it last already a year. Gorepete make SNT - a long period of time too.

---

About the project:

Very interesting idea - and very good charecter and very good animated ;) It will be very interesting if games like this will be made on this forum ;)

Will it be hentai game or Kill/Find/Walk through type ?

By the way some little bug - if you jump for example right and in the air unpress right and press left and hold jump it will jump right not left
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby AnotherArrow » Sun Mar 10, 2013 2:27 am

If this was AS3, I'd think you'd have an easier time, I created a whole controller object class to keep track of when things where press... but if AS2 is your route:

Your probably going to need a global temp variable that keeps track of when the last press of each button was.
For example a
Code: Select All Code
var up_recent_press:int;
var down_recent_press:int;
var left_recent_press:int;
var right_recent_press:int;


When the button is pressed, the variable is set to 10.
When the button is depressed, during the main stage onEnterframe function, an if statement checks the variable to see if does not equal to 0. If it doesn't it subtracts it by 1;
Code: Select All Code
if(up_recent_press > 0)
    up_recent_press--;


Also, Create a function that checks the variable.
Code: Select All Code
// Not sure if this AS2 format...
function WasUpPressedRecently():boolean{
   if(up_recent_press > 0)
       return true;
   return false;
}


So now you have a function that will tell you if the button was recently. In this example, within the last 10 frames.
Now you have to go to your movement code and place a check in there

Code: Select All Code
if(WasForwardPressedRecently()){
    // Preform Dash / run forward
}else{
    // Walk forward
}
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby LuftMallow » Sun Mar 10, 2013 2:30 am

I've been using Humbird0's optimized Mario is Missing engine as the base for my project, and even I could figure what things do what in the code. Unfortunately, downloading most of his older stuff has been disabled, so you should ask him personally for the files if you're interested.
User avatar
LuftMallow
 
Joined: Sun Mar 06, 2011 12:29 am
Location: In the lofty heights above

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby Kurushimi » Sun Mar 10, 2013 6:11 am

Only two things I can really comment on, neither of which relate to the engine (I don't know how to code).

1. Pressing a button to change walking direction is tedious. A better option would be pressing a button to not change walking directions.

2. The gun. I could be preaching to the choir on this, and I understand that you may have done it the way you did for convenience, but one wouldn't fire such a slow weapon from the hip. The hip is for fully automatic guns, where the spread of the bullets due to recoil would make up for the lower accuracy (along with the less reduced movement speed). Basically, the hip fire would be best for covering fire. That gun, you'd want to fire from the shoulder. It provides greater accuracy, which is necessary with a low rate of fire, but of course still slows you down.

If I'm wrong on any of these points, please do correct me. It's in the spirit of accurately portraying reality, and finding the truth is more important than being right.
User avatar
Kurushimi
 
Joined: Mon Jan 21, 2013 12:45 am
Location: Norway

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby urielmanx7 » Sun Mar 10, 2013 6:42 am

Good job with the animations, the char looks cute as hell.
Personally I don't like that you need to press a button to turn around, but it's just my humble opinion and like.
I liked though, that she stops briefly when lands, just need a small animation to nail the effect.

Overall good job, hope this get past the concept test.
Good luck (I would love to help, but you can tell I'm hands full) You might want to try the Ultra platformer tutorial, if you haven't already, that gave me the push I needed to start my game.
Image
isnt more fun that way?
Visit my blog if you would
http://urielmanx7.blogspot.com/
User avatar
urielmanx7
 
Joined: Sat Oct 09, 2010 12:59 am

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby KaTsuO_O » Sun Mar 10, 2013 7:49 pm

I'll start out with the important things, and then I'll go in to personal replies where I answer the remaining questions and thoughts.


The reason I made it so that you have to press a button to turn the character, is so that you can walk in one direction, while still face another direction. It is useful in combat because you don't have to turn the back of the enemies in order to back off. AnotherArrow made it so that you could sprint forward but also jump backwards, I find that brilliant. If I make the jump faster than the sprint (but slower for long distances), then it would be more convenient to jump back in order to avoid an incoming attack than turn around and run a few feet. So that is the reason why I made that decision but also an explanation how I'm planning on using it. It is something that you should get used to and it adds more possibilities with look and walk direction specific moves.

The pauses for the different moves is put in deliberate. One example is when she falls and hits the ground, I wanted to give the feeling of that she actually hits the ground. So I added a small animation and made it so that you can't move while it is playing. I feel it makes it a bit more natural, than if you just instantly can walk after a fall and there is no visual impact. However, the animation is made for when you jump or fall from low heights, so the impact doesn't look that great when falling from greater heights. I'm planning on making one or two more animations, one where she stumbles as she hits the ground, and one where she gets down on her knees with a hand on the ground which will slow you down even longer for added effect.

The animation for when pull out the gun is pretty slow, but if I make it faster, then it will be harder to tell what the gun really weights. It is the animation that tells us how heavy something is. However, you can actually start shooting before the animation is complete. If you hold down space while she is pulling it out, she will shoot as soon as possible, which takes 0,8 seconds while the full animation takes 2 seconds. Since it still takes a while to switch between the gun and fits, I think that it adds a bit more strategy to it. Especially since there is certain actions you only can do while unarmed or vice versa, one example being the fact that you can't sprint while holding the gun. So you will need to think if you should have the gun ready, or if it is smarter to keep it on the back.

Another thing that makes it a bit more natural is something that I think OwnerOfSuccuby mentioned, the fact that you can't change direction or stop once you're in the air. When you run of a ledge, then you keep moving with the same velocity as you had before the feet left the ground. I wanted you to have a bit of control in the air, but I didn't manage to get that to work. However since you always jump the same distance, I can design the platforming around that and hopefully make it less frustrating. The platforming is mostly going to be used to get around, instead of being the main obstacle. The challenge is more focused on the combat, so I don't think that I need great precision controls, just something that feels natural.

I made the character myself... I don't really have much more to say about her, other than I think I managed to make a quite nicely designed character.


@QuizmasterBos I'm glad that you think shift to turn works well, since I don't want to add something that no one likes to use. Hopefully people will be more supportive of it once they read my explanation.
I thought it would be good to have an animation where she bends her leg before jumping, but I didn't want to make the jumping feel less responsive. However, since you remind me, I think I should give it a shot. The jump animation doesn't look that great either, so it could certainly help.
I'm not planning on making you able to zoom and I'm also not planning on having a camera follow the character. Instead I'm thinking about having screens, and you walk from one side to the other to get to another screen if possible. If the area is big, then it will be more zoomed out, if the area is smaller, then it will be more zoomed in.
The engine may look pretty on the outside, but it's code is quite a mess and it could be a lot better programmed. If it would be better programmed, then I could more easily add certain features.

@OwnerOfSuccuby Thank you for the sources, but I am not exactly sure what parts of the codes that would help me, or even how I would add them to my engine. Because there is so much programming and it seems so different from how I have programmed it.
I am planning on adding some adult content, but you will not get it during gameplay. It is still something I am thinking about how I want to implement, so I can not say yet how or when you will get the adult content. I really do not want it to hurt the game design, so if I can not find a good way to implement it then I will not add it at all. While I would love to see her getting in to dirty situations, I feel that the game it self is more important.

@AnotherArrow I appreciate that you took your time to write it all up and explain it. However, I managed to get it to work, but at the same time it broke other things. I'm pretty sure that is because my programming is so bad to begin with, and my lack of understanding of programming.

@Kurushimi It is not a bad idea that instead of pressing a button to change direction, you press it to lock yourself in one direction. However, I think you would then need to keep track on if you locked yourself or not, which could end up giving you more problems. Let's say you need to run away from an enemy and you had locked yourself so that you're facing the enemy. If you then forget to unlock or didn't keep track on that you locked yourself, you will end up walking backwards instead of running other direction which you meant to. Yes, you could forgot that you have to change direction the way it works currently, but you shouldn't forget since you should be used to it by then.
You're absolutely right about how she shoots the gun, I do regret that I didn't make it so that she holds the gun by the shoulder. I think I will go back and fix the animations, but if I don't like it as much then I will most likely leave it as it is.

I'd like to thank you for all the constructive feedback even things that I don't agree with, it means a lot more than just compliments.
Don't create a porn game if you're only interested in porn.
Wise words regarding criticism http://www.youtube.com/watch?v=-98ZFl1sKt4
User avatar
KaTsuO_O
 
Joined: Tue Nov 02, 2010 6:03 pm

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby OwnerOfSuccuby » Mon Mar 11, 2013 3:41 pm

I put codes - just like as an example how can double press for run works.

About changind charecter rotation and etc - try to look this one - it is the top game from best 20 Sega games.

http://www.youtube.com/watch?v=1XPOUxRmyv0

They make it so way. Alien have 2 modes:

In one mode - he runs and when he fire - he do not change his direction. In another he does. So if you press attack for example in one of this mode charecter will not turn. In another he do.

Veru good game algoritms is in Shinoby game on sega too - or Earth Worm Jim for example. Or Contra.

Try to look this platformers - may be you will get good ideas for the game.

On the PSP it is very good arcade game Prinny: Can I Really Be the Hero:

http://www.youtube.com/watch?v=qYXvHvkCoVc
http://www.youtube.com/watch?v=08xOOCYPA-I
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Platformer/Fighter (Could Use A Proper Engine)

Postby Red.Sheer » Mon Mar 11, 2013 6:02 pm

Wow, that looks neat :D

Sorry, this is possibly the most unhelpful comment ever, but I don't know what to say XD

I like the mechanic to press a button to turn, at least if you use a keyboard. In Super Metroid on SNES for example, you had to press a button to enable "moonwalking" - a great feature, but it wouldn't work with a keyboard so, yeah you found a good way of dealing with it :)
ImageImage

Staff member ---- Loyal follower of the Lolsheep
User avatar
Red.Sheer
 
Joined: Fri Jan 20, 2012 3:59 pm


Return to Creative Corner



Who is online

Users browsing this forum: No registered users