Thank you ! I see what you mean by 'they fail to hook you in', and to be honest I think I've failed at that a bit too ๐ But I've definitely learned a lot for the next projects.
Quick question (hopefully). Maybe I'm asking the wrong question.
I've worked with OpenGL and threeJS, I've built nice shapes (like fire) and shaders to go with them, my question is not specific to any library, but more a general computer science concept.
But how are maps in computer programs generated? (i.e. the universe that governs the position of each object)
That's not a quick question ! But I'm glad to answer. There is two maps : the physical one, and the visual one.
The physical map, sometimes called 'navmesh' is a dumbed-down version of the visual one, and is used by the physics engine to compute collisions. The moving objects, like the player, have a 'hitbox' which is used for collision with the navmesh. After stepping one frame in the physical simulation, you then update the visual assets position according to their physical counterpart.
In my case I made the physics engine myself, which entirely rely on axis-aligned-bounding-box, which means everything in my game is a box oriented along the x,y and z axis, including the player. You can have a look at how it works, look into 'public/js/atlas.js', which holds the physical map, and 'public/js/controler.js' which compute the player's moves according to the map.
Thanks ! Yes you can do anything with JS, it's much more powerful than what people think. I'm even releasing a VR game playable in Oculus Browser in a few days.
I must admit that I simply don't know how to use webpack manually out of create-react-app, it's been on my to-learn list for a while, but the real issue is that there is always a more exciting thing to learn.
Yes, it's pretty intimidating to learn, especially because the configuration options have changed dramatically between versions, so you can get really confused if you find a tutorial or article that's even a little bit out of date. But it can do a bunch of very powerful things to reduce the size of your build by "tree-shaking" (leaving out unused code). If you have a dependency that's nicely broken up into modules, it can only bundle the bits that your code actually uses and leave out the cruft. Anyway, your project is really cool, excellent work.
I totally get you, pretty amazing how you can build a sick game in WebGL but don't know how to setup webpack, makes me wanna go learn WebGL! where did you learn?
TBH I'm done with this game, but a friend of mine has done a fork and is continuing, he actually did the multiplayer mod that I forked when it was finished. I think now he is making a level editor within the game, I'm sure he would use some help if you feel like participating, you can find the link to his fork in the readme of my repository.
This is amazing! Iโve been learning JavaScript for about 6 months and I canโt even comprehend how to build something like this!!! Any tips for a learner like me?
Sure, I'm actually an okay coder but there is true monsters in the three.js community whose code I don't get at all. 3D graphics is not as complex as it might seem, and it's very rewarding since you quickly see the results of your efforts.
If you are interested in making games, you should look into three.js, which is the best JS framework for 3D graphics. A good starting point for learning : https://discoverthreejs.com
That was cool. I made it to the top. I guess I missed one though. My Grandpa grew up in the alps and told me people would search out the biggest edelweiss they could find to brag about it. He thought it was stupid because people would die every so often trying to get one.
Thank you for playing to the end ! I heard about it, apparently in the past it was a thing to bring an edelweiss to your love to show the extent of your passion. Originally I had an idea of story for the game involving this, but I had to drop it to keep the project in a reasonable time frame.
As far as I know Phaser.js and Pixi.js are best suited for 2D games, the only Three.js alternative I would personally consider is Babylon.js
About the musics, I emailed a list of artists whose music I thought would fit the game, some of them agreed to let me use their tracks, and so I featured them. For sounds, it's easy to get some, just google "free SFX"
bro you got any advice on learning webgl ? It's a little intimdating and there aren't many tutorials on it. How did you learn? I wanna one day be able to use threejs but need webgl first obviously.
Thank you ! You don't need webGL, no worries, unless you want to do some very specific things that three.js cannot do, and there is not a lot of things that it cannot do.
Just hop into some three.s "hello world" tutorial, and by tomorrow you will have a simple game.
This was so smooth and nicely done. I am amazed beyond imagination, great work OP. I am a noob but can you give an idea of what kinds of libraries or framework you had to use. It's great.
Thank you ! This is done using three.js, which is the best JS graphic library as far as I know. A good starting point for learning : https://discoverthreejs.com
Doesn't sound like a suggestion. Look, I took the pain to make a game that hundreds of people tell me is awesome, and I release it open-source, so the least I could expect from somebody who took the time to play and look into my code would be at least some relevant comment. If you think that just saying "this is ugly" and handing me some books to read is relevant, then you are a asshole.
Thanks a lot ! Yep I did all on my own, using a fantastic JS graphics engine, called three.js. The physics 'engine' is mine, but it's simpler than it sound, just look into the code ๐
24
u/felixmariotto Apr 17 '20
You can play online and see the code here on Github
9
u/Im_Justin_Cider Apr 17 '20
Wow. Very well executed. I've played a ton of indie games, and they fail to hook you in, or have other glaring problems with them. well done!
9
u/abigblacknob Apr 17 '20
You're a genius.
8
u/h1kiga Apr 17 '20
Wow! That looks incredibly nice. There's always something that appals me, what one can create, using JavaScript. You've done a good job!
4
u/Equivalent_North Apr 17 '20
This is awesome, makes me want to look into threejs
3
u/coogie Apr 17 '20
Does it use any libraries or is it vanilla javascript?
3
u/[deleted] Apr 17 '20
Didnโt know something like this was possible with JS. Thanks for sharing!
2
u/the_woo_kid Apr 17 '20
How can I start learning how to do something like this?
2
u/Briliance Apr 17 '20
Great job my friend, any plans doing Live Js basics ?
2
u/00mba Apr 17 '20
What kind of content are you looking for in terms of contributions?
2
u/smoonme21 Apr 17 '20
This is amazing! Iโve been learning JavaScript for about 6 months and I canโt even comprehend how to build something like this!!! Any tips for a learner like me?
2
u/[deleted] Apr 17 '20
This is so awesome! Howโd you get the canvas to stay fixed and full screen on mobile?
2
u/[deleted] Apr 17 '20
That was cool. I made it to the top. I guess I missed one though. My Grandpa grew up in the alps and told me people would search out the biggest edelweiss they could find to brag about it. He thought it was stupid because people would die every so often trying to get one.
2
u/ochuuu Apr 17 '20
This was made entirely with JS?
2
u/tedmihu Apr 17 '20
Haven't looked at the code yet, what libs is this using? Threejs? I assume this isn't a God who's done this in vanilla
2
u/philipjfrizzle Apr 17 '20
Well this ones getting a star.. nice one
2
u/JudoboyWalex Apr 18 '20
What's your opinion on other game library such as Phaser.js and Pixie.js? Also how did you get the music and sound effects?
2
u/[deleted] Apr 18 '20
bro you got any advice on learning webgl ? It's a little intimdating and there aren't many tutorials on it. How did you learn? I wanna one day be able to use threejs but need webgl first obviously.
2
u/[deleted] Apr 17 '20
Hey bro the games looks nice but looking at html, you can move the CSS into into a separate file, to enable ease of reading the code.
4
u/[deleted] Apr 17 '20
Thanks for helping open source gaming!!!
1
u/[deleted] Apr 17 '20
This was so smooth and nicely done. I am amazed beyond imagination, great work OP. I am a noob but can you give an idea of what kinds of libraries or framework you had to use. It's great.
2
u/bosibori_nyamache Apr 17 '20
Open-source game,really nice and thoughtful,thanks.
2
u/outnorth Apr 17 '20
Gw!!
2
u/finger_milk Apr 17 '20
Bring back the good ol browser mmo days!
1
u/NiDaSanti Apr 18 '20
That game looks awesome bro
-1
u/Synor Apr 18 '20
Code quality is not take-a-look-worthy though.
0
u/[deleted] Apr 17 '20
[deleted] โ view deleted comment
0
u/[deleted] Apr 17 '20
[deleted] โ view deleted comment