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

  Рет қаралды 222,955

Hopson

Hopson

Күн бұрын

In this new series, we will be creating a voxel multiplayer minecrafty cloney clone from the ground up using C++ and OpenGL, with some libraries for support such as SFML and ENET.
=========
SOURCE CODE: github.com/Hop...
=========
RESOURCES:
Going 3D:
ogldev.atspace....
ogldev.atspace....
Client and Server Connection - gafferongames....
=========
MUSIC USED:
Donkey Kong Country - In A Snow-Bound Land - • Video
Rayman 1 - Betilla The Fairy
Donkey Kong Country - Forest Interlude
Rayman 1 - Bandland Theme
Beyond Good And Evil - Home Sweet Home - • Beyond Good and Evil S...
Rayman 1 - Bonus Level Music
Ratchet and clank - Wupash Nebula
Chrono Trigger - Winds That Cross Time
=========================================
LINKS:
GitHub: github.com/Hop...
Discord Server: / discord
Support me on Patreon: / hopson
Follow me on Twitter: / hopson1997
Follow me on Twitch: / hopsonn
Community Channel:
/ @hopsoncommunity8184

Пікірлер: 487
@dr_atheist4272
@dr_atheist4272 4 жыл бұрын
Still a more reliable uploader than Code Bullet.
@iced-imran1247
@iced-imran1247 4 жыл бұрын
}:^
@tsalVlog
@tsalVlog 4 жыл бұрын
Yeah, but opengl is 1998-tastic.
@microman502
@microman502 4 жыл бұрын
Hey, he's not... well... I guess you ARE right.
@OpenKeith
@OpenKeith 4 жыл бұрын
@@tsalVlog you say that like it's a bad thing
@skepticmoderate5790
@skepticmoderate5790 4 жыл бұрын
@@tsalVlog What are you talking about? 90% of 3D games made today use OpenGL.
@willful759
@willful759 4 жыл бұрын
finally, we are getting hopsoncraft
@Affax
@Affax 4 жыл бұрын
I made my own multiplayer game, and I can feel the pain with making good networking---
@GamingBlake2002
@GamingBlake2002 4 жыл бұрын
9:48 "Reliable UDP sockets" So... TCP sockets?
@Hopsonn
@Hopsonn 4 жыл бұрын
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 4 жыл бұрын
@@Hopsonn So the protocol he used was basically TCP minus the congestion control?
@MINIMAN10000
@MINIMAN10000 4 жыл бұрын
@@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 4 жыл бұрын
@@MINIMAN10000 networking is a dragon you cannot see, but witness the effects of everyday
@whiitehead
@whiitehead 4 жыл бұрын
"Strawberry flavoured candies" So... strawberries?
@marmoripelaao9830
@marmoripelaao9830 4 жыл бұрын
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.
@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
@stacklysm
@stacklysm 4 жыл бұрын
I ALMOST HAD A HEART ATTACK SEEING THIS UPLOAD
@David-nn1cf
@David-nn1cf 4 жыл бұрын
"Hmm maybe making my own engine with OpenGL would be fun" *Sees video* I think I'll stick to unity
@lupinedreamexpress
@lupinedreamexpress 4 жыл бұрын
You're part of the problem then.
@MrHatoi
@MrHatoi 4 жыл бұрын
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 4 жыл бұрын
@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 4 жыл бұрын
OpenGL is on mac, Apple just stopped updating it beyond 4.1.
@LuukDomhof
@LuukDomhof 4 жыл бұрын
@@lupinedreamexpress How is using Unity to create games a problem? Many amazing games are powered by it.
@mantasarmalys6471
@mantasarmalys6471 4 жыл бұрын
Amazing video ! Can't wait for the next part !
@Mechobree
@Mechobree 4 жыл бұрын
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!
@alessi4249
@alessi4249 4 жыл бұрын
Dude! I watched your original videos and decided to make a voxel multiplayer game in JavaScript using webrtc great vid!
@voyagerjs
@voyagerjs 4 жыл бұрын
Holy shit, the Ratchet and Clank music!!! You have some good taste my man, also one of the best tracks as well!
@firepro20
@firepro20 4 жыл бұрын
Really great video, explains the core functionality and how it works for people learning SFML. I wish I knew about ENET before! Really cool.
@johannesk.5039
@johannesk.5039 4 жыл бұрын
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. ^^
@Rob-hm4jx
@Rob-hm4jx 4 жыл бұрын
Hytale: "Let's kill Minecraft!" Hopson: "Let's kill Hytale"
@Otakufreak26
@Otakufreak26 3 жыл бұрын
I wish you go more in depth on these topics. This is all interesting stuff.
@barry_crisp
@barry_crisp 4 жыл бұрын
Hey! Glad your back, can't wait for the next episode.
@seditt5146
@seditt5146 4 жыл бұрын
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.
@m4rt_
@m4rt_ 10 ай бұрын
remember to normalize the player movement vector so that the player doesn't move faster when walking diagonally
@kowladMC
@kowladMC 4 жыл бұрын
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 ?
@FICHEKK
@FICHEKK 4 жыл бұрын
I am interested in why didn't you just use TCP for sending chunk data from server to client?
@lenonkitchens7727
@lenonkitchens7727 4 жыл бұрын
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 4 жыл бұрын
Lenon Kitchens I believe most games use UDP for things like position, but also TCP for important parts.
@Davi-c4q
@Davi-c4q 4 жыл бұрын
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 4 жыл бұрын
​@@lenonkitchens7727 In the case of chunk data TCP should be used though because it's important that all data is received correctly.
@lenonkitchens7727
@lenonkitchens7727 4 жыл бұрын
@@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.
@_lapys
@_lapys 4 жыл бұрын
Love your videos, man
@WangleLine
@WangleLine 4 жыл бұрын
Same here. Hopson makes great, great videos~
@redandcyanpower
@redandcyanpower 4 жыл бұрын
Good to see you back again (:
@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!
@theears995
@theears995 4 жыл бұрын
Amazing as always!
@dominiklukacs7677
@dominiklukacs7677 4 жыл бұрын
What the heck?? I just wanted to try to make a voxel game in c++ but didn't know where to start!
@fbob987
@fbob987 4 жыл бұрын
Our saviour has returned!
@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.
@bobisnotaperson
@bobisnotaperson 4 жыл бұрын
The real C++ minecraft. Also minecraft chunks are 16*256*16
@benjaminmiddaugh2729
@benjaminmiddaugh2729 4 жыл бұрын
MineTest (and other related projects) might have something to say about that.
@mattwhelan13
@mattwhelan13 4 жыл бұрын
this music makes me want to jump back into pink plant woods, is it not copyrighted?
@pkmnman13456
@pkmnman13456 4 жыл бұрын
I barely understand this but it's still interesting
@aaron6807
@aaron6807 2 жыл бұрын
09:53 Why didn't you use a TCP library?
@thearmyofiron
@thearmyofiron 4 жыл бұрын
Nice, you're back...I use unity niw
@powerclan1910
@powerclan1910 4 жыл бұрын
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?
@niktedig853
@niktedig853 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
@@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 4 жыл бұрын
@@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.
@Disk_C
@Disk_C 4 жыл бұрын
Как посмотрел видео от БУЛДЖАТЬ о Вангерах, как сразу пошли Воксели и мемы о них
@necroette
@necroette 4 жыл бұрын
OH HELL YEAH BABY, HE IS BACK!!!!!
@raduhabinyak6860
@raduhabinyak6860 4 жыл бұрын
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
@samhsmith
@samhsmith 4 жыл бұрын
Security on those sockets man. All it takes is one message from a client with a different id and you can kick other players. EDIT: haha just hit play and you said exactly that
@RydPodoJosh
@RydPodoJosh 4 жыл бұрын
nice ratchet and clank music
@Mattdokn
@Mattdokn 4 жыл бұрын
ohh shit here we go!
@Kitulous
@Kitulous 4 жыл бұрын
YES! The dreams have come true!
@bellamycat9800
@bellamycat9800 4 жыл бұрын
use can you using namespace sf;
@Hopsonn
@Hopsonn 4 жыл бұрын
I could but that's not really what I want to do, it should be clear where functions and objects are coming from, plus that would likely end up with name conflicts as
@n.ryuudakku4916
@n.ryuudakku4916 4 жыл бұрын
boy!, im trying to do this in java lwjgl with greedymeshing, i´ve already done the meshing, i hope to see more of this!
@platin2148
@platin2148 4 жыл бұрын
Maybe take a look at stb voxel.
@titanovsky
@titanovsky 4 жыл бұрын
This is amazing.
@motsgar
@motsgar 4 жыл бұрын
Cool project, loved the minecraft in a week one! Btw if anyone knows how to solve this problem i have been stuck on for 2 i would love to know. I have object a and b, object a can be anywhere in the world but object b is a child of object a. Object a has a rotation too and i would need to calculate the world position of object b what has a offset from object a.
@lonsdaleitepolitics9597
@lonsdaleitepolitics9597 4 жыл бұрын
What do you mean by "object b is a child of object a"? Do you mean its position is defined relative to object a?
@motsgar
@motsgar 4 жыл бұрын
@@lonsdaleitepolitics9597 yes
@lonsdaleitepolitics9597
@lonsdaleitepolitics9597 4 жыл бұрын
​@@motsgar How is it defined relative to object a, exactly? Is it defined based off a distance from a given face which can be rotated? EDIT: I gave a solution for the face case, but it was wrong. If it's just the absolute distance from the centre of object a, then you can take object a's world position and sum the relative positional data.
@motsgar
@motsgar 4 жыл бұрын
@@lonsdaleitepolitics9597 Think it as a normal parent child system like in blender. In short alculate the world position of a child object.
@motsgar
@motsgar 4 жыл бұрын
@@lonsdaleitepolitics9597 i know the sum trick but i have to take acount the rotation of the parent object/object a
@MrDarkNewt
@MrDarkNewt 4 жыл бұрын
this is great thank you!
@xriccardo1831
@xriccardo1831 4 жыл бұрын
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 4 жыл бұрын
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
@jhobted2058
@jhobted2058 4 жыл бұрын
Wait, how tf people commented on this video before it was posted?
@Julio974
@Julio974 4 жыл бұрын
Maybe it was unlisted for a few days, and it was just made public
@WangleLine
@WangleLine 4 жыл бұрын
Patreons get to watch the videos a bit early!
@plasmarifle4936
@plasmarifle4936 4 жыл бұрын
Keep going!
@jacobhaig2372
@jacobhaig2372 4 жыл бұрын
Why not just use TCP connections? Its not like you need a 60 hz server or anything..... even if there is a small delay in the connection, TCP makes sure that the server will get the data.
@mr.unkreativ718
@mr.unkreativ718 4 жыл бұрын
Why do you user UDP instead of TCP?
@jimothyus
@jimothyus 4 жыл бұрын
Mr. Unkreativ i might be wrong but i think udp is faster and smaller packets so i guess better for performance
@among-us-99999
@among-us-99999 4 жыл бұрын
It’s faster and TCP would be kind of overkill
@rorka1252
@rorka1252 3 жыл бұрын
What area of ​​mathematics you need to know for this?
@Hopsonn
@Hopsonn 3 жыл бұрын
An understanding of coordinate systems and vector maths is all you really need, there exists maths libraries that take care of most the nitty gritty for you Eg I'm using glm
@rorka1252
@rorka1252 3 жыл бұрын
@@Hopsonn thanks for the answer
@Blacksmith__
@Blacksmith__ 4 жыл бұрын
I have no idea what I'm talking about but having the client request updates from the server every frame seems like another exploitable security risk. Client could spoof requests much faster than the actual framerate resulting in a primitive denial of service attack. Server should have its own tick rate and any requests from the client which exceed the frequency of the server tick rate should be discarded.
@Hopsonn
@Hopsonn 4 жыл бұрын
I have no idea what I am talking about as well lol, very new to this (First time) when I made this video
@alexmercerind
@alexmercerind 4 жыл бұрын
Is it possible to get this in python. I only know that. I opted for python as a subject in my school. I learnt basic PyQt5 and tkinter myself.
@Hopsonn
@Hopsonn 4 жыл бұрын
Yes it is certainly possible and probably somewhat easier to do, at the cost of lesser performance
@Hopsonn
@Hopsonn 4 жыл бұрын
(That is if you asking if this could be recreated using python)
@alexmercerind
@alexmercerind 4 жыл бұрын
@@Hopsonn Oh wow😃! Thanks a lot for your reply. It made my day. Didn't expect that. But after seeing your video, I'm really going to try it no matter how long it takes.
@alexmercerind
@alexmercerind 4 жыл бұрын
@@Hopsonn I understood.
@alexmercerind
@alexmercerind 4 жыл бұрын
I saw your minecraft old project aswell! You are really the guy, one should learn from.
@user-zn6xl7bx1s
@user-zn6xl7bx1s 4 жыл бұрын
I always develope in C++-, I mean `plus plus minus` is just way better than `plus plus`.
@viruzaum
@viruzaum 3 жыл бұрын
music too loud
@seanjhardy
@seanjhardy 4 жыл бұрын
Damn this is cool
@unknownunknown9160
@unknownunknown9160 4 жыл бұрын
Hmmm, the client shouldn’t just be able to broadcast their position but the direction. The server should be the one running the logic and calculating the actual positions for the players. Also, maybe instead of client IDs being numbers they should be some kind of long string ID so it’s harder to guess
@koktszfung
@koktszfung 4 жыл бұрын
combining blocks into a single mesh doesn't seem so efficient if you have caves...
@Hopsonn
@Hopsonn 4 жыл бұрын
How come? I guess you mean you will be rendering caves even if you are above ground, but there even exist optimizations around this :) tomcc.github.io/2014/08/31/visibility-1.html
@enrott8560
@enrott8560 Жыл бұрын
okay so this is what i have so far. main.cpp #include using namespace std; int main() { cout
@rehatsingh456
@rehatsingh456 3 жыл бұрын
3:55 haha got ur IP address /s
@smuecke
@smuecke 4 жыл бұрын
Rayman 1 music
@SDFTDusername
@SDFTDusername 4 жыл бұрын
ye
@LenteC
@LenteC 4 жыл бұрын
:D finally :)
@edsome
@edsome 4 жыл бұрын
me: I’ve just finished a 500+ lines C# application, let’s look for the new challenge. also me: WTF
@VictorRodriguez-zp2do
@VictorRodriguez-zp2do 4 жыл бұрын
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 4 жыл бұрын
how do you learn so fast? :/
@jimothyus
@jimothyus 4 жыл бұрын
Justin X. By doing
@VictorRodriguez-zp2do
@VictorRodriguez-zp2do 4 жыл бұрын
@@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 4 жыл бұрын
That happened
@tunis4
@tunis4 4 жыл бұрын
@@Cal97g Why wouldn't that happen?
@Gizego
@Gizego 4 жыл бұрын
We missed you
@randomguy4738
@randomguy4738 4 жыл бұрын
ikr
@Nugcon
@Nugcon 4 жыл бұрын
same
@xiaoshou6752
@xiaoshou6752 4 жыл бұрын
Yes we did, truly!
@itheivoidi9151
@itheivoidi9151 4 жыл бұрын
No
@JackTheOrangePumpkin
@JackTheOrangePumpkin 4 жыл бұрын
We missed you a lot
@beron_the_colossus
@beron_the_colossus 4 жыл бұрын
Oh my, it's happening!
@lilcatfriend4575
@lilcatfriend4575 4 жыл бұрын
You know you're godlike when you refer to the internet as "some network"
@commiechar
@commiechar 3 жыл бұрын
but... that’s what it is
@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
@TRMrStone
@TRMrStone 4 жыл бұрын
If you should get famous with this, I was since beginning here :]
@OliverStro
@OliverStro 4 жыл бұрын
Awesome, loved these videos can't wait for this series.
@sverre1734
@sverre1734 4 жыл бұрын
The legend is back
@ChupachuGames
@ChupachuGames 4 жыл бұрын
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
@Testbot379
@Testbot379 3 жыл бұрын
Idk why but why seeing these type of videos are SOO satisfacting
@greenthefirst
@greenthefirst 4 жыл бұрын
I love this, can't wait for the next episode
@internetwanderer9053
@internetwanderer9053 4 жыл бұрын
It would be nice if someone added (english) subtitles. English is not my first language and it is hard to keep up with what you say, especially when you are explaining complex problems.
@Twat2024
@Twat2024 4 жыл бұрын
Whats ur main language?
@alex95sang52
@alex95sang52 4 жыл бұрын
@@Twat2024 I think English subtitles would be nice
@internetwanderer9053
@internetwanderer9053 4 жыл бұрын
@@Twat2024 Polish. Witaj kolego z internetu :)
@smeggmann99
@smeggmann99 4 жыл бұрын
@@internetwanderer9053 siema
@rader8022
@rader8022 4 жыл бұрын
My main language is not english too, but try to understand what he says based on the context
@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
@iProgramInCpp
@iProgramInCpp 4 жыл бұрын
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.
@fearlesswee5036
@fearlesswee5036 4 жыл бұрын
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 4 жыл бұрын
Mine test is awesome and is one of my main motivations to creating this, it's just always fun to create it yourself :)
@IKTeam
@IKTeam 4 жыл бұрын
Let's Code is not when you do Step 1: Make your OpenGL engine like you do it everyday Step 2: Program client-server architecture just like I showed you on a picture. Because it's so easy Step 3: Profit!
@_zEuS0390_
@_zEuS0390_ 4 жыл бұрын
I'm currently studying networking (cisco) and this video is amazing! I just realised that it could be used in developing multiplayer games.
@olasoderlind5685
@olasoderlind5685 4 жыл бұрын
make the 0=any and 1=air in the future mabe you want to ( like world Edit ) but in clipbords you be locked to blocked clips . [ if you not a 0 as any( or wont be updated) not updating the world where inpased and 1 replace wiht air ] 002200 021120 002200 so 0 is what efer and 2 is grass and 1 is air where 0 is
@ip0x945
@ip0x945 4 жыл бұрын
Make a stream. I would love to see this being made live
@rader8022
@rader8022 4 жыл бұрын
You should make tutorials about how to code this, seems very interesting
@patrickconti4297
@patrickconti4297 4 жыл бұрын
Well, he explains how he does it and the code is on github
@__jan
@__jan 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
@@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.
@raduhabinyak6860
@raduhabinyak6860 4 жыл бұрын
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
@MenacingPerson
@MenacingPerson 4 жыл бұрын
Hey hopson make a good ripoff of minecraft that has everything.
@noellelavenza494
@noellelavenza494 4 жыл бұрын
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!
@stylextv
@stylextv 4 жыл бұрын
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 4 жыл бұрын
simply: no, since there are methods used to authenticate that only you can send packets with your client id
@amp8240
@amp8240 4 жыл бұрын
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 4 жыл бұрын
@@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 4 жыл бұрын
@@stylextv "everyone on the server with just one packet" conveys a different message but ok
@dekrain
@dekrain 4 жыл бұрын
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
@MagoLP
@MagoLP 4 жыл бұрын
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 2 жыл бұрын
is it finished yet? what is the progress
@MagoLP
@MagoLP 2 жыл бұрын
@@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.
@boweneveritt3400
@boweneveritt3400 4 жыл бұрын
Where did you learn C++?
@logannance10
@logannance10 4 жыл бұрын
Great video. I'd love to see one using Vulkan.
@KoKoKen
@KoKoKen 4 жыл бұрын
happy to see another one of your videos
@balistik4901
@balistik4901 4 жыл бұрын
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.
@Xgamesvidoes
@Xgamesvidoes 4 жыл бұрын
Awesome!
@feathersm7966
@feathersm7966 4 жыл бұрын
Another dope video ty hopson
@portalblend7527
@portalblend7527 4 жыл бұрын
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 ;)
@PaprikaYT
@PaprikaYT 4 жыл бұрын
Third
@huskerdev
@huskerdev 4 жыл бұрын
Literally no one: Python developer when sees more than 15 lines of code: **Scared screams**
@qwerasdfhjkio
@qwerasdfhjkio 4 жыл бұрын
"developer"
@default632
@default632 4 жыл бұрын
You dont need the no one part of your meme
@tilengasparic6765
@tilengasparic6765 4 жыл бұрын
My dumb-ass a couple years ago: wanting to flex on my 8th grade classmates so I make a quiz in python that has 1k+ lines of code (most of it was copy-paste but still)
@frigtear4460
@frigtear4460 4 жыл бұрын
@@tilengasparic6765 how do manage to make a quiz 1000 lines long?
@tilengasparic6765
@tilengasparic6765 4 жыл бұрын
@@frigtear4460 I didn't know how to programme for shit so it was all un-organised and I had ~15 questions so I had to open 15 new windows. and once I made 1 question I just copy-pasted it 15 times and changed the text
I programmed Minecraft from scratch... again.
11:44
jdh
Рет қаралды 589 М.
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 11 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 10 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 16 МЛН
How One Man Hacked Hypixel...
15:15
TGWaffles (Thomas)
Рет қаралды 4 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
Minecraft world gen sucks, so I fixed it! (C++ MINECRAFT clone)
16:30
Low Level Game Dev
Рет қаралды 7 М.
RETRO VOXEL ENGINE! // Code Review
36:18
The Cherno
Рет қаралды 179 М.
Minecraft's "Useless" Features
19:29
isloths
Рет қаралды 315 М.
Running "Hello World!" in 10 FORBIDDEN Programming Languages
18:07
Recreating Noita's Sand Simulation in C and OpenGL | Game Engineering
10:03
Bedrock. Why?!
22:37
FundyLIVE
Рет қаралды 428 М.
I made an EVEN BETTER Minecraft
12:30
SimonDev
Рет қаралды 328 М.
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 11 МЛН