Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

KNOCK-OUT ARCADE (GDC 2024 EDITION)

A 2D retro-inspired fighting game with easy to pick up controls and stylish combos! · By Jazz Boy

Question regarding development.

A topic by Lumina created Jun 14, 2023 Views: 96 Replies: 1
Viewing posts 1 to 2
(1 edit)
Hello!

I am currently developing a 2D Arcade fighting game of my own along with some classmates and had a few questions regarding the development of your game, KNOCK-OUT ARCADE!

Specifically, I am interested in the coding aspect of the game. How your scripts function, how your State Machine is coded, and most notably I wondered if you could share some snippets of your code for me to learn from (preferably the State Machine!)

I am aware that your game is made in Game Maker whereas I am making mine in Unity C# but I'm sure I can still learn tons from reviewing your project. If you are not comfortable sharing such intricate parts of your project I fully understand and respect your decision, but sincerely hope we can find some other way you could teach me about your development process.

Sorry about contacting you on an itch.io public message board, but I couldn't find anywhere else to so this was my only option.

Thank you!

PS: I would appreciate if I could contact you elsewere, perhaps Discord, for further enquiries. Thanks!

Developer

Hey Lumina! So glad you wanted to reach out to me. I've gotten a lot of questions as to how the game itself is programmed, but I haven't had the time to make a detailed walkthrough of how everything works. We're still changing things around and adding new features, so the code base is a little messy at the moment.

Basically how the game works is that there's an ENUM (enumerated list, where every entry has a constant value) that contains every state the player could possibly be in. This includes things like being Idle, crouching, attacks, getting hit, getting up, intros, etc. On each frame, the game uses a switch statement to process the code that correlates to each state. This allows states to have their own logic that's separate from other states. Some states like Idle, Crouching, and Hitstop are processed outside of the state machine, since doing so inside the machine would cause 1 frame delays between player input and game action.

That's a bit of an oversimplification of how it works, but that's basically the gist. 

Here's an image of the code. the states themselves are collapsed to show how many there are, as some states can have quite a lot of code.

As for contact, here's my Discord if you wanna inquire further. jazz_boy (originally jazz_boi#6109) Hope this helps! Sorry it took a bit for me to respond.