No video

Rust For Game Development

  Рет қаралды 88,207

Gamefromscratch

Gamefromscratch

Күн бұрын

Rust is a system programming language, that attempts to solve many of the same problems that C++ does, but with a more modern approach. It's long been of interest for game developers, but last week a major studio, Ready at Dawn, announced they were ditching C++ and moving all future development to Rust.
This video takes a look at the game developer ecosystem for Rust. The last half of the video shows you how to get a rust development environment up and running using Visual Studio Code, then demonstrates installing and using the Piston game engine.
Links:
www.gamefromscr...
arewegameyet.com/
www.rust-lang....
www.piston.rs/

Пікірлер: 287
@gamefromscratch
@gamefromscratch 6 жыл бұрын
Links: www.gamefromscratch.com/post/2018/07/31/Rust-for-Game-Development.aspx arewegameyet.com/ www.rust-lang.org/en-US/ www.piston.rs/
@wiktorwektor123
@wiktorwektor123 4 жыл бұрын
If you are on Linux/MacOS you don't run radom commands from internet but you are using distro package manager and repositories.
@aldenphillip765
@aldenphillip765 3 жыл бұрын
i realize Im quite off topic but do anybody know a good place to watch newly released movies online?
@DevJeremi
@DevJeremi 2 жыл бұрын
You should update this as there is now Godot-Rust and I saw some people at Twitter using it to make games.
@GrayOlson
@GrayOlson 6 жыл бұрын
I think it's somewhat unfortunate that Piston is still seen as the primary Rust game engine... I'm quite active in the Rust game dev community and have worked on several of the game dev related projects. In reality, the two pure Rust game engines that have the most momentum at the moment are Amethyst and GGEZ. Piston's development has slowed/stalled, and its architecture is pretty hard to understand for a new developer. If you want to make a 2d game and don't want to have to fight with a big heavy engine but you do want a lot of easy built in helpers, try ggez. If you want a full featured, fast, data-driven game engine with support for 3d rendering, an ecs, and much more, try Amethyst.
@jaysanprogramming6818
@jaysanprogramming6818 6 жыл бұрын
I'm looking for a high level framework like cocos2d (sprites, tilemaps and so...), is there any (even a WIP one)? I took a look at amethyst and this seems the closest form that. What do you think?
@GrayOlson
@GrayOlson 6 жыл бұрын
GGEZ is the furthest along as far as 2d rendering utilities, however Amethyst should be getting an update soon that brings it up to/maybe even passing feature parity. Neither have baked in support for tilemaps, but it wouldn't be hard to implement in either. Amethyst's sprite support is going to be more advanced as far as supporting animation out of the box once the update I was talking about lands. Feel free to hop in the discord and ask about it :)
@alice_in_wonderland42
@alice_in_wonderland42 5 жыл бұрын
amethyst is the best one.
@_tsu_
@_tsu_ 4 жыл бұрын
You can use Godot engine with rust The bindings are there . Rust libraries compiles to Android, iOS and its gettingna GCC frontend. So it will compile to just about everything so try that.
@sdsdfdu4437
@sdsdfdu4437 4 жыл бұрын
@@GrayOlson I just looked it up and there's a Reddit thread talking about how amethyst has input delay problems, will there be an update address that?
@Lttlemoi
@Lttlemoi 6 жыл бұрын
5:23 "Move semantics that's kinda like the copy constructors" I think I just got a heart attack listening to that statement.
@wiktorwektor123
@wiktorwektor123 4 жыл бұрын
Move semantics isn't copy constructor. Move semantics in Rust it tighted to ownership of variables, thread safety and pointer safety (no invalid references and pointers). Rust doesn't have copy constructors.
@zyansheep
@zyansheep 4 жыл бұрын
@@wiktorwektor123 It has the Copy and Clone traits, which allow copying objects instead of moving them
@wiktorwektor123
@wiktorwektor123 4 жыл бұрын
@@zyansheep Yes. but hey aren't constuctors in C++ meaning.
@ekremdincel1505
@ekremdincel1505 3 жыл бұрын
@@zyansheep also Copy is always a bitwise copy, you can't overload it.
@BigPapaMitchell
@BigPapaMitchell 5 жыл бұрын
Rust actually feels like a language from the future. Curious to see where it will take us, and if it will take off
@mustafa-zv1pl
@mustafa-zv1pl Ай бұрын
It took us some where i think
@TechLord79
@TechLord79 4 жыл бұрын
For me the amazing part of Rust is that it is a modern systems-level language that could solve most (all?) of our buffer-overflow security issues for good! It has binary C-library compatibility and this should be more seen as a replacement/alternative to C/C++ that goes down to LLVM/LLDB and runs on virtually any platform. Rust is really modern in various ways and draws a lot from functional programming (FP) concepts like immutability by default, using of Result types (no billion dollar null mistake) and pattern matching capabilities. It includes unit testing, HTML help generation and source code versioning out of the box. It has the benefits of managed languages but isn't garbage-collected thus giving the necessary performance but at the cost of a much steeper learning curve to grasp ownership, borrowing, lifetimes. (However, I wouldn't say it is easy to grasp what has been done to the C++ language in the last 10+ years ...) I'm not sure, however, if Rust will play a major part in the desktop area or rival managed languages like C# a lot - with their mature UI libraries and stuff at their side. But I guess this isn't the current primary goal anyway. IMHO Rust is a modern, rock-solid way out for those who, for whatever reason, still have to deal with C/C++ code. But I understand for large code bases things are never easy. I'd also say maybe Rust is to C/C++ what F# is to C# (and they are now also bolting more and more FP concepts/syntax onto C#).
@cthutu
@cthutu 2 жыл бұрын
This is a little out of date now. I would say the most exciting engine is Bevy. Its foundations seem rock-solid. Also, you should use rust-analyzer extension, not RLS now.
@dabunnisher29
@dabunnisher29 5 жыл бұрын
I just started learning Rust, and I stumbled onto this video, and your channel. Thank you for all the great tips and links. I really like your way of presenting, especially your humor, when shit doesn't go the way you want it. It shows your humanity like NewBoston. Thank you for all your hard work.
@JeremiahT
@JeremiahT 6 жыл бұрын
Like many programmers, I have a love/hate relationship with C/C++. I'm really intrigued with Jonathan Blow's upcoming Jai. It's supposed to have the low-level capabilities and efficiency as C++ but with better compile times and more straight-forward code implementation.
@kshitijjhalak1939
@kshitijjhalak1939 6 жыл бұрын
Every third week somebody comes along with a better language than C++ and then a month later nobody knows wtf happened to it.
@ThirstyJuicebox2
@ThirstyJuicebox2 6 жыл бұрын
A Jai compiler isn’t available yet (first closed beta happening soon iirc) but what he has shown so far is really impressive.
@theministryofgeneralknowle551
@theministryofgeneralknowle551 6 жыл бұрын
Really excited for Jai. I've watched every one of his livestreams all through development, and it's shaping up to be the closest thing I could possibly imagine to a perfect systems language. Rust, Go and D were three languages he considered before writing his own, but in the end he had very good reasons for ultimately not moving to one of those, and instead rolling his own.
@kshitijjhalak1939
@kshitijjhalak1939 6 жыл бұрын
Even though both Rust and Go have been heavily promoted as C++ killer by big companies like Google and Mozilla, C++ is standing stronger than ever. So I am not at all hyped about Jai or whatever is the next big C++ killer.
@theministryofgeneralknowle551
@theministryofgeneralknowle551 6 жыл бұрын
@Kshitij Jhalak, Jai is geared more towards high performance game programmers, most of whom run into the limitations of C++ (in terms of producitivity) on a daily basis. It's not really intended as a generic C++ killer, like you described. Instead it has a very specific audience in mind.
@christobanistan8887
@christobanistan8887 5 жыл бұрын
I like Rust, but I think a higher level language is better for games so that you don't have to deal with CPU cacheing, data parallelization, and threading so directly.
@cthulhuschosen4173
@cthulhuschosen4173 6 жыл бұрын
good vid, ill have a look at rust but i might stick with c#, python and unreal blueprints. also windows defender takes next to nothing in resources on my machine(3yrs old no upgrades, somewhat decent parts) are you using a laptop? cause if yes that makes alot of sense(though i will admit it takes a heinous amount of time to get through everything on a full scan).
@redrum7851
@redrum7851 6 жыл бұрын
Haha Holy Crap, I was going to write on your previous video asking about this very thing... Lucky me. Too bad that luck couldn't be used for winning the lottery, but this will have to do. Thanks for the vid.
@Legendarior
@Legendarior 6 жыл бұрын
For and IDE for Rust, I highly recommend CLion, they added a really nice debugger for it, currently the best Rust IDE available.
@somedude4122
@somedude4122 6 жыл бұрын
It also costs money last time I checked. Fortunately rust has racer, so it's easy to add IDE like functionality to any editor
@channelnumber52
@channelnumber52 6 жыл бұрын
You don't get the debugger, but there is a Rust plugin for Intellij, that works on the community(free) edition.
@emascheg
@emascheg 6 жыл бұрын
Mostly any difference, CLion is Intellij + plugins and configured by default based in that lang. All IDE of Jetbrains born like plugin later sold when is mature
@Shpendulum
@Shpendulum 6 жыл бұрын
JetBrains' IDEs are amazing, but they all have one major flaw - they're ridiculously slow and resource heavy.
@emascheg
@emascheg 6 жыл бұрын
Yeah of course a trade off from JVM, But mostly that happens when u project start growing from mid size to big(200 files in my pc). For small or toy projects is decent enough.
@myownthoughts969
@myownthoughts969 3 жыл бұрын
Microsoft is switching from c and c++ to rust. I’m just now learning to program and I’m learning c++ so I am wondering if I’m learning a language that is going out of style. And maybe I should be learning some thing different or newer.
@thewitheredstriker
@thewitheredstriker 3 жыл бұрын
Continue learning C++. Google, another major tech company, completely stopped using Rust altogether. Microsoft is not switching to Rust. They experimented with Rust for a bit, but now they're making their own memory-safe programming language (Project Verona). That alone says enough -- if Microsoft actually liked Rust, they'd continue using it. They aren't, tho -- they're making their own language instead. I know this may sound disappointing, but experimentation is not the same as "switching". All the major companies that the Rust fans use to advertize Rust and make it look hugely adopted, like Dropbox, Amazon and Microsoft, only experimented with it. Nothing absolutely huge has been rewritten from C++ or something else to Rust, and most of the new things these companies wrote in Rust were either small tests, or smaller parts of their software (so not the whole software, only small bits) -- not large-scale products made to be used by many. The truth about Rust is that, aside from a small yet dedicated community, it's simply not taking off. Literally just last year, Mozilla admitted that Rust has a very serious adoption problem; Rust is very rarely used by companies, and there are little jobs in it. Unfortunately, I doubt this is because of Rust's young age; Go, a programming language that's barely 7 months older, exploded in popularity and sees widespread use in the industry by all sorts of companies. Unfortunately, Rust is simply not taking off, and it appears that the main factors lie within Rust itself rather than in its age. There's nothing wrong with learning Rust as a hobby if you want to, but you should NOT drop other programming languages in order to focus chiefly on Rust, since the chances you'll get employed with it alone are incredibly small, if not outright nihil. I actually detest C++ quite heavily, but I still insist you should continue to learn it if you wish to get employed in a major company. Python, Java, C#, Kotlin, Go, F#, Lua etc are also great pickups. Rust could be cool to try in your spare time, but sees almost no serious industry usage and is just not taking off, making it a rather poor fit if you're searching professional jobs.
@yokunjon
@yokunjon 2 жыл бұрын
​@@thewitheredstriker Any sources for Rust being out of favor? Microsoft developing a language doesn't count imho as it can be interpreted differently.
@thewitheredstriker
@thewitheredstriker 2 жыл бұрын
@@yokunjon I tried replying multiple times, but KZbin keeps deleting my reply. I'll plop it in a Pastebin. One sec.
@sticklebrix1756
@sticklebrix1756 7 ай бұрын
Not sure where you got the idea that Google "completely stopped using Rust altogether" when they are using it in Android, ChromeOS, Fuchsia, etc.
@Olodus
@Olodus 6 жыл бұрын
I am really exited for Rust. Since I have done quite a lot of functional programming I really like it's ML inspired parts and how it pushes a lot of good ideas from functional languages into a fast and close to the hardware programming language. I am also a strong believer that the safety guarantees it gives you at compile time is the way the industry will go forward. That being said, I'm not sure if games will be the main use of it. In games safety isn't as required and it is much more important to be ergonomic for the programmer. Because of that I do think Jai will make more of a mark in that arena. All in all I'm very glad that there are things that atleast try to compete with C++.
@vasilnszografos2231
@vasilnszografos2231 6 жыл бұрын
Can you create a series of tutorials about rust lang ?
@gamefromscratch
@gamefromscratch 6 жыл бұрын
Hard to say... Depends on two things... If I find enough time to actually jump in a learn rust well enough to teach it. Second, if there is enough interest here. Haven't really looked to see how good the existing tutorials are.
@jaysistar2711
@jaysistar2711 6 жыл бұрын
Godot supports Rust through GDNative. I don't believe there's many tutorials using C++, and I've seen none using Rust.
@SteinCodes
@SteinCodes 6 жыл бұрын
@@jaysistar2711 GDNative implementation of Rust simply sucks at this point, it's really messy and uses tons of Macros and stuff. Hope it improves soon.
@SteinCodes
@SteinCodes 6 жыл бұрын
Rust is a System Level language so Learning and getting efficient at it will and surely takes weeks or even months. Similar to how C++ takes soo long to learn from scratch, the concepts of Pattern Matching and Macros is in itself enough to make most turn their heads, but together they become the stuff of legend. And with a DataOriented design it just doesn't really get along with the mindset of OO guys smoothly. I was lucky to first learn Rust, than becoming an Object-oriented believer. That's one mindset you don't want to have. So I will say, unless GamesFromScratch is gonna spend his next few months learning Rust, there is no hope for a tutorial series, at least not one that I would want to watch.
@craigjohnson8279
@craigjohnson8279 5 жыл бұрын
Here is a series by Tensor Programming to learn Rust: kzbin.info/aero/PLJbE2Yu2zumDF6BX6_RdPisRVHgzV02NW
@shayneoneill1506
@shayneoneill1506 4 жыл бұрын
For reference, The C++17 standard is 1448 pages long, and thats a very terse document too.
@TomaszCekalo
@TomaszCekalo 6 жыл бұрын
I read a lot of good things about Rust, so it's interesting to see it in gamedev and on your channel. Anyway: Can I check out somewhere game(s?) that you made (written in any engine/language)? I like your content, but I'm interested if it's backed by something that you've made on your own. Also, are you still working on MonoGame Book?
@gamefromscratch
@gamefromscratch 6 жыл бұрын
I haven’t had the chance to work on anything of substance in years, frankly just haven’t had the time, although I’ve been tempted to dedicate some specifically in the future. Monogame book is “finished” and available in PDF free somewhere.
@Noedell
@Noedell 6 жыл бұрын
Hey Mike! Can you please do a video of your own expertise and work?
@gamefromscratch
@gamefromscratch 6 жыл бұрын
To be honest I've been at this long enough, like 8 years now, that I don't have any recent work experience. In the past though I've worked in a ton of different industries. My second gig straight out of school was making GD tools but since then I've stayed away from the industry. Used to be the pay was pretty terrible compared to other industries. Other than that I don't talk to specifically about actual companies I've worked for, for much the same reasons I don't have a linked in page or Facebook account. To a degree I value my privacy.
@Noedell
@Noedell 6 жыл бұрын
That makes perfect sense. Thanks for the reply! I love your work man! You rule!
@gamefromscratch
@gamefromscratch 6 жыл бұрын
Glad to hear it, that's why I do it! ;)
@ahuramazda9202
@ahuramazda9202 4 жыл бұрын
the best programming language for game development is only c++ , but for creating game you can using javascript and any other languages. developer , programmer and creator are three different things in the technical view. For example : unreal + bluerpints = creator. unreal + c++ = game programmer. if you can directly work on vulkan , directx or ... for creating custom shaders or any custom things = game developer.
@xGOKOPx
@xGOKOPx 4 жыл бұрын
"the best programming language for game development is only c++" And what does it have that Rust doesn't? Apart from widespread usage because that's beyond point
@askeladden450
@askeladden450 2 жыл бұрын
@@xGOKOPx custom memory allocators are a must for console games and really important for performance on any decent sized game engine, and rust's support for them is very lacking at the moment. and widespread usage isnt exactly beyond the point. why would a studio use rust instead of c++ when the latter has way more libraries out there? every new paper introducing a new rendering or ai technique is implemented in c++. widespread usage is exactly the point unless we pretend that we live in our own imaginary world.
@zytr0x108
@zytr0x108 Жыл бұрын
C is just as good
@sobanya_228
@sobanya_228 6 жыл бұрын
I was waiting for it. Also was really interested about adoption of functional programming in game development. Rust is basically a language, that comes from fp world, adopting some low-level primitives in an elegant way.
@engelsteinberg593
@engelsteinberg593 3 жыл бұрын
Rust is imperativised Haskell.
@davidwesst
@davidwesst 6 жыл бұрын
I've been learning C++ to write some libraries for Unity and other engines but have been getting continually lost in the complexity that is C/C++ programing. Seems like Rust can give me the same low level integration interface with a more modern experience. Thanks for the tip!
@hanniffydinn6019
@hanniffydinn6019 6 жыл бұрын
David Wesst stick with c++, you'll learn more and it's rock solid mature.
@davidwesst
@davidwesst 6 жыл бұрын
Hanniffy Dinn I slept on it and decided to keep going. I happen to have a few C++ developers around who said the same thing you did. Thank you Rust (for strengthening my resolve to learn C++) :)
@hanniffydinn6019
@hanniffydinn6019 6 жыл бұрын
David Wesst I've been a c++ developer early in my career and it's rock solid as ever. Every core system, like operating systems, other languages et al are and always been written in c++. They always have been and always will, it's the BRICK you use to build houses. You don't reinvent something like then brick. The other way to look at it is that it's the modern "assembly language" you won't find anything faster with such mature tool chains. Once you understand its history and how it was never designed to be "friendly" and "productive" it all makes total sense. Now he's the real meat on the bones, being a c++ developer makes you a god among men. It is a highly skilled profession that requires a serious amount of active brain cells. Rust doesn't provide anything that c++17 and modern tool chains don't. Why does a brain surgeon command high salaries and a respect ? What they do takes high skill and experience, that's why. When It comes to computer science, there is nothing higher than an experienced c++ guru ! If it was easy well everyone would be doing it. By definition systems level coding is hard and takes extreme skill. That's why you'll always command high respect and be paid enormously for your knowledge and experience. This is the main lesson of life, you need to be an EXPERT to command extremely high salaries. Trust me it's not Easy relearning to the latest standards like c++ 17. That's the point. That difficulty curve and mastery makes you a god above men. Because most programmers aren't gonna cut it. It's too hard, too much work. Well that is the point why you should be a c++ expert. Because mortals look up to fighter pilots, brain surgeons, astronauts and gold medal Atheletes. They put the effort in, and learn the craft. It's the hard smart experts that win in life and command respect at the end of the day. The more hard it is, the higher respect it commands. Just remember all core systems are still and will be written in c++, the world depends on the hard core experts to make it happen. Not mediocre people cutting corners not working with the most established standards.
@davidwesst
@davidwesst 6 жыл бұрын
Hanniffy Dinn This...this is awesome. Thanks for tip!
@johnfedoruk
@johnfedoruk 6 жыл бұрын
RON PAUL FOR PRESIDENT 2020
@UneededStudios
@UneededStudios 6 жыл бұрын
I can't covet rust's build environment when it is extraordinarily painful to use it with an existing C library, like any openAL or openGL, or Vulkan wrapper would have to. Setting up build environments on Windows is suffering.
@henfinzim
@henfinzim 5 жыл бұрын
keyword is windows
@Henrik0x7F
@Henrik0x7F 5 жыл бұрын
Rust has a lot of cool ideas and the fact that they don't need to support a 30 year old syntax certainly helps. But it's not the "death of C++" as many try to make it out. The people that hate on C++ are usually the ones that don't understand it. C++17 has quite a few features that rust still lacks. They compare decade old programs made in early C++ to fancy new rust libraries. Ofcourse modern rust is better than old C++ but once you compare it to actual modern C++ it doesn't look that much superior after all. In fact it might even look worse.
@deltagamma1442
@deltagamma1442 4 жыл бұрын
What about memory faults?
@juancarlospaco
@juancarlospaco 4 жыл бұрын
Try Nim lang, Inheritance, Templates, Z3 Static prover, preconditions & postconditions, hardened binaries, GC-less memory management, and more.
@_slier
@_slier 4 жыл бұрын
and white space sensitive..no thanks
@Nougator
@Nougator 4 жыл бұрын
I can't the piston-exemple repo
@Nirsi
@Nirsi 5 жыл бұрын
Hi. This was an exciting video, and I'm intrigued to try it out. Also, I saw your series on game engines is there a chance you will create a video about Rust game engines if there is any working out yet
@gamefromscratch
@gamefromscratch 5 жыл бұрын
There aren't really a ton available yet. I will keep an eye on development though.
@Turjak_art
@Turjak_art 4 жыл бұрын
thank you
@willnationsdev
@willnationsdev 6 жыл бұрын
Out of curiosity, what's the reason for the warning about a snake_case program name? Do the RLS tools leverage that syntax specifically for something?
@PrjctMinecraftiaFan
@PrjctMinecraftiaFan 6 жыл бұрын
I think it's just for consistency, they want code to look similar so in general it will look nicer, just like java and c# have speific ways they kind of the naming conventions to be used
@gamefromscratch
@gamefromscratch 6 жыл бұрын
Got to say I don't like style linting as a warning by default. It's confusing and arbitrary to a new developer and somewhat insulting to a devloper with more experience and their own preference.
@PrjctMinecraftiaFan
@PrjctMinecraftiaFan 6 жыл бұрын
Gamefromscratch I would disagree, learning a naming convention is not difficult, and apart from c++ I don't know any language that doesn't have a standard naming convention you should follow. It makes code more readable for new devs as well because the code looks the same
@gamefromscratch
@gamefromscratch 6 жыл бұрын
I appreciate linting, and idiomatic styles, but I don't like it being forced. I understand it, I just don't like it.
@fschutt247
@fschutt247 6 жыл бұрын
If you don't like it, you can put #![allow(non_snake_case)] at the top of your main.rs / lib.rs file to disable the warning. Golang, for example, doesn't even allow you to compile anything that doesn't follow the Golang style guides - ex. if you have unused imports, it won't compile and you can't turn that off (a choice I find pretty idiotic) and public / private visibility of functions is done using capitalization of the function name. Rust is much more configurable, you can even turn off all warnings if you want with #![allow(warnings)] or go the other way and make them compile errors with #![deny(warnings)].
@D0NU75
@D0NU75 6 жыл бұрын
sounds like something you would use to program with a bunch of men running around naked building bases
@caspronauta
@caspronauta 5 жыл бұрын
C++11 both std::move and specific r-value semantics ;)
@insertoyouroemail
@insertoyouroemail 4 жыл бұрын
www.jonathanturner.org/2016/01/rust-and-blub-paradox.html
@jaysistar2711
@jaysistar2711 5 жыл бұрын
What about Zig?
@leffivanov3127
@leffivanov3127 5 жыл бұрын
I'm waiting for Jai to be released, come on mr. Blow, I'm looking at you!) Also Kit is an interesting PL project, which should be good for GameDev, but it seems it is at very young stage and not that actively being worked at. Nim may be good at GameDev, which is much easier than Rust and has a good fine-tunable GC, too bad it doesn't get that much tracktion as Rust.
@rohansingh1057
@rohansingh1057 4 жыл бұрын
Looking at this video in 2020. The corona simulator on his desktop scares me.
@christobanistan8887
@christobanistan8887 5 жыл бұрын
For Rust devs who like an OS for their new lang, check out Redox OS.
@friedrichdergroe9664
@friedrichdergroe9664 4 жыл бұрын
You seem to spend too much time on just getting Rust installed, on getting it set up in the IDE, etc., which anyone who already knows something about Rust would have already covered. 2/3rd of the way in your video on just the preliminaries, and nothing about game development. Perhaps you should consider doing a "Getting Started with Rust" as a completely separate video so on this one you can just focus on game development already. Sorry I am being so hard here, but I find this to be a failing with not only your video, but many. Way too much time on the preliminaries, not enough on the actual subject and substance. Having said that, I note the name of your channel is "Game from scratch", so perhaps this is entirely the point??? Still.
@broganking9830
@broganking9830 5 жыл бұрын
There is also Rust tools for Godot github.com/GodotNativeTools/godot-rust . I can't imagine using it as a scripting language but would be cool to see how you could extend the Godot engine with rust. Might be a silly to thing to do as Godot is C++... I don't know, I only speculate
@natecoley160
@natecoley160 6 жыл бұрын
The only thing i hate about rust is code-style decisions, snake_case notations shortened naming, it's much harder to read this code. I'm not against snake_case, but it feels good in python, ruby and similar languages, not in c/c++ like
@skaruts
@skaruts 5 жыл бұрын
I personally like snake_case EVERYWHERE. I found having to press shift+_ is much less encumbering on my typing than shift+X, and I read the code much easier. I hate having uppercase letters in code, exceptions in class names and constants. Of course that's personal preference. Interestingly, on a related note, the Nim language isn't case sensitive and the compiler ignores underscores (though they were discussing whether to keep that or not, last I checked). So *_VarX_* is the same as *_var_x._* Has its pros and cons, but one of the pros is you can use your own style with external libs, so your entire code can be consistent with your own conventions.
@ErikCampobadal
@ErikCampobadal 5 жыл бұрын
Listen, in my experience, I tend to use snake case for variables and functions, while using camel case for types.
@openroomxyz
@openroomxyz 2 жыл бұрын
When will be Unreal rewritten in Rust or something similar than Unreal level of sophistication game engine?
@mr2octavio
@mr2octavio 5 жыл бұрын
I don't know if you would answer this but I'm starting to learn Rust and I'm looking into a good IDE for development, would you recommend the one that you used here for it? I'm using actually geany but I don't know if I'm limiting myself with it.
@gamefromscratch
@gamefromscratch 5 жыл бұрын
No personal experience with Rust, but IntelliJ seems to be the most recommended option.
@derpmarine216
@derpmarine216 5 жыл бұрын
In my experience, VS Code + one of the rls extensions is the IDE of choice.
@jaysanprogramming6818
@jaysanprogramming6818 6 жыл бұрын
Very straightforward information. Thank you for that. Since you've invested in a better microphone, maybe you could consider taking a quieter keyboard too. One with smaller keys for example. Just a suggestion though...
@garoslaw
@garoslaw 6 жыл бұрын
What are your thoughts on the D programming language?
@gamefromscratch
@gamefromscratch 6 жыл бұрын
I've only looked at it briefly in the past.
@felipeliboriooo
@felipeliboriooo 6 жыл бұрын
D is for Dead
@kawika2974
@kawika2974 6 жыл бұрын
A bit off topic, but this was recently posted from the creator of the D language: news.ycombinator.com/item?id=17712632 He's also the author of the classic wargame, "Empire".
@abiddine
@abiddine 6 жыл бұрын
You don't need the --bin flag anymore. Its the default.
@xero003
@xero003 6 жыл бұрын
I like rust and the idea behind it but even though i have "learned" it i never came around really using it. You should also checkout D (dlang.org) it has a great c,c++ layer and i heard that remedy is already using it for some of their games.
@gamefromscratch
@gamefromscratch 6 жыл бұрын
Yeah I've checked out D in the past. I seem to recall, at least when I checked, a complete lack of engines beyond language bindings to C/C++ frameworks. I am due to check it out again. I used to be a language junky, but as they are converging, I'm finding engines and frameworks much more interesting. So generally it's an interesting framework or engine that gets me to show interest in a language.
@somedude4122
@somedude4122 6 жыл бұрын
Doesn't D have GC though? That's a big no no for a bigger game
@MrGarkin
@MrGarkin 6 жыл бұрын
Cpp has a tonn of garbage collectors for your choice too. Dlang can manage memory manually on stack or heap, for your choice.
@ErikCampobadal
@ErikCampobadal 5 жыл бұрын
@@somedude4122 Nowadays, all unity games use C# and it's GC'd as well. Also, nowadays's modern C++ use a lot of GC. Shared pointers are basically refcounted GC variables
@somedude4122
@somedude4122 5 жыл бұрын
@@ErikCampobadal GCs are non deterministic. What you see in C++ is called RAII. It does induce latency, but that's not a big deal because it's deterministic. And GCs aren't a problem when scripting, which is what C# is used for. Write the main rendering engine in C# and you'll feel the effects of GC latency
@sajibsrs
@sajibsrs 4 жыл бұрын
Like for the windows defender part :p
@games4us132
@games4us132 4 жыл бұрын
i use UE and im happy
@Hoowwwww
@Hoowwwww 6 жыл бұрын
MS should focus on native compilation for C# or it'll die soon, GO replaced java and c# for servers, and now rust start to replace c++/c# for gamedev
@alanramirezherrera7485
@alanramirezherrera7485 6 жыл бұрын
Rust is not replacing C++ for game development, rust is an amazing language but it is still young and a lot of libraries are written in C++. C# (at least in .net core and .net for UWP) does have native compilation github.com/dotnet/corert
@jaysistar2711
@jaysistar2711 6 жыл бұрын
That's not compiling C#. It compiles the CLR bytecode to native. CLR IL isn't like LLVM IR: too much information from the source is lost.
@TheReferrer72
@TheReferrer72 6 жыл бұрын
Understatement of the year, all programming languages are starting to look the same ;)
@gamefromscratch
@gamefromscratch 6 жыл бұрын
It was when I was learning Swift I was thinking... why does this language exist? It's a nice enough language, but frankly it felt just like Haxe at the time. This convergence isn't always a negative, it's a natural thing to occur, but sometimes you have to scratch your head and ponder... what problem does this solve? In the case of Swift the only answer I can think of is... lock-in.
@johannes-vollmer
@johannes-vollmer 6 жыл бұрын
That's just a sign of maturity. I'm sure people from 1900 would tell you that all cars started looking the same in 2000. Just because one lacks the ability to see subtle differences between two things, doesn't mean it's all the same
@WastelandSeven
@WastelandSeven 6 жыл бұрын
Its actually not a bad thing though. Having a bunch of languages with wildly different syntax would make everyone's life harder.
@derpmarine216
@derpmarine216 5 жыл бұрын
Before I learnt Rust, I was a javascript/typescript programmer, and I was blown away by the similarity if the syntax. Rust syntax is so similar to Typescript that on quite a few programs you can copy your code into a main function, turn the types into rust types and you have a working program. although those are only simple programs, it makes Rust easy to learn for JS devs, even those that had never thought about things like memory leaks and multithreading, given that the book is there to help them with everything else.
@skaruts
@skaruts 5 жыл бұрын
@@gamefromscratch well to my humble experience, I think I can tell three or four evolutionary ramifications of programming languages: C-likes, python-likes, javascript-likes and somethinginbetween-likes. I'm not very knowledged in it, but when I look at different languages that's kinda how it looks like, and it reminds me of the evolution of spoken languages, where you have the Germanic ones, the Latin ones, and others, and they all have some similarities and a few converting points but are less noticeable due to their scale. It will be interesting to see how the programming evolution will go since the dynamics are different, as programming languages are more tightly related and used alongside each other, or complement each other, and also because esoteric languages and such may or may not influence/inspire things along the way.
@sid18i18
@sid18i18 5 жыл бұрын
visual studio code is not an IDE!! :/
@ishdx9374
@ishdx9374 4 жыл бұрын
just use godot and add gdnative modules in rust
@99zombies61
@99zombies61 5 жыл бұрын
Rust language can compete against cc++ in terms of a primary language for game development and thing is this scares c++ devs, Rust is the new kid on the block in the game and web industry.
@softwarelivre2389
@softwarelivre2389 4 жыл бұрын
Rust is very good for making kernels and microkernels, aswell as high performant applications and safe multithreaded programs without memory segfaults or garbage collectors, aswell as a perfect match with WebAssembly for speeding up web applications/electron/node/deno, but IDK if it is game ready as of today.
@Destroyer19941995
@Destroyer19941995 2 жыл бұрын
Copium
@tenminutetokyo2643
@tenminutetokyo2643 5 жыл бұрын
This crap never ends.........
@arvindramachandran0
@arvindramachandran0 5 жыл бұрын
iam also using rust.please make lots of videos on rust like this.....
@darkdavinci8730
@darkdavinci8730 5 жыл бұрын
is this for Rust survivle game?
@V0TION
@V0TION 5 жыл бұрын
No?
@thatboiaj5992
@thatboiaj5992 5 жыл бұрын
What am I doing here *whoosh*
@tonywoods1226
@tonywoods1226 6 жыл бұрын
3:58 swift is alot like python
@kawika2974
@kawika2974 6 жыл бұрын
It looks more like C to me though. One of the most obvious features of Python-like languages would be the lack of {} symbols. I think Nim would be a better example of a Python-like language: nim-lang.org/
@sebastianwardana1527
@sebastianwardana1527 6 жыл бұрын
Dog bless, I am not on Windows!
@marcoaurelioneislang891
@marcoaurelioneislang891 5 жыл бұрын
did u ever play fuking RUST?
@SqualidsargeStudios
@SqualidsargeStudios 6 жыл бұрын
never heared about that guy and his company before. to me the guy is another bald head on a picture.
@SapphFire
@SapphFire 6 жыл бұрын
"Windows Defender used to be amazing" lolwhat. anyway thanks for properly introducing this to me. I'll surely check it out.
@franciscocb94
@franciscocb94 4 жыл бұрын
LOL, Corona Simulator. (Writing this during the COVID-19 pandemic)
@soda9023
@soda9023 5 жыл бұрын
Piston is a really terrible game engine for Rust, you should try Amethyst or GGEZ, they're way better and this is sadly where most new Rust gamedevs go to, is straight to piston.
@dissonantiacognitiva7438
@dissonantiacognitiva7438 5 жыл бұрын
Windows modules installer is far worst
@Arshoon
@Arshoon 5 жыл бұрын
Get off Windows bro. Come to the Linux side and be free!
@billycrooks8401
@billycrooks8401 5 жыл бұрын
Why's Linux better?
@Arshoon
@Arshoon 5 жыл бұрын
@@billycrooks8401 Community made, no forced updates, free (as in price and in freedom), stable as hell, secure, very private (no company tracking you or collecting your data), your computer does what you want when you tell it to, fully customizable, no one installs crap on your computer without you actually telling it to, doesn't get bloated and slow over time. The list goes on.
@purpleice2343
@purpleice2343 5 жыл бұрын
With that logic you might aswell just build your own operating system. Some people prefer to install OS that works, not that has to be built over a years to be usable.
@sudoghost6687
@sudoghost6687 5 жыл бұрын
@@purpleice2343 LinuxFromScratch it's not hard to build a custom OS on linux. but i would love to see you try with windows
@purpleice2343
@purpleice2343 5 жыл бұрын
@@sudoghost6687 I'd love to see you build your own OS in general, skid.
@derimmerlacht7044
@derimmerlacht7044 5 жыл бұрын
Godot has WIP Rust bindings.
@abanoubsameh6608
@abanoubsameh6608 3 жыл бұрын
Windows and amazing don't go together.
@ilambuduri
@ilambuduri 4 жыл бұрын
just go Rust and leave C++ in Dust
@Ozweego412
@Ozweego412 6 жыл бұрын
Etcetera
@initfunction6961
@initfunction6961 2 жыл бұрын
LPOL Veloren is FOSS games written in Rust.
@G33KN3rd
@G33KN3rd 6 жыл бұрын
pure C > Rust, fight me.
@xGOKOPx
@xGOKOPx 4 жыл бұрын
Are you from the "just write memory safe code" gang? Because then there's no hope for you
@G33KN3rd
@G33KN3rd 4 жыл бұрын
@@xGOKOPx There are many guidelines to writing memory safe C code. Don't allocate memory unless it's absolutely necessary. Have a clear memory allocation policy (who allocates what, who frees what), don't use 'free' alone but a function that takes a double pointer that can free the original pointer and then set it to NULL. Also, don't forget that C has Boehm's garbage collector.
@xGOKOPx
@xGOKOPx 4 жыл бұрын
So yes, you think that "just write memory safe code" is the solution. Now go to your imaginary world where people just do that. > Also, don't forget that C has Boehm's garbage collector. The specific reason why things in Rust are the way they are is to have a memory safe language without a GC
@G33KN3rd
@G33KN3rd 4 жыл бұрын
@@xGOKOPx No, it's not an imaginary world. You can actually write memory safe code in C. It's not a language that just magically becomes unsafe. Rust is memory safe on the surface level as it uses a static analyzer; in fact the whole language is based on the static analyzer. By this logic, C++ is also memory safe without a GC. I want you to show me how you write C code. Just something of a quick example to explain what you mean?
@xGOKOPx
@xGOKOPx 4 жыл бұрын
Yes, it is an imaginary world. If it's so simple to stop writing memory safety bugs then how come they're so common? Microsoft estimated that 70% of all the bugs in Windows are memory safety bugs. Yes, getting rid of them is as "simple" as adhereing to a few relatively simple rules. That's what you gotta do in Rust for the compiler to stop screaming at you. Getting people to actually obey these rules in all cases is a different thing.
@AndyU96
@AndyU96 6 жыл бұрын
Sounds suspicious in a manner that makes me think you guys are trying to shift the market to rust by purpose. But I dont really see how doong so would benefit you or the owners of RUST, so go easy on me if you're going to reply to this
@softwarelivre2389
@softwarelivre2389 4 жыл бұрын
Rust is an interesting language because of some of its core principles, such as memory and multithreaded safety and easy to build projects, and those really help a lot for low level stuff. Also it is very good for the web, because Rust resembles a lot Typescript, so it is easier to make WebAssembly scripts using Rust to speedup your JS/TS application. Actually this is how the whole Rust thing started, with Mozilla trying to speedup Firefox rendering engines through multithreading, which was really hard to do in C/C++, but much easier in Rust. So that contributes a lot for the hype around the language. But yeah it is a good language and has some pretty neat use cases.
@n00bc0de7
@n00bc0de7 6 жыл бұрын
While C++ has had many additions, the core of C++ is still pretty solid. I don't see why anyone would replace C++ with Rust.
@johannes-vollmer
@johannes-vollmer 6 жыл бұрын
n00b c0de what do you mean with solid core? The C part of C++?
@n00bc0de7
@n00bc0de7 6 жыл бұрын
Johannes Vollmer I mean C with classes like how it was originally invisioned.
@WastelandSeven
@WastelandSeven 6 жыл бұрын
n00b c0de ~ I think the core of the problem is not that C++ is bad, its just accumulated so much legacy cruft its not as efficient as it could be.
@n00bc0de7
@n00bc0de7 6 жыл бұрын
Wasteland Seven I'm not saying it hasn't been booged down by cruft over time. But depending on your compiler you could just disable alot of it. I personally just hate what so many modern languages are doing. They all force this object paradigm that tries to simplify your code but it restricts you from structuring your code how you want.
@GrayOlson
@GrayOlson 6 жыл бұрын
"They all force this object paradigm that tries to simplify your code but it restricts you from structuring your code how you want." Rust doesn't have Objects and is not object oriented.. in fact, that is C++. Rust uses Traits to offer composability rather than the object-oriented style inheritance.
@exnihilo6059
@exnihilo6059 6 жыл бұрын
i do not have a cargo run task. I have a cargo run debug.
@derpmarine216
@derpmarine216 5 жыл бұрын
ExNihilo `rustup update`
@distrologic2925
@distrologic2925 5 жыл бұрын
Jeez relax. Go easy on the speaking buddy.
@samghasemi488
@samghasemi488 4 жыл бұрын
I want rust sfml😭😭😭🥺
@xGOKOPx
@xGOKOPx 4 жыл бұрын
It's a thing
@samghasemi488
@samghasemi488 4 жыл бұрын
@@xGOKOPx no i want rust sfml tutorials :)
@maciejbacal5562
@maciejbacal5562 6 жыл бұрын
Rust is awful for fast prototyping, which is what you'll mostly be doing as a game developer outside of writing your core engine systems.
@SaHaRaSquad
@SaHaRaSquad 6 жыл бұрын
The same could be said about C++, and still that's used for every serious game (engine) out there. Scripting is another topic completely.
@JustPingo
@JustPingo 6 жыл бұрын
Once you are used to the language, prototyping really isn't that hard, especially if you use a fully featured engine. But while the Amethyst game engine is written in Rust, its scripting API currently being designed is fantastic. It'll support any programming language without any tradeoff in performance (beside the speed of the language itself, of course, but LuaJIT for example is almost as fast as "native" languages).
@maciejbacal5562
@maciejbacal5562 6 жыл бұрын
No, C and C++ are fast prototyping langauges. They compile fast, and don't get in your way, which is what you can't say about Rust. Now, if you write terrible OOP code, use templates every chance you get, and compile with an IDE like Visual Studio, then yes, it's not a pleasant experience, but that's your fault.
@Dunoid
@Dunoid 6 жыл бұрын
In what universe is C++ considered to have fast compile times? This isn't a knock on the C++ compiler writers, they're some of the best at what they do, but the complexity of the language and heavy emphasis on text-replacing macros and header files makes the compilation process one of the slowest among professionally-used programming languages.
@maciejbacal5562
@maciejbacal5562 6 жыл бұрын
Dunoid If you overuse features that impact compilation times that’s on you. I’d love to know what sort of garbage do you produce to make your C++ code take longer time to compile than other languages.
@Liam-pf7ih
@Liam-pf7ih 5 жыл бұрын
rust binding for raylib: github.com/deltaphc/raylib-rs
@Bobtheconqueror42
@Bobtheconqueror42 3 жыл бұрын
when he said c++ is the most complicated language out there i thought he meant to write. if ur talkin bout high level languages idk, i only have experience with c based languages, python, and javascript, but if ur talkin bout any language i garante any asm is going to be way more complicated
@ekremdincel1505
@ekremdincel1505 3 жыл бұрын
He meant the complexity of the language, assembly is not a complex language at all. Most of the instructions are easy to understand.
@not_herobrine3752
@not_herobrine3752 Жыл бұрын
keeping up with all of c++'s features coming out every year or so is a nightmare, the knowledge learnt while learning asm will be applicable for pretty much forever
@hellishinc
@hellishinc 6 жыл бұрын
Windows, not even once.
@prezadent1
@prezadent1 6 жыл бұрын
PC gaming is a thing because of Windows, sorry to break it to you.
@kshitijjhalak1939
@kshitijjhalak1939 6 жыл бұрын
Windows hater.
@derpmarine216
@derpmarine216 5 жыл бұрын
and that is why i have to dual boot windows/fedora.
@xGOKOPx
@xGOKOPx 4 жыл бұрын
@@prezadent1 Lmao dude. It's not a thing because of Windows, if another operating system was as popular and dominant as Windows is then all the games would be there. And if you're wondering why is Windows so dominant then you can thank Microsoft money
@MrGarkin
@MrGarkin 6 жыл бұрын
Dlang is so much more suited for game development.
@AuditorsUnited
@AuditorsUnited 3 жыл бұрын
this didnt age well c# is dominate and unity3d is dominate
@bobdero9883
@bobdero9883 6 жыл бұрын
Rust's syntax is horrible, no interest at all
@truebitoy1597
@truebitoy1597 6 жыл бұрын
Any programming languages' syntax is horrible to the untrained eye, you just need to get used to it, and then you will appreciate the design and understand why they chose such design over the rest.
@alanramirezherrera7485
@alanramirezherrera7485 6 жыл бұрын
Rust syntax is beautiful, only a bit different to C/C++ syntax
@SaHaRaSquad
@SaHaRaSquad 6 жыл бұрын
Rust's syntax is very elegant, it can just look complicated in some cases. But stuff like the pattern matching is far ahead of most other languages. It's like switch-case but not shit.
@tuirfghfhg1787
@tuirfghfhg1787 6 жыл бұрын
let me guess, you find Golang's syntax is elegant, don't you?
@johannbauer2863
@johannbauer2863 5 жыл бұрын
That was what I thought, when I saw it at first, but now I really like Rust ^^ (And I miss the match expression from Rust or Haskell in other languages like JS or Python T.T)
@nnaaaaaa
@nnaaaaaa 6 жыл бұрын
rust feels like it learned all the wrong lession from javascript's ecosystem and took all the worst syntax from C++, tacked on some trendy buzzwords and made a new language. i tried to like rust but i just can't do it.
@xGOKOPx
@xGOKOPx 4 жыл бұрын
Care to elaborate?
@blunderchips
@blunderchips 6 жыл бұрын
JAVA
@WastelandSeven
@WastelandSeven 6 жыл бұрын
OK...what about Java?
@alanramirezherrera7485
@alanramirezherrera7485 6 жыл бұрын
Huh?
@HerbertLandei
@HerbertLandei 6 жыл бұрын
Kotlin
@Shpendulum
@Shpendulum 6 жыл бұрын
+Wasteland Seven it's shit.
Game Development in the Go Programming Language
12:56
Gamefromscratch
Рет қаралды 40 М.
Rust: When C Code Isn't Enough
8:26
CodeAhead
Рет қаралды 158 М.
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 52 МЛН
The Joker saves Harley Quinn from drowning!#joker  #shorts
00:34
Untitled Joker
Рет қаралды 71 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 20 МЛН
Rust for Game Development -- Game Engines & Frameworks
12:58
Gamefromscratch
Рет қаралды 62 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 303 М.
Is It Time to Rewrite the Operating System in Rust?
1:09:18
InfoQ
Рет қаралды 302 М.
Why i think C++ is better than rust
32:48
ThePrimeTime
Рет қаралды 297 М.
BEVY Rust Game Engine -- My Fav Yet!
17:30
Gamefromscratch
Рет қаралды 78 М.
Rust Async Programming in 2018 • Katharina Fey • GOTO 2018
38:10
GOTO Conferences
Рет қаралды 32 М.
So you want to make a Game Engine!? (WATCH THIS before you start)
14:39
Giant Sloth Games
Рет қаралды 293 М.
4 Billion If Statements | Prime Reacts
9:47
ThePrimeTime
Рет қаралды 608 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 942 М.
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
SavvyNik
Рет қаралды 173 М.
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 52 МЛН