Fighting Game Info



  • Hi. I was wondering if anyone with experience could help me out. I want to make a fighting game like Super Smash Bros. Melee and I have some questions that would probably help to have the answers to before starting. I've tried it in other engines and I've been thwarted by various things, and HaxeFlixel seems like a good fit so far. I'm still a relatively new programmer, so a lot of advanced concepts escape me, which seem to be important to make a game like this.

    So here are my questions so far based on problems I've had:

    • What is the best practice in HaxeFlixel for working with timing? Games like this demand precision, so it is a very important factor. I assume I should be using a fixed timestep. So do I just set it to 60fps and forget about it? Is there any way to allow the graphics to be rendered at a faster frame rate and still keep the game physics exactly the same?

    • What is a safe resolution to make the game at? It would be designed to be primarily played on a desktop, but I would like to have support for other things. How does one go about doing that?

    • I would eventually want to make the game playable online, possibly with a replay system. What considerations should I be making while developing regarding that?

    • Can you give me any advice on constructing an input manager that can handle input from various sources?

    • What would be a good way to implement a finite state machine for the characters that can handle extreme complexity in a readable format?

    • What would be a good way to implement a character system where characters have key stats about how they move and feel? This would handle changing characters and injecting them into the levels.

    • What is a good way to handle hitboxes, hurtboxes, and collisions in a precise way? How can these hitboxes and hurtboxes be animated to follow the animation of the character during attacks and movement? I plan on using Spine models for everything, so how would affect things?

    • I want the game to have a pixel-art look, but with Spine animation. I'm not sure how it would turn out, but it's just my idea so far. I want the game to look like the pixels are 2x as big, but still be at normal resoultion so movement and rotation is clean looking. Should I be making graphics at normal size and scaling them up 2x in the game? Or should I be making the graphics 2x as big before they are imported as assets?

    I realize I'm asking a lot, I just have a lot of questions. I would spam the whole board if I asked them all in different threads. If anyone has any answers to even just one question, I would be grateful. Thanks!



  • Hi @Alkamist

    I cannot answer to all of your questions, but will try to answer most of them.

    @Alkamist said in Fighting Game Info:

    • What is the best practice in HaxeFlixel for working with timing? Games like this demand precision, so it is a very important factor. I assume I should be using a fixed timestep. So do I just set it to 60fps and forget about it? Is there any way to allow the graphics to be rendered at a faster frame rate and still keep the game physics exactly the same?

    You can have different framerates for update/draw, but I am not sure, what this does exactly. I Assume that drawing at a higher framerate just draws the same (old) frame twice, because no positions have been updated. Note, that I have not tested this.
    Probably you will have to write your own render loop.

    • What is a safe resolution to make the game at? It would be designed to be primarily played on a desktop, but I would like to have support for other things. How does one go about doing that?

    Haxeflixel does automatic scaling. For desktop I personally would go for a resolution of 1024x768 to support also some small screen laptops.

    • Can you give me any advice on constructing an input manager that can handle input from various sources?

    Yes. Write your own wrapper. I constantly do this for Games that can be played with gamepad/keyboard alike.

    • What would be a good way to implement a character system where characters have key stats about how they move and feel? This would handle changing characters and injecting them into the levels.
      As the functionality of the characters is different, I would take a step back from a data driven approach and use Haxe's inheritance feature. You have a basic (other languages would call this abstract) character and all other chars derive from this, overwriting variables and methods. You can also go for some high level design patterns like dependency injection or the strategy pattern (google is your friend) but that heavily depends on your design and your goals.

    So Far...

    Laguna



  • Thanks for the answers!

    I'm not sure how it all works, but I'm guessing it would involve interpolation of some sort. Imagine an object moving; the physics engine steps, updating the object's position, then the render engine renders the object halfway in between the new position, and then all the way, before the physics engine updates again. I guess that might not be good because the render engine would be behind the physics engine. It would also probably be very complicated with different ratios of render/physics frame rate. Also, I'm not sure how Spine works exactly, but if I used Spine models, wouldn't it be possible to interpolate the animations to render at a higher framerate than the physics engine? It's probably more trouble than it's worth, but it doesn't hurt to know.

    I understand if you don't want to take the time, but I would definitely benefit from an example of one of your wrappers that you do. I'm still a novice programmer so I don't have a solid grasp on that kind of thing.

    And I'll look into the things you mentioned. Inheritance is probably a good option, I'm not used to dealing with it so I tend to shy away from it. I guess it's time I learn.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.