No video

Making the same game in threeJS and Unity

  Рет қаралды 70,912

Code4Fun

Code4Fun

Күн бұрын

Code:
github.com/ric...
github.com/ric...
Reference:
CannonJS: github.com/pmn...
Create with Code Course: learn.unity.co...
#gamedevelopment #gamedev #indiegamer #game #indiegamedev #gamedesign #gameart #gamedeveloper #indiedev #unity3d #unitygames #gameengine #beginners #threejs

Пікірлер: 64
@Hoodgail
@Hoodgail 2 жыл бұрын
You should make more threejs content
@code4fun677
@code4fun677 2 жыл бұрын
I will do that
@beardedninjagames7753
@beardedninjagames7753 Жыл бұрын
Just wanted throw some info on WebGL Unity as I've been using it for quite a while and may have some insight that may be useful to others.. With Unity you get a lot of powerful features from the Editor that 3js simply does not have available. However, you'll need to optimize it for the web. In this video it may not optimized (real-time shadows are enabled, for one) and you can see the performance suffer in the comparison video. You also need to take a bit of time to optimize code stripping, textures, and things like that to get the build size down. That also means setting up gzip or brotli compression and the like. That being said, there are a lot of built-in tools, and if you're making a game Unity can save you so much time in not having to reinvent the wheel. With 3JS the file size tends to be smaller / leaner as you're not getting a bunch of extra functionality included by default. Unity just compiles down to JS / WebGL anyways, but it tends to include some additional overhead for things like physics or even font rendering that you may not need. That adds to file size / initial loading, which is an important factor in the web. So 3JS builds are likely smaller to start with. They also feel a bit more native to me, and can handle web-specific content like gifs and glb loading, which Unity does not support by default. I think they both have their uses and one isn't particularly better than the other for the web - they are just different tools better suited for different projects. I think if you only need web support and don't need to be able to build for other platforms, 3JS can be a great, quick-loading, performant option. If you're making a game or app that could greatly benefit from using the Unity editor, then Unity could potentially save you a lot of time.
@ViniciusValente
@ViniciusValente Жыл бұрын
I was calculating all the physics by hand. I'm going to study CannonJS now.
@niceEli
@niceEli 6 күн бұрын
Rapier and jolt is also good (personally I think jolt is the most stable)
@RexSounds
@RexSounds Жыл бұрын
met you on dc!! nice content bro
@sar5845
@sar5845 Жыл бұрын
dc?
@chetanchandel8850
@chetanchandel8850 Жыл бұрын
@@sar5845 probably discord
@multikillgames
@multikillgames Жыл бұрын
I think if you turned off gi/shadows on the car unity project would probably run way faster. Probably doubles the calculations.
@astrahcat1212
@astrahcat1212 Жыл бұрын
Also setting shader quality in Edit - Project Settings - Quality. The graphics library also matters, and if you build the project it will run way faster. Also, main thing here, shaders. Gotta optimize the shaders. Also, shadow quality makes a huge difference, and especially anti-aliasing.
@alew140
@alew140 10 ай бұрын
broth is only a car with some boxs.
@benjburg3343
@benjburg3343 Жыл бұрын
comparison of performance would be interesting to see
@DJenriqez
@DJenriqez Жыл бұрын
In threejs you can create web engine in web browser, which will create game (I use threejs for creating 3D editors mostly so I know), in unity you can make game, making another engine is incredibly hard....
@Yuze408
@Yuze408 Жыл бұрын
wow thx dude this is easy to follow and learn , please make more videos just like this one 🙏🙏
@cabezaCode
@cabezaCode 20 күн бұрын
Muy buen trabajo 😮
@krivalex
@krivalex Жыл бұрын
very good man, don't stop
@ernestobarbaroalvarezgomez8443
@ernestobarbaroalvarezgomez8443 2 жыл бұрын
very good, but threejs has an editor, is very basic, but it works
@code4fun677
@code4fun677 2 жыл бұрын
You are right
@VisibleMRJ
@VisibleMRJ Жыл бұрын
WebGPU next
@yoyoke1
@yoyoke1 Жыл бұрын
Interesting perspective :)
@randyh3761
@randyh3761 Жыл бұрын
Excellent!
@KwamenaRoyce
@KwamenaRoyce Жыл бұрын
Inspired by this video.
@sar5845
@sar5845 Жыл бұрын
awesome subscribed!
@suharsh96
@suharsh96 Жыл бұрын
This js great!
@creativeplanet2820
@creativeplanet2820 Жыл бұрын
Thank you very much for the Video. Can u please tell us Which performs better Unity or Three js webgl?
@mayukhchanda5805
@mayukhchanda5805 Жыл бұрын
Please make an elaborate video on three js and if possible how to integrate them with libraries like react or angular.
@placedelechange
@placedelechange Жыл бұрын
Its absolutly possible, as all others lib. But typescript will make 3js slower than habit.
@diegoguzman1285
@diegoguzman1285 Жыл бұрын
​​​@@placedelechange how is it possible that Typescript makes Three JS slower? In fact, the TS compiler could make your JS even faster so I don't see how TS could affect the performance at all. You are just downloading some typings that will not be included in your bundle anyway
@placedelechange
@placedelechange Жыл бұрын
​@@diegoguzman1285 simply because TS could call (typing) functions for inputs when you just need to get directly the raw value for perf, especially in shaders. For now, I never saw any TS code running faster than pure JS. Do you have source about TS faster your code so ? I do both and Im agnostic about tech. In all case, web assembly will replace this lack of power that JS have, so think about changing your stack :-)
@diegoguzman1285
@diegoguzman1285 Жыл бұрын
@@placedelechange not all in development is speed though. Sometimes, readability and maintainability is more valuable, and you gain both with TS over JS. Search for the optimizations the TS compiler do, there you find examples.where you can write readable code in TS that is transformed.into an optimal JS running at least as fast as something written directly in JS, without you having to think too much over those optimizations manually. And I don't quite understand your example very well, anything related to typing should go away after the compilation. I'm curious to know if you have any reliable source about what you mentioned
@placedelechange
@placedelechange Жыл бұрын
@@diegoguzman1285 To be honest, I saw only failed projects on ts for now mainly cause of breaking dependancies and types, devs often comes back to js at the end and its finally more robust in time. I (re)checked ts optim and I dont see any optimisation using it neither, maybe it more valuable for juniors that dont know js in depth, but basically peoples w/ a strong xp already code in a way it works as good as it should. Personnaly, I use ts only if needed or when I know I wont come back on code, but its slower to code (due to compilation each time you change sth) and really not confortable when you have multiples dependancies or intensive code growing (I mean not flexible enough). Better have a cypress and end to end tests to know if system is running correctly. Its just my opinion.
@prokeikas7284
@prokeikas7284 Жыл бұрын
I think the threejs version looks better.
@jeremyh9841
@jeremyh9841 Жыл бұрын
what is the goal of this game ?
@stephenjayakar1846
@stephenjayakar1846 Жыл бұрын
are you actually talking? or is this an AI?
@RayHorn5128088056
@RayHorn5128088056 Жыл бұрын
Why mess around with three.js when Unity can export webGL? I am not getting it.
@suharsh96
@suharsh96 Жыл бұрын
Familarity with JS
@CappySmack
@CappySmack Жыл бұрын
@@suharsh96 And an unwillingness to learn anything new? WebGL via JS is far more difficult than doing the same thing with Unity, which also supports WebGL. And you get lower quality results doing it your way. Been there and done that.
@suharsh96
@suharsh96 Жыл бұрын
​@@CappySmack Web is powered via JS. A lot of web developers today work mainly with JS on both the front-end and the backend and knows the ins and outs of the language, package managers and everything else. As a JS dev, I would rather build up an idea in three.js than start with Unity from scratch.
@CappySmack
@CappySmack Жыл бұрын
@@suharsh96 It's always good to have a nice comfy comfort zone like JS where you don't need to learn anything new, right? Leave the big scary world to those of us who can learn anything. Unity is trivial compared to the other far more difficult technologies I have worked with during my career. WebGL in JS is far more difficult than WebGL in Unity.
@floskater99
@floskater99 Жыл бұрын
Because there are a lot of things that can't be exported to WebGL.
6 Months of Learning JavaScript Game Dev in 6 Minutes
6:35
Suboptimal Engineer
Рет қаралды 119 М.
I Tried Making an FPS Game in JavaScript
8:19
SimonDev
Рет қаралды 129 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 12 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 123 МЛН
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 19 МЛН
I Tried Making a 3D RPG Game in JavaScript
14:19
SimonDev
Рет қаралды 1,1 МЛН
🌵 Needle Engine - Getting Started. Unity → three.js
16:07
Making a Game in JavaScript with No Experience
5:49
Goodgis
Рет қаралды 811 М.
I wish I knew this before using React Three Fiber
28:23
Rabbit Hole Syndrome
Рет қаралды 120 М.
Learn Three.js for Games using TypeScript (modern way)
14:02
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,4 МЛН
How to Learn Three.js in 2024 ( Full Guide )
6:41
Visionary 3D
Рет қаралды 84 М.
I Tried Making a 3D MMORPG Game in JavaScript
16:48
SimonDev
Рет қаралды 601 М.
MarioKart.js Blew My Mind (Open Source + React + ThreeJS)
11:37
Theo - t3․gg
Рет қаралды 210 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 12 МЛН