Code Review, Advice & Finale - 35 - New Beginner 2D Game Programming

preview_player
Показать описание
This is an episode of how you can take your programming to the next level, and how to always continue improving. I go through the code written in this series, and we discuss what was good about it, and what was not so good about it. All of this to help us learn how to become better designers. You'll also hear a bit about my life as a programmer, and why this series was created in the first place!

Comment, PM, or Tweet me for help!

Teaching to understand all subjects to the fullest extent!
Рекомендации по теме
Комментарии
Автор

It may not be the finale everyone wanted, but it's a solid end to the series that sparked my channel. I hope everyone learns at least one thing from this episode - probably the most important episode in this entire series!

CodeNMore
Автор

Your videos on "New Beginner 2D Game Programming" in java has been THE ONLY VIDEO I have come across that thoroughly explains how to create a game... in java. There is no other instructor/video out there that has been able to explain the inner workings of a game as you have. I have viewed many videos on 2D and 3D game programming but all they do is instruct you to write this code here and write this code there without fully explaining why the code is being written. I want to thank you for the work you are doing for the community of game programmers, thank you!!

aromez
Автор

Finnaly! :D I've started and already finished IT university since last episode :V

Menober
Автор

I was checking on my "to watch" videos, found some chapters of this series and end here.
I remember following this series back in time (i don't remember why or when did i stop, life probably). Anyway, I do remember learning a bunch of staff about game developing watching your videos and really liked the way you explained what you where doing.
I will check your new videos in Godot for sure!

pabloroves
Автор

This tutorial series is the reason I passed my gcse coursework, it was the basis of the project. Looking back (now having been a full-time java programmer for two years) there are better ways and newer packages but to a beginner it was incredibly helpful to get me to first learn java and object orinated programming. (Not sure what was said during the video, I haven't watched yet and am just remembering from memory)

kiranbailey-stokes
Автор

Thank you very much for finishing the series and starting the series in the first place. I remember when I was 11, after I got my Java basics down, your series was the one I jumped to first and it was the first project I ever made! This exact series gave me further interest in programming and I've been doing it for 5 years now. When you said that the last episode was 4 years ago, first I thought bullshit, but I actually forgot how damn fast time passes! It passes so fast!

When it comes to the code, I would like to give my 2 cents as well so here goes:
- when it comes to the thread you made at the beginning, I also, whenever I learned something new, liked to use it even if it was unecessary because it felt cool to me. I understand you :)
- I have a question about the static fields you said you shouldn't make such as the one in the assets class. I can see why you would call it bad practices, but at the same time, I can't really think of a time where those fields being static would lead to negative consequences. Are there any examples?
- The entity system is the worst part IMO. Using the hierarchical system becomes a mess really quickly. I made a game as a school project a couple of months ago in C++ using SFML. I knew it will be a very small game so I went for that entity system, but it backfired immediately. For example, I wanted my object class to do the rendering part and contain the Shape, and then every child would pass it's own shape through the super constructor. This already became a mess to me because of the way that Shapes work in SFML and some really weird way that RectangleShape etc. inherit from Shape.. I figured out that every different type of Object would need to specify that it has a certain sub type of Shape so it also had to handle the rendering of it, instead of it being done in a super class. I immediately scrapped and went for a system which consists of Objects, Objects consist of Components and they consist of both data and logic. This is used by Unity aswell and it's a great system. ECS is better, but if you are implementing it from scratch like I was, the Unity-like system was much easier than ECS.
- The state system needs to be talked about as well. I don't really like the idea of a State class that is extended by GameState, MenuState etc. Making an ObjectManager (or EntityManager, whatever) that would just go through all Objects and update them, allows you to use it as a State basically. You would have an EntityManager, you add the Player, TileRenderer etc., and then you could have a variabe like ObjectManager currentState; that you would just update every frame. You would also have a Class such as EntityFactory which would just contain static functions that create an entity, add certain components to it and return it, for example, createPlayer() etc.
- The GameState containing the World containing the EntityManager is kinda weird. Shouldn't the GameState contain an EntityManager that would contain a World or something like that as an Entity and it would render tiles for example, while the player would be outside the World class and inside the EntityManager. That would obviously require some changes, but the hierarchy here is just weird to me.

I hope that wall wasn't too long and that I wrote it as clear as possible, my writing skills are shit and those are just my opinions on how things should've been handled.
Also, don't worry when you say: "I hope I didn't bash my code too hard so you think that watching it was a waste of time." It definitely was not. So many new programmers like me back in the day, didn't know what kind of project to make and just opted for making some sort of game first. While your code may not have best practices, it still allowed thousands of us to create a project that we were happy about and that we could expand to make a different game than yours. The reason this series wasn't a waste is because atleast in my opinion, a lot of us used it as a learning experience to basic programming rather than looking for an exact way to make a game. Let's be honest, nobody will go and create a title using pure Java with Canvas, most people would use a Game Engine in which most of the bad practices here would be lost because they would use something that handles the low level stuff for them!

PROJECTJoza
Автор

This really made my day, because this was a satisfying ending to the project, almost even had me emotional at the end. Haha, thanks for all of this

kathdial
Автор

Thanks, mate. this is the first series that I managed to finish and understand everything, Danke

bewaryoftherabbithole
Автор

I'm sad that this series is ending.
I had started to watch it this year June and had just completed watching episode 34 two days ago.
I just wish you could teach me some more concepts of Java game development.

BornMiner
Автор

This was the basis of me learning java in the first place and i was able to apply it to various projects, I built a few basic games and even a way to pass in an rgb pixel image to create my tile gsme rather than storing ids in an array but had a hard time justifying putting all the work in creating all these classes when you have a thorough system like unity that does all that for you and lets you focus on actually making the game itself...i never really got into unity either unfortunately but still...thanks fir putting the work in and I'd love to see some stuff you need with your skills. 👍

netfusionuk
Автор

Thank you so much for this series.
It really helped me.
More grease to your elbows.

ogunrindedaniel
Автор

Thank you very much for this series, I really learned a lot!

juandebenedetti
Автор

I was about to finish this series and you just uploaded the final episode! This series really helped me break out from tutorial purgatory.
It's good to see you're uploading again! Keep it up. You make quality content and the views will come back soon.

Curt_Johnston
Автор

broooo
You are super great person, I learned a lot from this series and it's super cool and I wish you complete it and if not please make another series like this one but more advanced.
the second thing is that I wanna ask you if it's possible to take your game and teach it to my student, if your answer is yes please tell me and thank you again.

omarmajdi
Автор

This episode felt so much like a graduation day

birbylikesfox
Автор

Hey, first I wanna say that this series was amazing and taught me a lot about game programming. I'm a beginner to programming (started learning it like a few months ago) but I've always been into technology and games my entire life. That being said, I already knew most of the basics (actual basics) of the Java language coming into this series and although I can understand most of the code from the tutorials quite well, I don't know how to come up with code like this on my own. I'll try to look into the game jams that you mentioned in the video but I'd appreciate it if someone can give me some tips about what to do in the future. I want to create a game of my own (for academic purposes) and write the code by myself without just following other tutorials but I am unable to do it. For some reason, I can understand the code well but I just can't write them myself. I'm not sure if I'm supposed to find other sources that teach game programming specifically or what, but if anyone could give me some sort of tip so that I can become a better designer and create my own game without having to rely on others, I would very much appreciate it.

vurix
Автор

Thank you so much for giving it an end! I learned a lot from you! :)

nonami
Автор

Wow its been a long time
i'm actually creating a game based on your code
nice to see you back

akremevolution
Автор

Well I appreciate you finishing the series. I just started watching it so atleast I wont have to wait to watch it all.

mikemikel
Автор

Thanks for the wrap-up. You are awesome.

alexshiny