• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

How would YOU code this?

J

Jack

Guest
Hello! Normally Im always coming up with ideas about how I would code something whether I see it in someone else' game or if its just one of my own. But ive become stumped on how I would code this; Im making a small fighter game where I need a projectile attack I know how to make it go in one direction (hehe) but not in separate directions like (up, down, or in a corner,) just by pressing one button. The game is 2 players on 1 keyboard, so 2 people need to do this attack and the mouse is not a part of this game. So now I need to know, How would YOU code this?? I dont think I need to include my code so far, just how you would do this. I would be able to find a way to incorporate it :) thanks!
 

Attachments

I

InkSho

Guest
the problem with fighters on a keyboard is that there are hard limits on how many keys can be pressed at once and it varies by the keyboard, so a 2 person fighting game restricted to keyboard is almost impossible. one of my friends tried making a fighting game on gms and gave up after he found out.
 

lolslayer

Member
You can always connect 2 controllers to a laptop though, I've got a xbox 360 wireless controller reciever, this way I can use up to four controllers in one game :)
 

Nux

GameMaker Staff
GameMaker Dev.
you could make which direction you fire the projectile dependent on the way the player is moving
e.g.
only moving right / facing right => shoot right
jumping while moving forward => shoot up and right
crouching while jumping => shoot down
crouching while jumping while moving to the left => shoot diagonally left downwards
 
J

Jack

Guest
Lolslayer I own a ps4 and not the 360. but I may be able to connect them with bluetooth. Ill have to try it thanks for the idea!
 
Z

zircher

Guest
Use a fire/lock-on button. You spam the fire button and your shots go straight only. But, if you hold the fire button before releasing, the the lock-on cursor appears and starts moving towards the enemy. Partial lock-on (and thus curving/angled shots) is possible.
 
J

Jack

Guest
I really like that, Zircher. im already thinking of how i could do it :) thanks for the idea!
 
Top