Forum Fighters: Rewritten (Discontinued)

Get ready for another long post…

About audio, things to do for those who want to help, and creating cutscenes in the future that run at the correct fps

I decided to try playing all the sounds once at volume zero in a default script and stop all sounds in the load script in the intro, I think it worked but not really sure.
FFR 1.5.1 - WIP6-24-2022_12-18-14.wick (2.7 MB)

I also used this file:

(Also, thanks @KringlePrinkles for working on that, I appreciate your efforts and attempts of making the ai work properly)

And …

I checked the file, someone had added a // before the line that plays the audio for that clip (on mouse enter).
When I remove the // the project returns an error, so I’m guessing the audio file might’ve been removed before I updated it at some point ? I don’t remember how it sounded, but I know we have a lot of audio assets for buttons, we could replace it with one of them.

I’ll look more at it later when I find the time.

btw, I might’ve forgotten to mention this, but I have a folder with all the audio files that were in the project before I removed them. They can also be found on repl (I’ll remove this link after a certain amount of time since anyone with it could delete, remove, and edit the files - if that happens I already have a copy of all audio files on my computer).


I'll just be adding some other things here for anyone in the team who's looking for a way to help

The keybinding doesn’t seem to work at all.
This should be easy to fix.


The library will be needing some editing


(By “editing” I don’t mean writing more in the books, but rather making some slight adjustments to perfect it more, for example, the top left half blue and half red button could be turned into a bookshelf)


According to the gif the fps starts at 12 and goes down to 9 when the game is played.
I experienced a similar issue when testing the game on a school device.
It’s a frustrating part of development when you know that not all devices will be capable of having the same experience, that’s why for story mode I want to consider using a video element (see this project here for a good idea of what I mean) for cutscenes. This way, we could make sure that animations will play at the correct fps. We’ll focus more on this later, I just wanted to mention it now to see what you guys (the team) think of it since the cutscenes won’t be available during an offline gameplay.

In my tests of the version from a few days ago, up gates don’t work because of this one test:

I have a feeling it’s supposed to be !target.canGoThroughUpGates

Actually, looking at the comment in the declaration of that variable, it seems that it should actually be this:

Basic 2D platformer AI doesn’t fall into a “basic” category to me… but that is just me :wink:

Well as long as it doesn’t do pathfinding. If all it does is jump over gaps and on top of blocks, it shouldn’t be too complex. It can find gaps by analyzing the platform array with its jump arc.

@mlgcoolguys_1
I’m not sure if this AI’s supposed to be smart enough to, for example, reach the target in situations like this:
image
Would the AI actually jump on the platform on the left, then the platform on the right to reach the target? Or would it just get stuck moving back and forth below the floating platform?

Here’s my progress for now
0FORUMFIGHTERS.wick (2.7 MB)

  • I rewrote the enemy behavior system. Each enemy has two functions: one for setup, and another one for update.
  • Entities have an array named “collisions” which store the data of platform collisions that occured since the last entity update. I used this to make the bot flip directions when it touches a wall.
  • Rewrite of the AI
  • Bug: The bot falls through the floor for some reason.

Several questions (to help visualizing the big picture):

  • Is this game a 1 vs 1 campaign mode?
  • Are you programming one generic AI for all the enemies?
  • Have all the levels/stages the same number of platforms in the same layout?
  • Will enemy #1 be always under Stage/Level #1 ? or enemy #1 can be found in different Stages?

Update:

How do I activate the begin?

it works fine for me…

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.
4 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)