Go has two answers to inheritance: Interfaces and encapsulation. You can define a struct, say "Sprite", and then you can define another struct, say "Player" that contains a Sprite. It inherits all the functionality of a Sprite, but can override functions if necessary. Combined with the heavy leaning on interfaces, and you have similar capabilities to inheritance.
@konradpiotrowski95496 күн бұрын
This is exactly what I wanted to write as soon as I heard him talking "no inheritance" 🙌
@ForeverZer06 ай бұрын
I love Go, and game-dev is my passion, so naturally I also combined these two, but found the language to be a detriment as the game complexity grew. I went a slightly different route of using my own OpenGL/OpenAL/GLFW, bindings instead of raylib, though raylib is essentially a wrapper of those anyways, so a similar experience. I found Go was fantastic for 2D, especially with its ease of parsing Tiled (TMX) docs, and a relatively low amount of math. Once I went 3D and started designing a voxel-based Minecraft clone, things started falling apart. The lack of 32-bit float hardware instructions, no way to control alignment of vector types for SIMD, etc. begin to make using Go a slog. I have been writing Zig for the past few months, and found to be fantastic for game-dev, might be worth checking out if you are interested.
@sameer-fs2ot6 ай бұрын
most games I make are just that - little things that don't push the boundaries of any device they'll run on. Been toying with raylib-go and wasm4. Honestly I need more Go gamedev! Thanks for sharing :D
@spodarman38236 ай бұрын
Yes pls! I definitely want a golang game dev tutorial series. but please also focus on the game architecture aspects of it too and how different problems are tackled in game dev in general. im kinda stuck on collision detection part in a basic little platformer im developing, anyways, great video! love to see people using golang
@codingwithsphere6 ай бұрын
I like to modularize my tutorials to be concept-based as much as possible. I plan on making an RPG tutorial for ebitengine (go's most popular game framework). Even though the game format is different, the collision system for both (AABB and axis aligned tiles) is very similar!
@SublimeCS6 ай бұрын
Yes please on the Ebitengine series! There are very little resources on Go as a game dev language even though it's such a joy to work with. I've been learning Ebitengine these past few days and it's been a blast! So please do!
@soupforare5 ай бұрын
signed
@Bhanukamax2 ай бұрын
Great video! I decided to do some raylib + go stuff inspired by this video. And I also started watching your ebitengin playlist to learn the basics of game dev in go, and trying to translate that to raylib. I think still there’ll be an audience for raylib go series too.
@mogurt6 ай бұрын
I'd love to see a Go game dev tutorial. I find building a game is a fun way to learn a new language + always wanted to learn Go!
@Ahmed-ru6kj6 ай бұрын
GoLang Game Dev Tutorial Series would be awesome
@CHURCHISAWESUM5 ай бұрын
Seconded!
@lucasborio48806 ай бұрын
Go Game Dev tutorial series would be really appreciated!
@pixobit58826 ай бұрын
I'd love to see a tutorial series for developing games with go!
@brunomello74996 ай бұрын
yes, please! golang game dev with golang would be something I'd definitely watch
@Mikevmaestro6 ай бұрын
I was just thinking about picking up go. Great video!
@FlyingSherlock5 ай бұрын
I am excited about your game tutorials in Go. I love Go
@larsklein5086Ай бұрын
I was about to comment "Oh, I'd be curious to see a go game development tutorial/series" and then I checked your channel and voila there it already is :) Thank you, I will watch this. One remark for the video: I think OOP and inheritance may look useful for game development, but they come at a performance penalty. Almost everything in Java/C#/Python is a pointer to some form of Object on the heap (it's not just a pointer, it also contains a vtable for method resolution, and it's garbage collected). This makes it very easy to create lists of GameObjects (Enemies, PhysicsObjects, Items, etc). But when you iterate through these list, you iterate through pointers, and to actually access the underlying object, you need to follow the pointer. The objects may be scattered around, probably not with a contiguous memory layout. That is very slow. An ECS is based on a different design pattern of entities and components. Entities can have different constellations of components. For example, an enemy can have a pathfinding component, a physics component, an emitting-sound component, etc. The ECS tries to group components in memory, so that when you want to do something with all entities that emit sound, you can iterate through the emitting-sound components efficiently. I have not read up on ECS in Go. If you make a video, or decide to create your own, I'd be curious to watch it.
@abhinavadarsh71506 ай бұрын
Loved the video. I am big fan of golang and its simplicity and performance. Would love to see more video on game dev in golang. Struct embedding is the way of doing inheritance in golang.
@battesonb6 ай бұрын
This is a cool demo! I'm also a fan of the ECS paradigm, but you may have an option that's more similar to your previous flow. Have you come across Go struct emedding? You can do multiple struct embedding if you want to give your structs functionality that matches several interfaces without having to manually implement it several times over. This is still composition instead of inheritance, but that default behaviour is very useful.
@codingwithsphere6 ай бұрын
Yes I love struct embedding ! Im using it in this project too
@tubbystubby6 ай бұрын
Would love to see a game dev series in go with raylib.
@voidnatta6 ай бұрын
as someone that want to try Go in the future, this video is really inspiring!
@nomadtrails3 ай бұрын
I'd love the tutorial series, definitely! I am falling in love with Golang, and getting started with game dev in general. Protip, I think your ECS may do well to make heavy use of interfaces!
@jakepsy6 ай бұрын
This is great! Subbed for more go content. Thank you for your contribution!
@dr4ghs6 ай бұрын
Ok, now you got me convinced to use Go for some projects. Known about Raylib while playing with the Odin language, didn't know about the Go bindings.
@derekdamko4 ай бұрын
Yes please! I have been using Go building API servers but I just diving into game dev and I have always thought that Go is a perfect fit for game dev.
@UnhingedNW2 ай бұрын
Awesome video! I am wanting to learn Go and I was thinking of making a game because they have so many elements as well as not a lot of support, requiring me to think a little more lol.
@bionic_batman6 ай бұрын
While Go does not have inheritance (which is imo a plus) there is a feature called struct embedding which can be used instead. If you are familiar with debates about inheritance vs composition, Go's approach to solving this is to only allow composition and completely drop support for inheritance
@misalambasta6 ай бұрын
Waiting for GoLang Game dev tutorial series. Subscribed🎉
@blindgoofball6 ай бұрын
I think it's really interesting that you are able to develop a game in go. It was something I looked into briefly, but it didn't really seem possible. Nice job!
@nexovec3 ай бұрын
You're in a really similar place as I am, so I will definitely watch your ebitengine adventures! 👍
@soupnoodles6 ай бұрын
Whoa this was a really high quality video. I sincerely hope it goes viral! Golang definitely seems like something I'd like to give a * go * (badum tss) someday, and coming from a Python background it should be a gentle transition hopefully The game was really neat too, I'd love to see you develop more games
@cempack6 ай бұрын
Definitely do it, it would be awesome!
@scottwilliams19026 ай бұрын
Great video. More people should be using Go for games. I played around with game programming with Go for a while. Go is great because it is so immediate. You can just get on with the job. In the end I went with Odin for it's speed and flexibility. Also Odin has Raylib built-in. Go allows inheritance type programming using composition. Also you can perform dynamic dispatch with interfaces.
@sweetbabyalaska3 ай бұрын
Ebiten engine and Pixel are pretty great Go game dev libraries. I like Go a lot for how simple it is, its really great for most things.
@batlin6 ай бұрын
Short and sweet, thanks for that! I also found Go quite idiosyncratic and a bit gauche. But I do like the fast compile times and general practicality of it. You might also like Nim which is a bit cleaner and more concise than Go, although it has some rough edges too. Crystal is another language worth trying out; more OO-ish than Nim (although I don't use OO and especially inheritance as much these days), but much slower to compile than both Nim and Go.
@dqrk06 ай бұрын
yes, we want a game development series, this video was very enjoyable!
@boonytoons79684 ай бұрын
The only reason I found your channel and video is since I am trying to makes games in Golang. So please make more :D
@hemarkable5 ай бұрын
Yep, I'd vote for raylib-go tutorial series as well!
@andre-le-bone-aparte4 ай бұрын
@08:45 - YES - GoLang tutorial and starter series of us coming over from Python and C#
@zelinzky8026 ай бұрын
I really don’t miss inheritance. You can achieve similar things by the use of composition, embed classes within another. If you have a sprite class and you need your player to be a sprite embed the sprite class within player. Composition > inheritance.
@jefferymuter46596 ай бұрын
I have a small Go blog. Also organize for a local DevOps group. I'm making an AR game like Pokemon Go, in Golang, where game objects are bound by long/lat, and I'm doing it in all text so you can play from the terminal. Anyways, maybe we should make a Discord for golang game devs and try to organize a Game Jam? Seems like there's some genuine interest. Gotta start making a community for this.
@codingwithsphere6 ай бұрын
I would love to join one !
@BerlinSantos3 ай бұрын
Go relies on composition instead of inheritance, which I believe is more powerful. You can compose a super struct using smaller structs as components, each with its own logic.
@dragoneatery6 ай бұрын
I would certainly like some Go game development resources. That sounds great.
@andriip16676 ай бұрын
Yay fellow Golang gamedev enjoyer! Btw i noticed that most of the gamedev community is on the ebiten side
@shpleemcgert6 ай бұрын
Damn you’re nuts. I started trying to make a graphics pipeline in Go and got unmotivated by the verbosity. You’re a better man than me.
@flamendless6 ай бұрын
Agree. When i open my neovim for a go project, lsp is instant.. unlike in a rust project, i have to wait for a while.
@jam_47696 ай бұрын
thats really dope, i also considered golang for game dev, tho I went with unity and c# even tho I don't know any Microsoft lang.
@sebastianmocanu63994 ай бұрын
Brother, I found your channel because I looked for Game dev in Go and couldn't find anything ; Please do make that course, it would be great :D
@inhies25606 ай бұрын
Ebitengine gets my vote. Using bindings in Go ruins one of its best features: super-simple cross platform compatibility. Also ebitengine is really great. I’ll also second another commenter and say don’t make a tutorial series but show how you do common things like collision systems or your ECS implementation etc.
@lyou__y_t4 ай бұрын
Great! I have tried raylib in C. But it was difficult for me...
@kylekettler6 ай бұрын
Would love to see some Go game dev tutorials!
@runner9896 ай бұрын
I would really like an Ebitengine series. Never heard of it until this video.
@tineocedric6 ай бұрын
yes yes yes go games tutorials in ebiten or raylib... please !
@proofofze6 ай бұрын
I would love to see something in Ebitengine! I myself am also going to take a look at it and start building with it. Btw, nice video :)
@kreed14156 ай бұрын
Ebiten is cool but very limited and the development is reliant on basically one person. It can't support 3D in any way unfortunately.
@proofofze6 ай бұрын
@@kreed1415 I don't think it will ever support it. It aims for 2D only and that's ok
@freedomextremist79216 ай бұрын
It doesn't have inheritance but you use composition to archive similar results.
@dj.yacine6 ай бұрын
Great game 😁
@aldanasjuan6 ай бұрын
I know you said it's good for small games but I think it'd be cool to see some benchmarking, like how many bullets can it handle or those kind of things. Maybe it's not that bad as we think. Props for going into go for gamedev.
@codingwithsphere6 ай бұрын
Golang is actually really fast. There are a couple benchmarks on youtube already that compare it to C's performance for gamedev
@oglothenerd6 ай бұрын
I love the colors of your game. Are you using a specific color scheme?
@meida_oficial6 ай бұрын
Finally, someone making games with go
@Mraeth8n4 ай бұрын
Nice video, I will try Raylib with Go for my next game! What color theme are you using there? Looks rly nice
@runaway096 ай бұрын
Need the tutorial series!
@tyreldelaney6 ай бұрын
I'd be interested in watching a go series on gamedev
@NicolaasvanderMerwe6 ай бұрын
Yes please! Golang gamedev series❤
@preprmint6 ай бұрын
its kinda insane how underused go is for games
@faurametalhead6 ай бұрын
I've never programmed any games. But I'm interested in making a 2D game in Go. But as I've never done it and as I'm alone (I don't have an artist or composer for soundtracks), it's not just a matter of learning a Go library (like Raylib go), I wanted to know what I need to know to be able to make my own complete game besides programming in Go and using something like raylib? What are all the programs you use? (Both for making the pixel arts of the characters, both for the levels). This answer will help me a lot to get started, thank you very much for the influence
@petertest-c7b6 ай бұрын
8:45 Yes please!
@irishbruse6 ай бұрын
You should check out LDtk for your level creation instead of tiled
@DemmyDemon2 ай бұрын
@alcb13106 ай бұрын
Will be expecting the Gola g Game Dev Turorial
@HassanMohamed-dc3tt6 ай бұрын
Hello can you please make a video about making games in terms of structure and organization techniques or architecture like ECS and OOP
@r.g.thesecond6 ай бұрын
I'm doing something similar, though I'm doing a 3D game. I'm also a Go newbie so yeah, KZbin recommendations is creeping me out again. raylib is indeed cool, but as someone more used to pure OpenGL it was a bit awkward to get started. A few opinions regarding go: - Oh my god, CGO is a PITA. Doing C/C++ under Windows using MinGW is already prone to breaking, and now add this to the mix... The ONLY reason I chose raylib over what I already knew was because the bindings let you use a DLL instead of compiling and linking it. - Very closely related to above, no SQLite in standard library. I don't like using OS filesystem calls, so SQLite was my crutch. There are bindings but I don't want CGO. - delve debugger gives me an odd vibe. I'll keep using it and GDB on-and-off but I reckon I might have to use it more if GDB starts misbehaving (common under Windows) Looking forward to your release BTW.
@NeekOW24 ай бұрын
I think you can skip the enforced error handling with an underscore. Such as: player, _ := makePlayer() Of course that is probably not recommended, which is why error handling is a first class feature in Go for security purposes, but I figured I'd throw that out there.
@alejandrocarvantes47424 ай бұрын
yes! game dev tutorial on go!
@zZGzHD6 ай бұрын
I love Go! It's makes my Cnile brain happy.
@arijitgogoi5653Ай бұрын
A raylib go tutorial would be great bro
@dozn6 ай бұрын
Definitely Ebitengine, that's what pretty much all released Go games are using, and the main developer is an absolute machine.
@Vasrias6 ай бұрын
I briefly looked into game dev with Go, but didn't find good resources. Would be cool to see a tutorial from you.
@nerdobject53513 ай бұрын
On Inheritance - I can’t speak for game development but inheritance in the full stack, SaaS, CRUD app world is on the way out. The reason for this inheritance is a trap. It tightly couples your application by its nature and sounds nice in a small 1k-10k line appl. But many companies are finding out this just isn’t scaling and become a tangled mess once you get in the 100k-1m line sized code bases. Thought you might find that interesting since you mentioned still being in school. Your going to kill it once your done.
@exvimmer6 ай бұрын
In my opinion, Go's best feature is its error handling. I think all new programming languages should start treating errors as values. By the way, Go doesn't have a tuple type, it just returns multiple values like a tuple. If you want to make tutorials, I think Go + raylib would have more educational value. Thanks for this great video. I just subscribed.
@codingwithsphere6 ай бұрын
Thanks for the response ! I hold go's error handling to high standards because I recently picked up Rust. Compared to most other languages, I much prefer it. It seems like a majority of the comments are requesting the tutorial series be on ebitengine rather than go + raylib, but I'm going to wait and see what the consensus is.
@alexandrecosta25676 ай бұрын
I've been thinking about developing in golang, game dev tutorials would be really handy!! Erase the first con of golang game dev
@felfar1976 ай бұрын
I'd watch the tutorial series!
@tokisuno4 ай бұрын
super cool!
@Palessan696 ай бұрын
I am learning GO and i want to use it to move my XNA game into it if possible. I think i will try this.
@hanna83996 ай бұрын
Really cool demo! Btw., which app were you using to edit the graphics and creating the scene? (I meant the window shown at 5:39)
@codingwithsphere6 ай бұрын
www.mapeditor.org/
@hanna83996 ай бұрын
@@codingwithsphere Thanks a lot bro!
@otsolattu4 ай бұрын
Please make the tutorial series!!
@oglothenerd6 ай бұрын
Personally, I hate the Go Programming Language... but... it is Turing Complete, so I love seeing cool projects made in it. Good work!
@dannyhunn60252 ай бұрын
YES!!!!!!!!!!!!!!!! YES!!!!!!!!!!!!!!!!
@annunzarizzle6 ай бұрын
Interested in how to get a Ebitengine project off the ground.
@UmeshSavaliya-kd4yr6 ай бұрын
Great video
@kreed14156 ай бұрын
So I'm in a very similar boat to you. The one thing that prevents me from getting involved with gamedev in Go is the fact that porting to console is either not possible or a huge pain. There is a game engine called Ebiten that has shipped Nintendo Switch games, however it's a custom system only for that engine and it supports only 2D with no shaders. If you happen to know that there is a solution to this, I would love to see it.
@codingwithsphere6 ай бұрын
ebitengine is fully cross platform for desktop, mobile, and the switch. It also does support shaders and 3d (even if it doesn't advertise it).
@Godot-Game-Dev6 ай бұрын
Very cool!
@gargantooga6 ай бұрын
yes, please :)
@nonefvnfvnjnjnjevjenjvonej33846 ай бұрын
what about null pointer exceptions? isnt that a big problem when you are making games?
@ahmedabuharthieh5796 ай бұрын
Can you explain how you integrated the Tiled software with your game? My approach in c was just to read and parse the file manually which was a bit tedious.
@codingwithsphere6 ай бұрын
Tiled comes with an export to JSON option. Golang has a very simple json serialization system built into the standard library, so I decided to go that route
@ShaneCurtis-nl2ev5 ай бұрын
I find the documentation for raylib with go so you end up jhaving to read a ton of c++ and mentally convert it
@seyproductions6 ай бұрын
procedural programming let's go
@spodarman38236 ай бұрын
what do you think about the pixel game library in go compared to ebitengine?
@jvf8906 ай бұрын
The only problem with Go is the CGO performance... so if your game need to manage a lot calls to ABI is just not work very well... but of course it depends of the kind of game...
@urits37196 ай бұрын
Nice! btw, what vscode theme is this?
@zachend27506 ай бұрын
Yeah I love go but yeah it doesn't have prototyping but that stuff is hard to read anyways. Please make more videos on go
@bonaoenchelchaАй бұрын
Can you tell us wich tools did you use.
@gv135114 ай бұрын
Are the MonoGame tutorial series going to continue?