Let's Code A Multiplayer Voxel Game in C++ - The Engine

  Рет қаралды 224,010

Hopson

Hopson

Күн бұрын

Пікірлер: 489
@VictorRodriguez-zp2do
@VictorRodriguez-zp2do 5 жыл бұрын
It took you so long to make a video that you actually gave me enough time to go from only knowing python to learning C and OpenGL
@qwerasdfhjkio
@qwerasdfhjkio 5 жыл бұрын
how do you learn so fast? :/
@jimothyus
@jimothyus 5 жыл бұрын
Justin X. By doing
@VictorRodriguez-zp2do
@VictorRodriguez-zp2do 5 жыл бұрын
@@qwerasdfhjkio I said I learnt OpenGL but honestly for now I can only render quads on the screen. I still have no idea how to rotate a cube on the screen, but I will get there later
@Cal97g
@Cal97g 5 жыл бұрын
That happened
@tunis4
@tunis4 5 жыл бұрын
@@Cal97g Why wouldn't that happen?
@dr_atheist4272
@dr_atheist4272 5 жыл бұрын
Still a more reliable uploader than Code Bullet.
@iced-imran1247
@iced-imran1247 5 жыл бұрын
}:^
@tsalVlog
@tsalVlog 5 жыл бұрын
Yeah, but opengl is 1998-tastic.
@microman502
@microman502 5 жыл бұрын
Hey, he's not... well... I guess you ARE right.
@OpenKeith
@OpenKeith 5 жыл бұрын
@@tsalVlog you say that like it's a bad thing
@skepticmoderate5790
@skepticmoderate5790 5 жыл бұрын
@@tsalVlog What are you talking about? 90% of 3D games made today use OpenGL.
@Gizego
@Gizego 5 жыл бұрын
We missed you
@randomguy4738
@randomguy4738 5 жыл бұрын
ikr
@Nugcon
@Nugcon 5 жыл бұрын
same
@xiaoshou6752
@xiaoshou6752 5 жыл бұрын
Yes we did, truly!
@itheivoidi9151
@itheivoidi9151 5 жыл бұрын
No
@JackTheOrangePumpkin
@JackTheOrangePumpkin 5 жыл бұрын
We missed you a lot
@willful759
@willful759 5 жыл бұрын
finally, we are getting hopsoncraft
@EpicVideoGamer7771
@EpicVideoGamer7771 2 жыл бұрын
In this series you have basically started to create my dream game: A multiplayer minecraft clone which I have created myself from scratch, in which I can hang out with friends and mess around, and implement cool features which vanilla minecraft does not have, e.g. coloured lighting, items which refer to inside jokes, etc, etc. Some of these could be implemented with mods, but it is not the same as being hard coded and the whole game created by me. My goal one day is to create this game, and have a blast playing this game with my friends and family. This series and your other minecraft videos is one of my favourites of all time on the whole of KZbin - my grin was from ear-to-ear for the entire duration of watching. Thank you, Hopson.
@jumbledfox2098
@jumbledfox2098 2 жыл бұрын
Ooooh me too - I've always wanted to create something like this. I'm currently procrastinating learning opengl, how's your journey going?
@EpicVideoGamer7771
@EpicVideoGamer7771 2 жыл бұрын
@@jumbledfox2098 Thanks for asking, I haven't really touched OpenGL since commenting as I am getting more familiar with C++ and SFML atm.
@jumbledfox2098
@jumbledfox2098 2 жыл бұрын
@@EpicVideoGamer7771 oooh nice! its always good to make dozens of little projects than one big and hard one
@EpicVideoGamer7771
@EpicVideoGamer7771 2 жыл бұрын
@@jumbledfox2098 Yeah I am currently making a top town 2d shooter, might release it on itch when im done
@beron_the_colossus
@beron_the_colossus 5 жыл бұрын
Oh my, it's happening!
@Testbot379
@Testbot379 3 жыл бұрын
Idk why but why seeing these type of videos are SOO satisfacting
@GamingBlake2002
@GamingBlake2002 5 жыл бұрын
9:48 "Reliable UDP sockets" So... TCP sockets?
@Hopsonn
@Hopsonn 5 жыл бұрын
Nope, tcp carries a lot more weight ontop it. Also its optional reliability, so no need to have that unless absolutely nessesary(eg sending player positions, it's safe to miss a few packets here and there, but sending chunk data needs guaranteed delivery)
@GamingBlake2002
@GamingBlake2002 5 жыл бұрын
@@Hopsonn So the protocol he used was basically TCP minus the congestion control?
@MINIMAN10000
@MINIMAN10000 5 жыл бұрын
@@GamingBlake2002 So the topic is covered in the talk GDC - Networking for physics programmers. TCP has head of line blocking, TCP waits for an ack, not get it, and then request the packet to be resent, there is congestion avoidance, slow start. These features are what separate TCP from UDP and also what makes TCP untenable for a lot of real time uses when you include latency and packet loss as your connection becomes jittery. You can get reliability without these features while still retaining a stable connection by building only what features you need on top of UDP.
@stacyardus3898
@stacyardus3898 5 жыл бұрын
@@MINIMAN10000 networking is a dragon you cannot see, but witness the effects of everyday
@whiitehead
@whiitehead 5 жыл бұрын
"Strawberry flavoured candies" So... strawberries?
@Affax
@Affax 5 жыл бұрын
I made my own multiplayer game, and I can feel the pain with making good networking---
@AngeTheGreat
@AngeTheGreat 4 жыл бұрын
Amazing job on this! Networking in particular is something I've been meaning to get into
@SuitOne
@SuitOne Жыл бұрын
Holy shit I didn't expect to randomly find you here lol
@_zEuS0390_
@_zEuS0390_ 5 жыл бұрын
I'm currently studying networking (cisco) and this video is amazing! I just realised that it could be used in developing multiplayer games.
@OliverStro
@OliverStro 5 жыл бұрын
Awesome, loved these videos can't wait for this series.
@marmoripelaao9830
@marmoripelaao9830 5 жыл бұрын
At the very beginning of the video I thought: Alright, if it's about networking, you have to use ENet! I was highly surprised when at the end you actually did. I feel like although being old, it is good enough to deserve attention.
@Mechobree
@Mechobree 5 жыл бұрын
Ohh this is super nice to see, it ALMOST gives me back the motivation to make the voxel-esc game I've been wanting to create, and the talk of how "chunks" are rendered/saved certainly helped in my motivation. Only trouble is my lack of experience now!
@mantasarmalys6471
@mantasarmalys6471 5 жыл бұрын
Amazing video ! Can't wait for the next part !
@balistik4901
@balistik4901 5 жыл бұрын
Did you... Did you just explain a heckton of knowledge in just a couple of sentences? Like... I understood nearly every sentence and was following through with ease... Fricking admireable.
@alessi4249
@alessi4249 5 жыл бұрын
Dude! I watched your original videos and decided to make a voxel multiplayer game in JavaScript using webrtc great vid!
@lilcatfriend4575
@lilcatfriend4575 5 жыл бұрын
You know you're godlike when you refer to the internet as "some network"
@commiechar
@commiechar 3 жыл бұрын
but... that’s what it is
@firepro20
@firepro20 5 жыл бұрын
Really great video, explains the core functionality and how it works for people learning SFML. I wish I knew about ENET before! Really cool.
@ChupachuGames
@ChupachuGames 5 жыл бұрын
Authenticate the disconnect using the IP and have the server compare it against the table of users, it will be a lot harder to discover and spoof the IP of every user in the game rather than iterating 1-12 or however many players Also in order to prevent teleport hacks, the clients should send translations that should be clamped by the server and then applied, returning a position to avoid desync
@sverre1734
@sverre1734 5 жыл бұрын
The legend is back
@BreiiisBreiiis
@BreiiisBreiiis 3 жыл бұрын
Hearing that Beyond Good & Evil ost was a pleasant surprise.
@voyagerjs
@voyagerjs 5 жыл бұрын
Holy shit, the Ratchet and Clank music!!! You have some good taste my man, also one of the best tracks as well!
@stacklysm
@stacklysm 5 жыл бұрын
I ALMOST HAD A HEART ATTACK SEEING THIS UPLOAD
@David-nn1cf
@David-nn1cf 5 жыл бұрын
"Hmm maybe making my own engine with OpenGL would be fun" *Sees video* I think I'll stick to unity
@lupinedreamexpress
@lupinedreamexpress 5 жыл бұрын
You're part of the problem then.
@MrHatoi
@MrHatoi 5 жыл бұрын
Seriously though, I'd recommend trying it at least once. Most 3D engines are built around pretty much these exact principles, so if you're doing serious development it's good to know how they work. Unity isn't too much more abstract than this stuff and if you ever want to go into more advanced stuff like shaders you will have to understand stuff like this.
@benjaminmiddaugh2729
@benjaminmiddaugh2729 5 жыл бұрын
@Sticks Studios And that's yet another reason why Apple is terrible. They almost always design their own "standards" instead of adopting widely-used, already available ones.
@lonsdaleitepolitics9597
@lonsdaleitepolitics9597 5 жыл бұрын
OpenGL is on mac, Apple just stopped updating it beyond 4.1.
@LuukDomhof
@LuukDomhof 5 жыл бұрын
@@lupinedreamexpress How is using Unity to create games a problem? Many amazing games are powered by it.
@andraskmeczo575
@andraskmeczo575 5 жыл бұрын
Hi! I really enjoyed your code Minecraft series so I'm happy to see you do it again. Are you planning to make it look like the vanilla Minecraft, or are you planning to add some nice shaders to it, maybe even some RTX?
@Hopsonn
@Hopsonn 5 жыл бұрын
Thanks! In terms of that, I haven't really got any plans about how it should look but I am open to ideas in this area. (Also I have no clue how RTX actually works, let alone a graphics card that actually support that :P)
@didicayu
@didicayu 3 жыл бұрын
loving the Ratchet and Clank going commando ost
@johannesk.5039
@johannesk.5039 5 жыл бұрын
for moving foreward i would use a vector facing the way the player does and rotates with him while beeing parallel to the xz-plane. If you instanciate it with a length of one (e.g. v=(1,0,0)) you make sure that by adding this vector to the players position you moved him exactly 1 unit. For moving him half a unit simply multiply .5vand so on. I'm sure you know how vectors work. For rotating Vectors around the y axle there is an easy matrix. ^^
@noellelavenza494
@noellelavenza494 5 жыл бұрын
I smell a DoS method by sending a lot of chunk requests for areas that haven't been generated yet, bogging down the server and increasing its CPU use. Regardless, super cool video, subbed and liked!
@bogdanbogdanovich140
@bogdanbogdanovich140 5 жыл бұрын
You could try to make compression if there are multiple blocks you can make the coordinates of just the shape of blocks.
@Otakufreak26
@Otakufreak26 4 жыл бұрын
I wish you go more in depth on these topics. This is all interesting stuff.
@greenthefirst
@greenthefirst 5 жыл бұрын
I love this, can't wait for the next episode
@MagoLP
@MagoLP 5 жыл бұрын
It's interesting to see you making these first steps... I started working on a voxel game 5 years ago and I'm still not finished. Bonus challenge: make the blocks 0.5m in size and have fun with the optimizations you need for that :)
@hugofoltin5647
@hugofoltin5647 3 жыл бұрын
is it finished yet? what is the progress
@MagoLP
@MagoLP 3 жыл бұрын
@@hugofoltin5647 Still working on it. I'm adding a couple of advanced multiplayer features now, like easily switching between servers without having to create a new character. Kinda important when you got a game where everyone can host a server.
@ShiroCh_ID
@ShiroCh_ID 4 жыл бұрын
we need to respect him and also notch since they make their on engine from ground by using OpenGL and i still stuck in learning in Unity
@m4rt_
@m4rt_ Жыл бұрын
remember to normalize the player movement vector so that the player doesn't move faster when walking diagonally
@thecakeisalie6392
@thecakeisalie6392 5 жыл бұрын
Man this is awesome, I'm waiting for the next episode of this. May you do volumetric clouds btw?
@aaron6807
@aaron6807 2 жыл бұрын
09:53 Why didn't you use a TCP library?
@ip0x945
@ip0x945 5 жыл бұрын
Make a stream. I would love to see this being made live
@FICHEKK
@FICHEKK 5 жыл бұрын
I am interested in why didn't you just use TCP for sending chunk data from server to client?
@lenonkitchens7727
@lenonkitchens7727 5 жыл бұрын
UDP is usually used for game systems because it is message oriented as opposed to stream oriented. It's faster, there's no buffering, no worries about having to disable Nagle's algorithm, an *generally* you don't care if a packet gets dropped. It's almost *always* a better choice for multiplayer games. All that being said, I don't know what his reasons are. He said he's new to network programming, so maybe he just lucked into making the right choice, or maybe he did a bit of research beforehand.
@Davi-c4q
@Davi-c4q 5 жыл бұрын
Lenon Kitchens I believe most games use UDP for things like position, but also TCP for important parts.
@Davi-c4q
@Davi-c4q 5 жыл бұрын
I see in GTA V Online that our client tries to predict where all entities will be (so it also receives entities’ velocity) so players don’t just teleport around like in minecraft.
@deadaccount3994
@deadaccount3994 5 жыл бұрын
​@@lenonkitchens7727 In the case of chunk data TCP should be used though because it's important that all data is received correctly.
@lenonkitchens7727
@lenonkitchens7727 5 жыл бұрын
@@deadaccount3994 It's still probably better to implement a form of guaranteed delivery via UDP for such data, and relax the guaranteed delivery requirements for data that isn't as important. TCP should really only be used for something like a connection to a RESTful API in a game system.
@portalblend7527
@portalblend7527 5 жыл бұрын
Please, keep using Rayman 1 musics ! Those are so cool to hear while listening at your explanations :) Btw, great video. I'm waiting for the next ones ;)
@TRMrStone
@TRMrStone 5 жыл бұрын
If you should get famous with this, I was since beginning here :]
@seditt5146
@seditt5146 5 жыл бұрын
Since your Textures can be set to repeat have you considered mapping similar adjacent blocks into a single block which only contains the 8 vertices? I guess it's effectiveness would be determined where your main bottle neck is be it the CPU or GPU. Idk due to instancing you could likely do without such a thing but it was just a random thought I had while watching. Nice video, gl on the project.
@The_Big_Rock
@The_Big_Rock 5 жыл бұрын
God. Ill never be this good at coding
@barry_crisp
@barry_crisp 5 жыл бұрын
Hey! Glad your back, can't wait for the next episode.
@Dragon20C
@Dragon20C 3 жыл бұрын
How do you hide the faces inside, can't wrap my head around it
@Hopsonn
@Hopsonn 3 жыл бұрын
Its a feature of OpenGL As long as the vertices of an object are defined in a counter-clockwise order, OpenGL is able to determine which face is the front, and which is the back face And then back-faces are culled with glEnable(GL_CULL_FACE); glCullFace(GL_BACK)
@Dragon20C
@Dragon20C 3 жыл бұрын
@@Hopsonn unfortunately I'm am using a game engine I have a 3 * 3 * 3 cubes and the inside they are being rendered, thanks for the reply
@Hopsonn
@Hopsonn 3 жыл бұрын
@@Dragon20C In this case I would work out which cubes have ANY faces exposed and only render those ones. It won't be as efficient as culling faces but it will have the same effect. You could optimise further by making a list of the exposed cubes when the world changes rather than calculating every frame.
@Dragon20C
@Dragon20C 3 жыл бұрын
@@Hopsonn thanks! I'll figure the rest out!
@kowladMC
@kowladMC 5 жыл бұрын
It took minecraft around 10.5 years to get to where it is now so how long do you think you will need to do more or less the same ? Id guess a bit shy of a year maybe ?
@AntonioLatronicoDeveloper
@AntonioLatronicoDeveloper 5 жыл бұрын
Incredible, really. Compliments for your hard work and thanks for sharing!
@Rob-hm4jx
@Rob-hm4jx 5 жыл бұрын
Hytale: "Let's kill Minecraft!" Hopson: "Let's kill Hytale"
@sonilpro8526
@sonilpro8526 5 жыл бұрын
9:00 ratchet ans clank music maaan, good old days.
@logannance10
@logannance10 5 жыл бұрын
Great video. I'd love to see one using Vulkan.
@mattwhelan13
@mattwhelan13 4 жыл бұрын
this music makes me want to jump back into pink plant woods, is it not copyrighted?
@powerclan1910
@powerclan1910 5 жыл бұрын
i would be up to helping in this, having no real c++ gaming experience, but i have mathematical c++ and gaming c# experience, i can combine that, right?
@storminmormin14
@storminmormin14 2 жыл бұрын
Oh my gosh that Rayman music!
@braydenmoore7227
@braydenmoore7227 5 жыл бұрын
Programmers are so smart, they're so underappreciated.
@RegahP
@RegahP 5 жыл бұрын
Aw. Thank you.
@shade0636
@shade0636 5 жыл бұрын
Aw. Thank you.
@SDFTDusername
@SDFTDusername 5 жыл бұрын
Aw. Thank you.
@Khenarthi
@Khenarthi 5 жыл бұрын
Aw. Thank you.
@nukee2283
@nukee2283 4 жыл бұрын
HI im just here to break the chain :)
@MaxPicAxe
@MaxPicAxe 5 жыл бұрын
WELCOME BACK HOPSON LOOKING FORWARD TO THIS
@earomc
@earomc 5 жыл бұрын
Its so much fun and interesting to watch! Thank you for this video :)
@xandahkewl
@xandahkewl 3 жыл бұрын
are you ever going to upload again its been a year?
@KoKoKen
@KoKoKen 5 жыл бұрын
happy to see another one of your videos
@feathersm7966
@feathersm7966 5 жыл бұрын
Another dope video ty hopson
@iProgramInCpp
@iProgramInCpp 5 жыл бұрын
Why didn't you use ENet for player everything then? It's easy to do that, just assign the first byte as a message type then check for the message type and read the data accordingly. Very easy, no need for other things.
@X3eRo0
@X3eRo0 5 жыл бұрын
Is there any popular tutorial series on KZbin or any website which talks about making visual c++ 3d game
@undertheradar4645
@undertheradar4645 3 жыл бұрын
Am I wrong that this isn't technically voxels from the rendering perspective?
@anonymus_the_real
@anonymus_the_real 2 жыл бұрын
hi Known pipe types: wglGraphicsPipe (3 aux display modules not yet loaded.) :pnmimage:png(warning): iCCP: known incorrect sRGB profile :pnmimage:png(warning): iCCP: known incorrect sRGB profile what this?
@niktedig853
@niktedig853 5 жыл бұрын
Srry if I’m understanding this wrong, but ur sending the chunk data from server to client. The chunks are randomly generated from the same seed though right? So if that’s true, each client should be able to independently calculate the chunk data and should only receive changes to that chunk from the server. This would make the client more independent from server and, would eliminate the holes in the terrain that u talked about in the video would it not?
@friedkeenan
@friedkeenan 5 жыл бұрын
The server should be the one generating the chunks, since you're really not supposed to trust the client. For instance, what if one client is for whatever reason using a different seed than the server, and generates different chunks? Other normal clients will have no idea what the malicious client is doing, and could allow the malicious client to get things the normal clients can't, for instance they could be using a seed where there are a ton of diamonds nearby or something.
@kik8bg
@kik8bg 5 жыл бұрын
@@friedkeenan But the client handles the drops, blocks and player position. So breaking a diamond block on your screen wouldn't drop a diamond if its a stone block on the server data. As well if you walk into air blocks that are cleint wise, and on the server they're solid, it will just cause you to teleport back annoyingly.
@DFPercush
@DFPercush 5 жыл бұрын
@@kik8bg Movement collision is often left up to the client for performance reasons. There are ways to audit it, but a lot of games don't check it every frame.
@ausintune9014
@ausintune9014 4 жыл бұрын
Why not just store the changes in the map? As the world should be generated by a seed that is the same evwrytime you run the world, if you just store changes to each chunk it will be wayyy more storage efficient and still work.
@fearlesswee5036
@fearlesswee5036 5 жыл бұрын
Wait, a multiplayer Voxel game/engine with mod support and open-source code? You're making Minetest 2 lol (Not saying that's a bad thing, infact I think the fact that your project has a more permissive license is awesome!)
@Hopsonn
@Hopsonn 5 жыл бұрын
Mine test is awesome and is one of my main motivations to creating this, it's just always fun to create it yourself :)
@triforce.pianist
@triforce.pianist 5 жыл бұрын
I liked the Chrono Trigger Epoch song at the end 👏
@dryued6874
@dryued6874 5 жыл бұрын
What was the logic behind using a reliable UDP library, rather than just plain TCP, which is reliable by definition?
@Hopsonn
@Hopsonn 5 жыл бұрын
gafferongames.com/post/udp_vs_tcp/
@dryued6874
@dryued6874 5 жыл бұрын
Makes sense, thanks.
@stylextv
@stylextv 5 жыл бұрын
4:20 So I can basicly kick everyone on the server with just one packet? ;) (Just noticed that you already knew that exploit)
@dekrain
@dekrain 5 жыл бұрын
simply: no, since there are methods used to authenticate that only you can send packets with your client id
@amp8240
@amp8240 5 жыл бұрын
since his method of sending/receiving packets relies on having a client id header as a very basic and insecure method of authentication, no you could not kick everybody with just 1 packet as it would require 1 packet per player
@stylextv
@stylextv 5 жыл бұрын
@@amp8240 Yes, you are right but that is also what I meant. I meant that you kick can any player you want with 1 packet
@amp8240
@amp8240 5 жыл бұрын
@@stylextv "everyone on the server with just one packet" conveys a different message but ok
@dekrain
@dekrain 5 жыл бұрын
By the way my answer is not about the server presented in the video, as it's just a prototype and likely to change(?). Instead it's about practical examples. Just to clarify
@keldwikchaldain9545
@keldwikchaldain9545 5 жыл бұрын
What's the reasoning for using reliable udp over just tcp?
@Hopsonn
@Hopsonn 5 жыл бұрын
The reliable udp is optional, and most packets getting sent won't need reliability, (eg player positions are constantly streamed around) so tcp ensuring delivery of such packets would cause a bottleneck eventually
@keldwikchaldain9545
@keldwikchaldain9545 5 жыл бұрын
@@Hopsonn So the main reasoning is to allow some reliable and some unreliable transmission while only taking up one port on the machine then?
@Hopsonn
@Hopsonn 5 жыл бұрын
@@keldwikchaldain9545 pretty much. Plus I have read many articles about how tcp is really not good for games. Plus if I can use library to handle the "hard stuff" of udp for me, why not? gafferongames.com/post/udp_vs_tcp/
@vcokltfre
@vcokltfre 5 жыл бұрын
Additionally, UDP is designed for speed; it shoves a packet in the face of whoever it's sending it to and leaves it there, which is fast and efficient for games where if it messes up it quickly corrects itself. UDP: Here, take this packet TCP: Can I have this packet please? Sure here's the packet Thanks, just telling you I got the packet Thanks, just telling you I got your message telling me I got your packet K that's great, now can I have another packet...
@TheBuzzSaw
@TheBuzzSaw 5 жыл бұрын
There's so much more to TCP vs UDP than just "reliable vs unreliable". The fact that TCP buffers packets to get them into the right order is an awful attribute for many games. Games are often OK with packets arriving out of order. Also, even if packets are sometimes lost, it's OK to just read the next one because it will contain data that trumps the previous packet's data anyway.
@shadguitar
@shadguitar 4 жыл бұрын
How did you learn OpenGL? I really want to learn it and am inspired by your work!
@Hopsonn
@Hopsonn 4 жыл бұрын
Cheers! I learned from a few places, learnopengl.com/ this is really good for basics but can be a lot of waffle ogldev.atspace.co.uk/ another great resource Also learned from thin matrix opengl tutorials (KZbin) but he does it in java, and not particularly the best approaches to it, but some of the most easy to understand explanations Good luck!
@bartekdusza63
@bartekdusza63 5 жыл бұрын
Hey Hopson it would be great if you create a tutorial how to setup sfml for visual studio code
@michaelscofield1970
@michaelscofield1970 5 жыл бұрын
Check out the CMake tutorial on SFML, just follow it
@_lapys
@_lapys 5 жыл бұрын
Love your videos, man
@WangleLine
@WangleLine 5 жыл бұрын
Same here. Hopson makes great, great videos~
@raduhabinyak6860
@raduhabinyak6860 5 жыл бұрын
What is you just made a list of operation types for the server and gave each one an importance value and the server would then do the most important task at the moment If you chose to do this to do this I would put world gen at the not so important end because updating entity position and talking with players is more important so you can give him layers the ability to generate chunks if the server is overloaded by entities like animals or other entities and the player just transfers this information back to the server
@boweneveritt3400
@boweneveritt3400 4 жыл бұрын
Where did you learn C++?
@cedric1731
@cedric1731 5 жыл бұрын
Would love to see your engine being ported to vulkan ^^
@wizardengineer
@wizardengineer 5 жыл бұрын
Do you think next time instead of OpenGL you could try and use Vulkan?
@poggy205
@poggy205 5 жыл бұрын
Welcome back, we missed you! Btw, how did this took 5 days to get to my feed?
@WangleLine
@WangleLine 5 жыл бұрын
You're back! ❤
@xAwesomeLetsPlaysx
@xAwesomeLetsPlaysx 4 жыл бұрын
0:20 What modding extension is displayed on the left there?
@Hopsonn
@Hopsonn 4 жыл бұрын
That is Chaiscript
@xAwesomeLetsPlaysx
@xAwesomeLetsPlaysx 4 жыл бұрын
@@Hopsonn Thank you, that was quick.
@redandcyanpower
@redandcyanpower 5 жыл бұрын
Good to see you back again (:
@JMProductionDesigns
@JMProductionDesigns 5 жыл бұрын
you study well been making game engines since i was 11 Zelon Studios Inc.
@raduhabinyak6860
@raduhabinyak6860 5 жыл бұрын
Also if the server is to built with something player position should be able to work p to p at least for small groups without the server Or for playing over WiFi could be then be done over p to p
@youarespecial50
@youarespecial50 3 жыл бұрын
Wow👍👍👍 Thanks for sharing and visiting Kelly
@DylanMatthewTurner
@DylanMatthewTurner 3 жыл бұрын
If you already have a server system, why not store the entity positions their and send them TO the client instead? This would prevent players from inputting false data and cheating, at least to some extent. I could understand having them send their own data if it were client to client directly, but it isn't.
@nelsonkenmochi9353
@nelsonkenmochi9353 5 жыл бұрын
Dude, you're awesome. Good code.
@xriccardo1831
@xriccardo1831 5 жыл бұрын
Im taking linear algebra right now, is the way opengl draws 3d things on 2d a linear function from R 3 to R 2?
@phrydo9076
@phrydo9076 5 жыл бұрын
it is linear except for the perspective divide which makes distant objects smaller. also vertices are processed as 4d homogeneous coordinates so that 3d translation can be done with matrices
@quinn4571
@quinn4571 5 жыл бұрын
Hey, i was wondering how you learned to make this. Do you use GLUT?
@Hopsonn
@Hopsonn 5 жыл бұрын
Nah glut is very outdated. Learned a lot of opengl from ThinMatrix on youtube
@quinn4571
@quinn4571 5 жыл бұрын
Hopson Thank you so much for your reply!
@quinn4571
@quinn4571 5 жыл бұрын
Hopson Can you still follow the java tutorial if you use c++?
@Hopsonn
@Hopsonn 5 жыл бұрын
@@quinn4571 Yeah, there are few differences but it is basically the same for most of the tutorial.
@quinn4571
@quinn4571 5 жыл бұрын
@@Hopsonn Thanks
@emmafm7683
@emmafm7683 5 жыл бұрын
I think the security problem with disconnect packets could be solved by using SSL instead of a plain TCP socket
@Hopsonn
@Hopsonn 5 жыл бұрын
Using Udp sockets through enet library, but other people have come up with a solution that I can check the ip address of the sender for authentication, thanks for the idea anyway though
@emmafm7683
@emmafm7683 5 жыл бұрын
@@Hopsonn not a bad idea, but keep in mind that IP addresses can be faked though. It's not as trivial but it can be done with raw sockets
@berkelunstad1508
@berkelunstad1508 5 жыл бұрын
Wait, he used reliable UDP to ensure that the packets were actually transmitted. Could he have just used TCP? Was TCP too slow or was it infeasible to use?
@chrono0097
@chrono0097 5 жыл бұрын
Yes, TCP has too much overhead, and it ensures that the packet you sent arrived at its destination, and if not, it request the packet to be resent, in a somewhat agressive manner
@SirNightmareFuel
@SirNightmareFuel 4 жыл бұрын
I wish programmer-youtubers would mention how long it took them to get their project to the current state. Can be a little demoralizing otherwise. :3
@Hopsonn
@Hopsonn 4 жыл бұрын
This one is a funky question. In theory it took about 4 months, if you include the learning I did to understand how to use networking. If you don't include that, then it would be around 16 or 17 days I think
@SirNightmareFuel
@SirNightmareFuel 4 жыл бұрын
@@Hopsonn Thank you
@xtaylor7142
@xtaylor7142 2 жыл бұрын
i want to make games, is c++ or java or c# the best option. people say C# is high level but some say c++ is the god. What should i learn. In the future i will want to make more than games so i should consider that too.
@xtaylor7142
@xtaylor7142 2 жыл бұрын
also is there any tutorials to make a voxel game like minecraft
@rader8022
@rader8022 5 жыл бұрын
You should make tutorials about how to code this, seems very interesting
@patrickconti4297
@patrickconti4297 5 жыл бұрын
Well, he explains how he does it and the code is on github
@__jan
@__jan 5 жыл бұрын
to learn C++: www.learncpp.com/ to learn OpenGL: learnopengl.com/ www.sfml-dev.org/index.php this is the library he is using to simplify much of the work, it also has a networking implementation which you can build on (they have a tutorial here www.sfml-dev.org/tutorials/2.5/) learning those things will put you on a good path to do what he's doing. trust me when i say this: learning this on your own is much better than learning through endless tutorials.
@AnsityHD
@AnsityHD 5 жыл бұрын
Feel like there's a bit much going on here to explain each line of code in a tutorial. What he's done here is very similar to what we learned in my year 2, semester 1 at uni. A basic multiplayer module, and a 3D rendering with a programmable pipeline module, and that took us 3 months to learn with a course dedicated to it. Prochy's comment above is a good starting place though, I'd advise learning one thing at a time rather than trying to create a voxel renderer and multiplayer game at the same time, if you've done neither before it'll be a very daunting task. Or using Unity for a similar project would simplify things a lot, as once you've generated the mesh it's very simple to render and don't have to learn about using OpenGL/DirectX render functions, and Unity has multiplayer support in the asset store. Good luck :)
@antonioambrosio2064
@antonioambrosio2064 5 жыл бұрын
But where exactly can i download OpenGL??In internet on this tutorial the people download SFML or/and glew/glut and similar.Is it connected to the OpenGL??
@AnsityHD
@AnsityHD 5 жыл бұрын
@@antonioambrosio2064 OpenGL(dot)org, then it's on the right of the website. You use SFML/GLEW/GLUT to use OpenGL. You might not have to download OpenGL though, I'd look for a getting started with OpenGL guide on youtube.
@4g3v
@4g3v 5 жыл бұрын
Thumbs up for the Beyond Good and Evil music!
@jwakeuplink7671
@jwakeuplink7671 2 жыл бұрын
I love the Rayman music
@thearmyofiron
@thearmyofiron 5 жыл бұрын
Nice, you're back...I use unity niw
@lionkor98
@lionkor98 5 жыл бұрын
There's obviously a lot of work that you didn't mention here, making it look easier that it is. Specifcally the gl:: namespace seems to be doing most of the work..?
@Hopsonn
@Hopsonn 5 жыл бұрын
It is a little wrapper i made for the opengl functions ye
@Drake_DSG
@Drake_DSG 4 жыл бұрын
gets to 0:57 OK... it's not that kind of night.. Going back to playing Kerbals..
@omwda2412
@omwda2412 4 жыл бұрын
Can you recommend any good tutorials on creating a 3D engine with OpenGL?
@RelyksJ
@RelyksJ 4 жыл бұрын
What is a good place to learn how to code games in c++?
Minecraft world gen sucks, so I fixed it! (C++ MINECRAFT clone)
16:30
Low Level Game Dev
Рет қаралды 8 М.
Making Enemies The RIGHT WAY
17:06
Deynum Studio
Рет қаралды 16 М.
Programming a multiplayer game from scratch in 7 DAYS
18:28
Forbidden C++
33:07
javidx9
Рет қаралды 1 МЛН
How Many Words Do You Need To Beat Scribblenauts?
37:58
Big Garf
Рет қаралды 1,1 МЛН
Minecraft Clone in C++ // Code Review
40:29
The Cherno
Рет қаралды 354 М.
I Made a Voxel Engine
10:33
Zyger
Рет қаралды 57 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 164 М.