This is so relatable 😂
Posts made by RobinsonX
RE: How To Make A Sports Game?
I don't know how football works... 🤷♂️😅
I just know that the project is going to use a lot of movement, collisions, tags, etc.
Here are some tips:
- Tags can be manipulated to control mulitple objects at once. So instead of many individual behaviors doing the same thing, you can have one object control all of the other objects.
- When touching an object with a specific tag, the behavior would output the object that was touched. This simplifies a lot of things, and all logic can be contained in on object.
- Try to limit how many timers you use at one point. Having multiple timers running at once can kill performance.
- Oh, another thing about tags. You can have two tags for two teams. There could be invisible barriers on both sides and you can have events when a tag collides with one side.
For example, when "red" team collides with the right barrier, they score.
RE: Add Friend system
All usernames should be inside an array, let's call this array Users.
When searching for a name, you can loop through the entire array and check for usernames containing what you typed.
For example, if you typed
dog, all usernames containing
dogshould pop up.
doggyare examples that follow this condition. Note that hyperPad that have a built-in feature to check if a text contains something, so you will need to make your own.
So searching for
dogshould check for usernames in Users for keyword
All results should be placed in an another array, let's call this Results. This is where all the desired usernames will be after a search.
After looping through Users, now you can loop through Results to get what you want to show. You can use
Get Array Countto show the number of results or make a list appear.
I know you have a lot of questions on what to do, but I don't know which ones you're going to ask. Feel free to ask me any questions! 😁
RE: Add Friend system
Wow, this is a difficult task...
If you are doing actual networking using HTTP requests or socket.io, you are going to need to learn a language called PHP and use a PHP server. I use 000filewebhost by Hostinger to create and manage my PHP server. This way, you can actually become friends with real players and interact with them. (You are probably not doing this, so I won't go into detail.)
If you are just making a simple project with pre-made or generated usernames, you just need to know how to manipulate arrays to get the desired result you want.