[invitation closed] Forum fighters coding crew

Welcome to the coding team!
Here your team leaders @Hamzah_Alani and @BaronAWC and other qualified crew members will help do anything about coding the game fourms fighters

If you are interested in joining us please go the control topic more will be explained there

So. @Hamzah_Alani & @baron please take the stage

2 Likes

I think you need to be “tested” first, no idea how mlg is gonna handle this.

you asked on the control post, so i guess when mlg comes online he will test you.

For anyone who’s new to the coding crew, try to solve the puzzle of how to make an object catch up with the mouse, and at the same time, have its x and y be a multiple of its width or height. I really don’t care what width or height you use, but here’s how the movement looks:
Untitled_ Sep 28, 2020 8_59 AM
This is a “just for fun and testing ur abilities” type of thing. The first one to get the answer gets a fist pump! It should be super easy, but if you’re already in the team, and one of the pro coders in there, don’t spoil the answer until Sept 29th.

Yea, I chose this type of puzzle because it would be easy and a lot of people already know the answer. I used only 2 lines to solve it, so hopefully, you guys won’t have trouble with that.

After u think u solved it, share either the wick project or the code here

take ur time (I have 1179 files saved as “downloads” 0_0 )

(try labeling ur files and your future self will thank you)

good luck then, wait, can’t you just ctrl+f the name of the project?
(unless if you can’t name projects in scratch ._.)

Yep, u solved it right
(I divided by the num, rounded, then multiplied too)

Well, a deal is a deal

:fist_right: :fist_left:
:fist_right::fist_left:
:fist_right::boom::fist_left:
:fist_right: :boom: :fist_left:

1 Like

I have another puzzle that I know the answer too, but is kinda easy if your a good coder, and has many ways to do.

Code a based on hitTest action without using the word “hitTest”

This would be good practice if ur not so good at javascript. U could take ur time (incase ur busy with school or anything)

yea, then that puzzle is open for anyone interested to solve.
It just takes some bit of brain knowledge.

Hey, try coding a platform engine maybe?
That’s a type of project every coder on wick tried making. It doesn’t have to be perfect though, you’ll just need a make wall and a platfrom

maybe just give it a try? After you learn how to make a platform, you’ll learn a lot of new stuff

Also, for the hitTest thing, the way I would do it is see if the player x is less than the objects x plus it’s width divided by two, and then see if the player x is more than the objects x minus its width divided by two. Same for y. I hope this would help with solving it

My way is definitely not the best way, and never was.
I would recommend for u to try to find a way to fake gravity and make a platform.

I’m relatively sure my platformer engine uses absolutely no hitTest() functions.

If you have 2 rectangles, you use the x’s, y’s, widths, and heights to check if the centers are close enough that they would touch. It’s not hard actually.

Non-rectangle hitTests seem way harder. I haven’t tried them but you can probably imagine what circle-to-wonky-shape would be like.

Yea, I looked through your engine before. I tried to add a hitTest once and it didn’t work, that’s when I realized that the collision was perfect, but not touching. Which is why I describe it as “pixel perfect.”

My way is the more complex way because to code a normal block you need to code all sides of the platform and decide where it goes on the if/else elevator of madness.

To keep it more barebones than a bone just check if the player touches a platform. If it does, send the player to be on top of the platform. Otherwise, move the player down by x pixels for gravity.

Usually the way I do collisions for boxes is first I do the player’s X movement. Then it checks the other boxes and if it’s on the left or right side of a box, it pushes the player appropriately. Then it does the player’s Y movement like jumping and falling. Then it does the check from before except it’s if it’s on the top or bottom side of the box.