Forum Fighters: Rewritten (Discontinued)

Ok, the second time, I was able to play… not sure how I have activated that bug… I will try to reproduce it…

All things aside, I can see al the effort. The game looks beautiful.

I have an optimization idea.

So a huge source of lag is the engine getting the activeNamedChildren of the closest ancestor clip whenever a script runs (This is so scripts can get references to other clips). The game loop is located in the frame in the functions layer, meaning the closest ancestor clip is the Project clip. (Which has a lot of children). So if we put everything game loop-related in a clip instead of in a frame which is a direct child of the Project, we should experience a performance boost (in theory). We’ll also probably need to fix the clip references after this has been done.

Screenshot of profiler because why not it's cool


As you can see, after running all the scheduled scripts, the engine takes 11.6 ms in total in the activeNamedChildren function. This is also in my optimization mod, where I tried optimizing it to use that function less. I say I tried because looking at the profiler data, it appears that it doesn’t work as I intended.

(Our target is at most 33 ms per frame, which would achieve 30 FPS)

tl;dr put main game script in a clip, which is inside another clip.

1 Like

Another thing is, you can make a png of the entire stage… and only separate the animated things like the tree in other pngs. So you will end having only few pngs, and some hidden colliders.

2 Likes

Wow, how do you do that? Do you do that within Chrome, or do you have another software for that?

In the dev tool’s performance tab

2 Likes

Well the answer would be both.

A more simple enemy (such as the one you are coding now) would just move back and forth helplessly

But more advanced enemies WiLL be more then happy to jump around if it means it can attack you

1 Like

Okay. So the more advanced enemies pathfind.

Wait why are we working on enemy ais? shouldn’t we be working the fighters like the attacks and stuff?

Also, I’d like to be working on networking, since I think that’s kinda important, but I’m not sure how the game’s garbage performance would affect the way I’d like the netcode to be designed – In vanilla Wick Editor anyway. In my mod it can run at around 25 FPS. (I’d like to share a link to it for development but I guess it’s probably against the ruIes. Maybe I’ll make a pull request sometime.)

works fine for me

well we have 2 major goals;

  1. create a wide, fun and immersive world of single player through level design, world building, enemy design, stroyline, character development, and much more

  2. create a balanced and competitive PvP mode with perfected controls and attacks, for multiple players to play to together and have a reason to improve beyond the skill level that the OG game requires

i believe both are important BUT, the single player mode has a higher chance of being able to stand up on its own. further more, completing the single player mode includes attacks and controls and all the little bits that are needed in PvP anyway

as of networking, that FPS problem might be the first hurdle. last i played the game (H.a’s music filing update) game ran at a nice and beautiful 5-4 fps according to the counter.
and my computer isnt THAT bad, so we need to find the real source of the problem here first.

and who says enemy ai wont be used in PvP ;)

That gives me an idea

What if there was a practice mode, where you can choose an enemy ai, and fight against it

Good idea. Maybe the player can choose if they want to fight another forum member, or if they can fight a boss. It’s like a sandbox.

I’m thinking more along the lines of using hitboxes or something similar to detect things. I haven’t thought that far ahead, but it’s more of something like this:

image
Maybe I could change some things if I were to try to implement it on something else. Maybe it wouldn’t be hitboxes. maybe I’ll attempt to use ray-casts instead to check if it’s sees any players (2D ray-casts! not 3D! >:( ).


Me writing as I go...

…so apparently the hitbox got messed up when you change the scaleX of a character.

funny thing

changed that so that both widthDist and heightDist takes the absolute of the clip’s widths and heights instead. Now negative numbers on the width and height of a clip will not cause consequences to its hitbox!

MWAHAHAHAHAHAHAHAH!


That still means we have to work on the fighters though. I guess I’ll finish working on the enemy later. Only thing lacking is that Peon should see the player, then charge.


It didn’t work. I also tried to do the same by also playing all the sounds without volume. It was the closest to what we were trying to achieve, but the sound plays a short blip of almost every sound in one almost instantaneous second until each sound cuts off.


Oh . Right. About your song… I think it sounds okay if I don’t think too hard about it:

  • The choice of instruments were good enough for generic electronic music.
  • I could probably hear it in a specific boss fight or area.
  • From 0:23 to 0:33, This section would be nice to use as a bridge before the drop.

There are also some things that aren’t helping this song:

  • You didn’t seem like you have a goal for this song you made, or at least that was based on your post. But then again, that would end up being about the post itself…
  • The entire song is just repeating 4 bars of the same pattern until it plays another 4 bars of a different pattern. I guess it has some variation, but it does get repetitive the more times I listen to it.
  • The short length being coupled with the previous bullet just makes the song entirely minimal… I might even say that you didn’t take that long to make this…

Thus, I would compare this song to a sketch. It was interesting, maybe just okay at worse, but you should do a bit more with the little time you spent on it.

If that IS your best, however, then play with the settings of your sounds more, do experiments, maybe look up things to know how your DAW works.

The experience with the tool you use is one of the factors to making music.


Current nightly version. You can click to download it.
3 Likes

I understand the concept. :thinking:

Give attributes to those hitboxes, like “mustJump” vs “optionallyJump” and put random decision-making on the optionallyJump ones, so it could look/behave more natural.

Random decision-making for “optionallyJump” (example)

  • Jump
  • Stop for a few seconds
  • Fall (there should be a safe platform below)

i made some tiny changes to the start screen and credits
FFR 1.5.1 - WIP 16-25-2022_19-39-44.wick (2.6 MB)
Based on kringle’s latest file

I had another idea in mind for wall detection that doesn’t include hitboxes. As I wrote this I just realized it’s probably better if the AI jumped before hitting a wall, rather then on collision. As a result I discarded this idea. In retrospect I should be deleting this paragraph.

But I have a more fleshed out idea for jumping across gaps. On every frame, the bot takes the right/left edge of the floor it’s currently on from the object.collisions array. If it’s moving right, it takes the right side of the platform, and if it’s moving left, it takes the left side of the platform. Using its X position, it can determine whether or not the bot is on the edge.
image
If it’s on the edge, it will “raycast” each platform with its jump arc, and then jump towards the closest intersection. If there are no valid intersections, it will instead turn around. If it determines it can’t return to the original platform after jumping onto it, it will instead turn around.

The “raycast” procedure with the jump arc would be done by getting where the jump arc intersects with y=(top of the platform). This gives 1-2 X positions. We take the result with a negative or zero slope (the bot can’t land on platforms while travelling upwards) and then do a bounds check with the left and right side of the platform. If the bounds check succeeds, then that means it is a valid intersection. The procedure wouldn’t actually have to get the differential, we could instead just determine which one goes downwards by looking at the direction of the player. The intersections with y=(top of the platform) could also be determined with the quadratic formula. (Good thing I paid attention in math class)

(Maybe this algorithm could also be used for wall detection.)

The Wick Editor engine does tick absolutely everything per frame for scripts to run. So the more stuff we have, the laggier the game will run, even if they aren’t in frames that are on screen.

omg!!!! i properly added the `activeNamedChildren` cache in my optimization mod and look what happened:


you see that on the top left?
30 fps
do wick editor devs accept pull requests?
i guess a small bug would happen if a named clip got removed (or added, but it’s very unlikely that people will assign names to clones). but i guess i can fix this by invalidating the cache for a clip’s parentClip whenever something gets removed.

the max fps it can achieve on my computer is like 35 fps

Also, we should decrease or eliminate warm-up time for attacks, especially low-damage ones such as Baron’s knife

4 Likes
I think I know how you got that bug...

You clicked the “back” button after completing a game.
It took you back to the menu, then you tried playing again- and the characters were already selected, but the button was disabled. It’s usually enabled when characters are chosen. So unselecting the characters and reselecting them will re-enable it.

It’s an issue with resetting the selection. But I think its been somehow fixed in the latest file version.


Speaking of bugs- I’ve found another one with the projectiles and “hitting effects.”

Here, Jumbleton creates a projectile to finish the game and kill Baron (sorry Baron)

The projectile froze on this scene, which prevented it from getting “removed.”

Same for the “hitting effects” (the triangles next to Baron). They’ve frozen in motion :0

Now… let’s click rematch - and there it still is in the same position.

I fixed this bug by adding a simple line in the default script when this.isClone is true for these clips:

this.addScript('default','this.remove()'); 

FFR 1.5.1 - WIP 16-26-2022_19-36-32.wick (2.6 MB)

3 Likes

Character Select Change for Forum Fighters 1.5.1

  • A change to the character select screen, as per Baron’s suggestion. You can now use tokens to pick characters. This took me a while, which was frustrating, but I am happy to say that it works. I just REALLY hope there are not any bugs.
    the fighter select screen now using tokens instead of the movement keys

on the other hand.

  • I didn’t add much to peon other than a ray for players and walls to collide with. Or it was supposed to, but I ended up working on the character select screen for most of the day.
    Peon now has a buggy collideable ray casted line

Is it worth it? Not really and I don’t think so. It’s a nice to have but the task wasn’t progressed.

Taking a shot at changing the character select screen helped somewhat. I think. I feel a little more knowledgeable now.

Plus that change recommendation is now out of the way, so you guys (and co-leaders) tell me if you think the time I spent on it is worth it.

FFR 1.5.1 - WIP 16-27-2022_23-31-24.wick (2.7 MB)

4 Likes

I wanna start helping more so I’m gonna ask peon was made to just be a simple bot right? if so I want to help with the ai for peon as i feel ive been useless.

Hey when i opened the file and tried to go to a map this pooped up

it seems to happen with all maps and i changed the bot to be player and it still happend.