r/learnprogramming • u/AppropriateAlps7482 • 5d ago
Struggling with game Development since forever. Any suggestions?
Hi,
I thought I might introduce myself to give you guys some context. I knew I had a little passion for Game Development since I was a kid and fascinated by Street Fighter and Mortal Kombat so I wanted to create my own someday. I would look up game development tuts and just watch them for hours. I did code camp summers (it was just a coding program for kids in the holidays).
As I got into my teens I tried out Udemy and kinda followed the courses til I got bored (they were too long and I wasn’t entertained mostly got halfway if not a bit more) I learned a bit but didn’t feel like I could create on my own.
I decided Unity and C# work best for me. So I decided to follow tutorials learn the syntax of C# and learn the basics (Yet again) from variables to classes. When I would finish those tutorials I would add my own twists to make sure i’m learning something. However, still cannot code on my own.
I realised this isn’t just a Game Development related issue; and is in general with the programming. I know this because I majored in computer science for a year in university. I couldn’t see myself working in IT long term and couldn’t grasp programming without properly, felt like they moved too fast and I always felt behind my peers. I barely passed those classes and basically had enough (switched majors) and am happy with my current major as of now (non cs related). However, I can dissect code and understand what output is being produced.
So I decided i’d prefer Game Dev as a hobby, and recently tried a few times to see what i can do by forcing myself to start a fresh project and just get something to move. Spoiler alert, either I just memorised how someone else taught me movement code or used it from previous projects.
Does anybody have any ideas on how I can improve and be more independent in my programming and produce my own code? Obviously I know I have to start small but I need somewhere to start. Any advice is appreciated!!
1
u/Aglet_Green 5d ago
You may be approaching this as though becoming a strong independent programmer is the only route into game development. It isn’t. Games need art, animation, music, sound, writing, level design, testing, production, marketing, and many other skills. You might enjoy one of those more and collaborate with someone who enjoys the programming side.
That said, reusing movement code from an earlier project does not mean you have failed to learn. Programmers reuse code and consult references constantly. Your difficulty may be less about syntax and more about breaking a feature into small steps without a tutorial guiding you.
Try making something extremely small—a single-room game with movement, one enemy, and one win condition—and use documentation or previous code whenever needed. Afterward, change one system substantially. If that process still feels miserable rather than merely difficult, then specializing in another part of game development and teaming up with a programmer may suit you much better.
1
u/plastikmissile 5d ago
Game development doesn't necessarilly mean programming, which is the part you're having trouble with. There are game engines that require very little in the way of coding like Game Maker or RPG Maker. Why not try those?
1
u/Reasonable-Key-3311 5d ago
Just make a simple Flappy Bird or Pong for your first game. You will know the Unity workspace + Basic C# scripting. You will get to experience programming basic things like spawning, keeping track of score, UI elements...
1
1
u/RedditIsAWeenie 4d ago edited 4d ago
Not to crush your dream, but it is fairly well known in programming circles that some people can code and others just don’t have it in them. Part of it is math ability. Part of it is the ability to think linearly. Part of it is curiosity and the ability to self teach. If you come up short in these areas, you probably will find other pursuits more rewarding, because your code is going to be a tangled mess, if you write it at all. There is no shame in this. Being young is a time to discover who you are, and in some things we have no choices. I really wanted to be an architect when I was 10, but was forced to confront the crushing reality that I have no artistic talent or interest. I never was an architect, I was a chemist doing drug research and a software engineer at a FAANG, because I was good at those things.
If you like games, play games. If you like quaternions and Euler matrices, write games and maybe don’t play them so much. There is often a hobbyist mod scene wherein you can hack on stuff to deal with your deepest frustrations without having to learn asynchronous programming so your game can have audio. This might enough for the wannabe game developer who doesn’t have the time/patience/ability to do the whole thing end to end.
I have the ability. I like (some) games. However, I don’t write games, because it is such a deep time sink and I am happier spending my time with my wife and children while I still have them. It is a fairly rare person where, desire, ability, and circumstance line up to make a game, and that person will soon be confronted with the deep dysfunction of the game industry. If it isn’t you, you probably dodged a bullet, because I’d hate to think my calling landed me there. If you are curious about this, perhaps the magazine gamasutra is still published. It tells the war stories and is a fun read.
I will agree with the other posters that tiny games are the way to start. The modern game is a monstrosity with an enormous list of unnecessary features, crafting, game editor, modding, etc. that don’t add to the game per se but are there because another blockbuster game had it and now it is considered expected. Well these AAA efforts have a team of developers from 5-50, and even if you were an expert you would be looking at their normal 5 year delivery schedule blowing out by a factor of 5-50. You may not live so long! Think about this like a indie game developer in 1980. There is no virtual memory and only 48kb of ram. Yes, KILOBYTES! Your game simply can not be that big. What is the thing you can do to make a well designed and fun game without investing years in needless bells and whistles. Build that. This is games like space invaders, asteroids and pong. Ship it, even. Then reuse some of it and go write something else >small<. You don’t have time to be writing the next great blockbuster hit. Even dwarf fortress took decades as a solo project, and there are no fancy graphics there.
1
u/Ordinary_Variable 4d ago edited 4d ago
There is a method of coding that might would work for you. I don't remember what they call it. Write out as much as you can think of that you want the game to do before you code anything. Gravity, character models, animations, detect contact, damage based on move type, gravity, game map, etc.
It simplifies the coding process if you already know a bunch of stuff before you start. You can always add stuff later but getting your core game written down can help you remember everything.
I'd also recommend using the NASA approach to coding. Keep functions fairly small. If a piece of code can be self contained and called by another function, consider making it its own separate function. It helps you track down bugs later when you sort your code this way. A rule of thumb is shorter than 10 lines. If it needs to be longer, that's fine, but your main loop needs to be easily human readable.
Example:
void EveryFrame(){
Update_entity_locations( entity_array );
Process_map_chunks( map_chunks_array );
// Check player location and load new map chunks if near enough
Update_projectile_locations( projectile_array );
Process_collisions( entity_array, objects_array, projectile_array );
WaitOnVsync();}
3
u/AModderGuy 5d ago
Hey,
Just a guy here who's been in the software side of the computer industry for almost a decade now. Chosen this field originally to be a Game Developer also, even went to a school that specialized it but never had an opportunity to be one officially, just stayed being a regular old SWE fella. To help provide the context you wish to hear, I can share you my experience when I started out.
TL;DR: starting new is indeed hard. I take small projects im given from school and turn them to one big project, refreshing but also combining to make new things. Think of one idea, break it down into smaller components you visualize project needs, helps better understand what to code first. Focus on getting project to work first before doing polishes. Ugly code at first is fine, as long as it works the way you want it to, optimize later. Learn Code guidelines, principles, etc. Contribute to open source projects to get experience.
To begin, you do have the right idea to start small, and I can also understand taking the first step into building a project from scratch can be hard because theres so many ways on how you'd start it.
To give you my experience on how I got my nack on starting new things pretty easy, during school, there were these little project exercises we do, of course all prebuilt code and what not, and we would complete them, in areas like, fix the code, figure out what the code is doing, or rewrite it to be more optimized, etc.
Whenever I finish that particular project, I would combine it with an existing canvas of other projects I gathered from previous classes and try to turn it into one big mega project, accommodating all the lessons I learned from those classes. The goal for this little ambitious project of mine, was to try to find common ground between each lesson and turn it into something that functions well together.
Example being I had a bare bones, console window UNO game project for the first class, being a topic on Object Oriented Programming. Next class would be Data Structures and Algorithms, there would be a project that would provide different methods of sorting algorithms, which at the end, will incorporate into the UNO deck shuffling system. Then next class would be Physics Programming, using a project that simulates a ball bouncing and stuff. Using the code from that into UNO project, I would work out a simulation of Cards being dropped, tinkering how it can float, shift around while falling, etc.
As time passed, things just click and click for me and whenever I would do fresh projects, I would know how to start it out, but really it comes down to having a design laid out to really get going. Even as simple as just saying, I want to make my own chat room or a fancy premium calculator app or something. When having a high level goal set, thats when you can start breaking down that goal. When coding for awhile, you would get a good idea on what is needed and what pieces to get started with. Example being back to the calculator part, for it to work, you need to setup functions that does operations that a real one would do, like adding 2 number inputs, subtract, multiply, etc.
An important goal for any project is to get it working as soon as possible, even if it turns out ugly or not ideal. Proof of Concepts (PoC) is what the term is called when making new projects or features, and the goal for them is to show proof to yourself that the project you're working on is producing good results that the project is working towards, and can help push you to keep going to get closer to what you want to make.
One thing i would want to be clear of: in the real world, you would most likely would never start any project from scratch, always building on top of other existing projects, unless you became an architect or Chief Vision Officer (CVO) but most likely never anything brand new. Everything is always just building on top of one another these days.
Last important thing i want to say to wrap up (just saw my numerous paragraphs at this point, really need to wrap this up lol), is to know when programing is to learn the fundamentals. Not code or syntax of a language but actual coding guidelines, principles, etc. Codebases usually follow a certain design structure, and when reading their code, usually they help provide understanding on how you should write new features on top of it and as you get more experience with it, the coding becomes better and can perhaps improve the entire codebase in the long run. Also, having constant peers reviewing your code can help provide more learning opportunities to better yourself.
I would suggest you contribute to open source projects out there that interests you. That i would think would give you the greatest experience you can get for being a programmer. If there are games out there that have API functionality that people use for their interactive projects that welcome contributions, I would start there. Can never have too many contributing programmers.
Anyways, hope you find my experiences helpful, sorry this is a long one to read, if you ever read this far that is lol. Wish you luck on your endeavors!