#Need Advice From Experienced Combat Scripter

1 messages · Page 1 of 1 (latest)

sage jacinth
#

Hi everyone,

I’m working on a combat system and I’m trying to understand the core layers that make it feel solid, dynamic, and responsive. I’d like some guidance from people who have experience with action-heavy combat systems.

Specifically, I want to figure out how to implement action canceling. For example, if a player is blocking and takes a critical hit that breaks the block, the block action should be immediately canceled. I want all interactions to feel smooth and reactive.

My goal is to create a combat system similar in feel to Ghoul Re, with fast and engaging mechanics. Video Example: Press

I’m also thinking whether to structure the system using priority-based states in a state machine or to rely on allowed transitions, and I’d love advice on which approach is better for handling these kinds of interactions efficiently.

Any tips, examples, or best practices would be greatly appreciated!

#

I've already created a combat system, but it's not exactly what I want, that's why I'm asking

vale coral
#

like block and than that it stops the block

#

after that u can always polish it

night wyvern
#

you, and thousands, tens of thousands of other kids who took one look at tsb and thought "I could do that!" ... 😮‍💨

sage jacinth
#

But I still think my current scripts aren’t perfect, and I’m sure there’s always a better way to implement some mechanics than the way I did

#

I have been playing these types of games a lot, like Deepwoken, Ghoul Re, Type Soul, and I was even high rank in one of the best clans, but I found Ghoul Re’s combat system way more fun than the others

night wyvern
#

playing games does not directly translate to ability to develop games

night wyvern
sage jacinth
night wyvern
sage jacinth
night wyvern
#

i mean, in fair you have this

I want to figure out how to implement action canceling. For example, if a player is blocking and takes a critical hit that breaks the block, the block action should be immediately canceled.
but this is just an if statement lol

#

(inside on_crit()) - if isblocking(plr) then cancel_block(plr) end ?

sage jacinth
#

It doesn’t mean I want to make exact clone of their combat

night wyvern
#

I’m also thinking whether to structure the system using priority-based states in a state machine or to rely on allowed transitions
again this is like asking how to write an if statement. you realize a state machine isn't a fancy construct. it's literally just an if statement. a debounce is a state machine for example, just a very small one.

#

you've surely written debounces before? yeah? then you know everything you need about state machines.

sage jacinth
night wyvern
#

I’d love advice on which approach is better for handling these kinds of interactions efficiently.
maybe stop restarting from scratch and finish what you have

#

or maybe you want to keep restarting over and over and never finishing it, idk 🤷 people want different things

sage jacinth
#

But you should understand, I’m sure that state machine isn’t the only thing they use to make great combat. I’m certain they’re using a lot more techniques and systems as well

night wyvern
#

nope

#

there's no advanced techniques, no tricky tricks, no hooplah no cranberry sauce. it's just what happens when you put productive code to work, and maintain it over time.

#

the only exception to this is rollback netcode and frankly tsb doesn't have it, i doubt these other games have it either

#

they just assume you have low ping and the rest is done as some combination of on the server and on the client where network ownership permits

#

or maybe even all of it is done on the client and the server has no authority making it really easy for exploiters to cheat

#

hit(everyone,999999dmg)

night wyvern
#

which is like the most naive approach you can take

night wyvern
#

just low-ping interactions. nothing else

#

you can tell this because there is:

  1. no knockback at all.
  2. very little to no physics interactions at all whatsoever
  3. i don't think i saw a single stun that was not either telegraphed with a lot of time for clients to predict, or just outright not connected to the player at all.
  4. when players do touch your spike and get stunned, there is a delay after they lose stun before their character starts moving again and they just hang in the air for a bit.
#

so i wouldn't call this smooth at all

#

i'd call it primitive more than anything.

#

it's just animations and vfx, nothing else.

#

yep there it is, finally found proof

sage jacinth
night wyvern
night wyvern
#

or the other player just stands in front for a moment after being hit before actually being knocked back. probably both ngl

#

that's why there's little knockback, because if there was a lot of it this would be extremely noticeable - more than it already is

sage jacinth
pliant mossBOT
#

studio** You are now Level 13! **studio

night wyvern
#

holding you in place lets other clients predict exactly when and where they would get knocked back, allows for smoother experience instead of walking past a hitbox then being teleported into the knockback, or being knocked back in place.

#

this plays into the network ownership model that roblox uses

#

no knockback verification happens on the server, the client decides for itself because all control is, rightfully, delegated to the client.

#

i'm sure cheating is rampant in this game

night wyvern
#

performance is not going to be a problem for code like this

#

nor does efficiency actually matter

#

heck, particle emitters and debris instances are probably going to take up more cpu, memory, and bandwidth than anything your actual combat code does.

#

like just to reiterate, the 'efficiency and optimization' question starts and stops with simply asking: "does your game stay above 60fps under the highest load situations?" if the answer is yes, any more optimization you do is premature.

sage jacinth
# night wyvern i'm sure cheating is rampant in this game

I’ve only seen one that could deal a thousand hits per second with certain weapon to instantly kill a player (which was fixed really quickly). Other than that, I haven’t seen anything besides the fact that they can fly, and I’ve only seen a couple of people like that the entire time

night wyvern
#

there's much more subtle ways to cheat than just teleporting behind players and throwing 1000 hits at once

#

like... if you detect you're in a hitbox, automatically roll out of it.

#

or... a bot detects extremely high probability of a special attack landing that deals a lot of damage; automatically use the attack.

sage jacinth
night wyvern
#

i just gave you 2 examples that you probably encounter regularly but have no idea because it's indistinguishable from what a human player can theoretically do.

#

like just as an example, in fps games there are trigger bots that don't automatically aim for you, but they do automatically press the shoot button whenever your cursor is over an enemy.

#

that makes the cheat look more believable, and thus, more likely to get away with it

#

cheats like this would be absolutely rampant in a game like this

#

specially if there's an established route for moderating cheating players who make it painfully obvious they're cheating.

#

if someone has spent hundreds of hours in this game with cheats, do you really think they're going to risk losing all that by being an obvious cheater and getting reported to the devs? of course not.

#

so they stick to more subtle cheats

#

it's not an outright instant win, but it's an edge that other players will not have.

#

like automatically pressing shoot whenever you're aiming at a player - i mean if you never actually aim at anyone, cheating or not you still won't win.

#

but it does tip the odds in the cheater's favor

#

another example in fps games is wallhacks - again, it's not always strictly obvious, you do have some hints that the player has more information than they should but it's very hard to prove a wallhack. this game is guaranteed to have an equivalent roster of subtle cheats exactly like this.

#

AI query: common hacks in roblox ghoul://re
Overview of Exploits
The general term "hacks" or "exploits" in the context of Ghoul://Re refers to third-party software that injects scripts into the game environment, modifying gameplay mechanics beyond their intended use.
The primary types of exploits mentioned in search results include:
Auto-Farming: This allows a player's character to automatically kill bosses or NPCs repeatedly without manual input, often overnight, to quickly accumulate in-game currency (yen), RC cells, experience points, and rare item drops like fragments and blueprints.
Auto-Grip/Devour: This involves scripts that automatically "grip" or "devour" other players or NPCs (if the player is a ghoul) to quickly gain RC cells, which are necessary for regeneration and powerful kagune abilities.
Automated Progression: General use of scripts to bypass normal gameplay loops, allowing users to rapidly level up or acquire high-tier items (like certain Kakuja or Arata items) that would normally require significant time and effort.

#

and this is just the top ones that the ai is aware of

#

and hey would you look at that

#

"auto-grip/devour"...
me 5 minutes ago:

like... if you detect you're in a hitbox, automatically roll out of it.
or... a bot detects extremely high probability of a special attack landing that deals a lot of damage; automatically use the attack.

#

auto-use-skill

#

enemy lock-on mod

#

auto charge-attack

#

auto uppercut

#

this one is interesting

#

Instant-Kill Threshold

#

ESP (wallhacks)

#

and that's just at a quick glance of the cheater's menu

sage jacinth
night wyvern
#

ya i wouldnt think the esp is very useful here

#

but this doesn't change my point

#

there may not be obvious cheats because the devs take action on moderating their game

#

but there sure as hell are subtle cheats

night wyvern
night wyvern
sage jacinth
# night wyvern there may not be obvious cheats because the devs take action on moderating their...

And yeah, the game is being moderated, and they even hired exploiters to help create a good anti-cheat when they closed the game. They were paying a really good amount of money for it.

You don’t lose much after dying to an exploiter, so you can just join a new server. As for permanent death (where your progression resets), you can always restore it using robux or by opening a ticket with proof on their Discord server. (WAIT, PROOF FOR REAL? You can just press F12 to record that you were actually gripped by a hacker)

#

Roblox is literally filled with exploiters, so you can't really avoid them entirely

night wyvern
#

haha yeah, now you're starting to get it

#

this aint just about an m1

#

it's everything else around it

#

like this is just purely the combat and how the game is full of cheaters

#

this isn't everything else you can do in that game.

sage jacinth
night wyvern
#

you don't even have a basic combat down apparently, yet you want to be like them.

#

here's a tip, get your basic combat down, and then worry about fine-tuning it to feel how you want.

#

after you got a bunch of other content to work with it

#

like npcs

sage jacinth
#

Creating basic combat isn't hard

night wyvern
#

ye its just tuning

#

every system has to be tuned

#

how far does the dash go; how big is the hitbox; how much damage; how long is the stun; etc etc etc

sage jacinth
night wyvern
#

it's not perfect because you didn't tune it to perfection.

#

it's not because it isn't perfectly efficient. it's because you didn't simply finish it.

#

and then you had nothing to tune it against.

#

like i can pretty much guarantee you every single combat game started out like yours until they added more content to the game over time and had plenty of time, and tonnes of feedback from real players, to tune the feel of it with.

#

you have none of that.

#

you spent a day, didn't like the output, and now you're asking what you're doing wrong.

sage jacinth
# night wyvern it's not perfect because you didn't tune it to perfection.

Alright, I hear you. My post might have been stupid, but "welp, this isn't perfect. DELETE IT ALL AND START AGAIN" - I rewrote it from scratch because the code was becoming messy. I always tried to start over by looking at my last script and modifying it to make it clearer and more expandable, but I still think there's a better way than I'm using now

night wyvern
#

you are doing all the right things, you just aren't sticking to it salute

night wyvern
#

it became a little messy so you gave up. the messy part is extremely normal

#

the giving up is on you

#

no code that does actual functional work is going to be clean

#

and perfect

#

it never will be

#

time to accept reality salute

#

i actually have a video that i think would be perfect for you right now

sage jacinth
#

Anyway, I appreciate our dialogue and I got you, and I’ll take everything you said into account (at least I'll try). But as for the Ghoul Re combat system, I’ll still stick to my opinion. It might feel bad to you, but for me, as a user who’s played it a lot, it’s fun

umbral rain
#

i never made combat system before

#

not fking interested

#

so normalize me even if im s2 :>

night wyvern
umbral rain
#

Very wise

night wyvern
#

i'm suggesting it's okay to sacrifice performance and adaptability for velocity to get your mechanics and features working the way you want. and often once you got the mechanical body of your code in place, it is exceptionally easy to wrap it in a new pattern with all the same behavior and feeling, just different ways of passing data around

umbral rain
#

:>

#

and no need for optimization

#

(jk)

umbral rain
#

is it blink

#

is it

#

is it..?

night wyvern
#

or attributes

umbral rain
#

be more

#

specific

#

theres no way u use raw remote events and dont wrap them

#

right?

#

right..?

night wyvern
sage jacinth
night wyvern
#

the trick is to pick something that isn't too technically demanding for its core gameplay loop

#

like even just something as simple as making the game pve instead of pvp would immediately 'throw out' a whole bunch of issues you're having and gives you an immediate path to make a game loop out of what you already have

#

you can then add pvp in later when players ask for it

sage jacinth
night wyvern
#

(not if, when)

night wyvern
#

if you ask it to do 3 things at once it just breaks down and cannot handle it or maintain a coherent thought pattern past 2 things

#

and all those scripts get rejected because they don't do enough

#

i mean grow a garden is a great example

#

that game is incredibly simple, anyone could make it

night wyvern
#

the trick is no one does because you have to stay on task over weeks, months

#

on one project

#

that takes dedication. not experience.

sage jacinth
night wyvern
#

because there will always be times, in any game, where you need to deal with the technical debt.

sage jacinth
night wyvern
#

it's just a deterministic loop

#

instead of calling plant:grow() once every minute or so, it calls like 1000 of them at once.

umbral rain
night wyvern
#

more likely it's a deterministic algorithm so you can call plant:grow(duration) instead but it's the same as calling each grow step 1000 times at once.

umbral rain
#

theres a tutorial for making gag

night wyvern
umbral rain
#

i guess s1 is enough for making game

night wyvern
#

it's more than likely every plant has a custom grow method

#

and there are variations within them

umbral rain
night wyvern
#

so if you then add something like ... pets that can eat straight off the plant ... yeah, that's going to cause some problems.

sage jacinth
umbral rain
#
#

LMAO

sage jacinth
night wyvern
#

that's the other thing too - polishing and releasing a game, then maintaining it over time is far more valuable experience than making any one particular feature

#

it's harder to get to, but it is also better to get there as early as you possibly can

umbral rain
#

i think u've told me the answer

#

it's a no

night wyvern
#

and it changes because those players, who like the game, will give you feedback and suggestions

night wyvern
#

experience working with real time feedback and suggestions is way more valuable than ability to make any one individual game feature or content

#

because it tells you what is or isn't working, what does or doesn't feel right

#

what parts are fun and what is boring. what you could add.

#

like that's probably why im a senior ranker, i have tonnes of experience with live dev cycles

#

.... outside of roblox tho

#

inside roblox i've released 2 bad games, neither have ccu but they were just stepping stones to make my next one

night wyvern
umbral rain
#

maybe u'd get s4 soon

night wyvern
umbral rain
#

and it'd take me years to get on your level

#

im envy you.

#

fk man

night wyvern
#

because that's all it is.

#

hard work, and maybe a little bit of luck, but mostly just hard work and effort.

#

i didn't get to this level by watching youtube and playing grow a garden all day. i've been making stuff for years

night wyvern
#

i did before but i've got enough now

night wyvern
#

yep learned that from experience, and i happen to be lucky enough to not need it

umbral rain
#

ngl im jst doing revenue and coms game bcs i seek experience

#

pretty much got s2 bcs i do comms

night wyvern
#

finishing and packaging products is releasing a game - lite version

night wyvern
umbral rain
#

atleast they got me s2

#

and tons of experience

#

it's worth

#

i guess

night wyvern
umbral rain
#

lmao

#

lucky i made those 3 games

#

would hv stucked s1

#

if i didnt

night wyvern
#

like, i feel like i should impress upon you that i'm not joking when i say make bad games, just so you have something that you actually finished. it makes such a big difference actually finishing a full game, even if it is bad, compared to not even half-finishing one feature, or spending months restarting it because 'what if my game needs to do X' and then your game never actually does X.

#

this is one single gigafunction in the second game i released about 8 months ago, so this is my most recent released work, it's 150 lines for one function and it is some of the worst code i have written in quite a while. Why? Because i couldn't be remotely bothered to do it properly. Does it actually matter to the game? well, it works, and that's all the game needs from it.

#

and for reference the file this is in is a bit over 1000 lines long

umbral rain
#

i wish i could lead the game.

#

he doesnt see the vision like I do, maybe that what makes me always excited

#

when making game

#

i see the potential

#

thats why i accept revenue

night wyvern
#

just briefly skimming through the code i'd say there is in total about 3k-ish lines

#

maybe 4k being suuper generous

umbral rain
#

and god they're using free models

night wyvern
umbral rain
#

xd.

night wyvern
#

i curate all scripts

sage jacinth
night wyvern
# night wyvern

now you might be wondering... why would i accept such low quality code as this? well, for 2 very simple reasons:

  1. I wanted this game out ASAP. in total all of this took me a month of real-time including sleep, working like 8 hours a day, 7 days a week.
  2. I had so much other work to do, not just the code. like building levels, picking out npcs and other assets and models, the ui, picking out sounds, setting up and configuring gamepasses and their icons, and configuring and balancing levels in the game, getting art and marketing material together etc.

So naturally with so much other work to do, something had to give and the easiest thing that i could give was resorting to code like this.

night wyvern
# night wyvern

and the thing is, even with code this bad, it would be very easy to refactor this without changing the fundamental behavior or timing of anything

#

thing is i just don't really care to; it works good enough and isn't causing problems

night wyvern
#

+beginner level sql+css y'know all the fun webdev stuff

#

i made most of my own forum website out of php

#

you could login, post messages etc

#

wasn't the only website i made.

#

but it was the most 'complete' one i made

#

everything after is just tinkering with stuff like wordpress

sage jacinth
night wyvern
#

i even made a php/javascript combo chatbox 🙂

sage jacinth
#

Is luau knowledge can be helpful in learning java?

night wyvern
#

i've made all sorts of stuff since then but ya, i'm not kidding when i say just make something and finish it

night wyvern
#

e.g the concepts you learn in luau can apply to java, python, c++, c#, javascript, vbscript, php, etc, even assembly. it's turtles all the way down.

#

i don't think it's worth going out of your way to learn these other languages just for the sake of making things in roblox studio tho

#

it'd be better to stick to luau.

#

but hey i mean if you ever wanted to make a website you gotta start somewhere salute

sage jacinth
night wyvern
pine meteor
#

i think we've lost the plot

#

@sage jacinth vfx plays a major role in combat

#

without it no matter how great your code is it will feel slow and sloppy

#

animation especially

night wyvern
umbral rain
#

u obviously will use your data storing for that game for sure

sage jacinth
visual creek
#

if kick and target block then dont damage

#

easy

bleak cairn
raw lodge