Can I make an MMO in 48 hours? - ¡Fruit!
HTML-код
- Опубликовано: 21 июл 2022
- I built ¡Fruit! an MMO in under 48 hours using Angular and Node.js. Angular was used to build a front end UI, while the game itself was rendered on an HTML5 canvas element. Node.js was used to write the server side game logic and networking. Both the Angular and Node apps are hosted with Heroku.
¡Fruit! is available to play at:
www.fruit.yokohama
Check out my other projects:
www.notin.tokyo
Resources:
www.npmjs.com/package/detect-...
Neural Network by Alex Burte, Lock by Katarina Ilić, Fortune Cookie by Sasha Sash from NounProject.com Наука
This video is so good! From the editing to the presentation to the game itself! It really is a shame how content creators such as yourself are so underappreciated.
This is awesome!!! You did a brilliant job on this! First, it's awesome to see another of your videos - but also the game is super fun too!
So - I may have found a tiny exploit to unlock all the fruit.. haha. In chrome, if you inspect the page and go to the application tab, in the key, you can add (for example) "fruit 8' with a value 'true'. If you do that for all the fruits, they unlock. I also may have given myself some extra cash too.. haha :)
In any case - it doesn't take away from the enjoyment of the game - It's a truly fun experience! well done.
I think the function you're looking for is Math.sign() which returns 1 or -1 based on the input.
I believe internally that function uses a conditional.
This channel is seriously underrated
Defly is my fav type of these games,, I really like how getting the juice has risk in your game.!
The game is really fun! I think the more active players the harder it would be to get more coins. I had a question though. Why can't you make a purchase if it takes your amount to 0? I thought at first that you had to buy the cheaper fruit before being able to buy the more expensive ones. But then I realized if I had 10 coins, then I couldn't buy the strawberry, but once I had 11, I could. Still really fun, was just wondering! (I also couldn't get it to really work on my phone. It wouldn't let me input my username.) Thank you for building this!
The problem is getting the fanbase to keep it alive
But Impressive building. I should do something like this if I learn to program.
Sadly it is not up anymore
you should make a second game for fun, i wonder if youve gotten better over the past couple years 🤔
Why does it run at 15 fps ???
Would you be willing to open source the server side of this? I am working on a game project of my own and the server-side element of this is almost virtually identical to what I'm trying to build. A lot of similar videos or tutorials seem to use a lot of extraneous packages or other features available in different websockets packages
Send me an email: inkboxsoftware@notin.tokyo
Fruit.yokohama
In C++ i would solve your -1 to 1 without "if" in the following manner:
int rand_plus_min()
{
static constexpr int half_max_rand = RAND_MAX / 2;
return (-2 * (rand() > half_max_rand)) + 1;
}
Hope it gives you an idea how to solve it for yourself.
The > you used is just shorthand for an if-statement.
Im a banana
angular sucks
Math.round(Math.random())*2-1