How to Code (almost) Any Feature

preview_player
Показать описание
There's a basic process that you'll need to use to code most things, but it's rarely taught. It comes down to breaking down the complex feature you want into tiny logical chunks until it's almost pseudocode. At that point, you convert it into actual code.

All of the games featured in this video are made by me. Check them out here (all open source):

Wishlist Yawnoc:

Related Videos (if you're using Pygame):
Objects:
Collisions:
Physics:

Background music in this video:
Pokémon Diamond and Pearl: Jubilife City [Lofi Remix] - Glitchxcity

#gamedev #programming #coding
Рекомендации по теме
Комментарии
Автор

I'm a software engineer as that's what I did at uni for my degree however, I hated coding until I started up game dev during my free time, it's because of the instant reward you get from actually seeing your code do something.

McDADDyK
Автор

“Nothing is particularly hard if you divide it into small jobs." -Henry Ford

suspecthalo
Автор

Fundamentally, all programming boils down to transforming one set of data into another set of data. A video game takes controller input data and game resource data and transforms it into pixels and sounds. A programmer carefully constructs a pipeline of transformations.

wessmall
Автор

I agree with that. It seems too many people don't understand that developing a game is also an engineering process and it is important to understand the very fundamentals of this creative solution-finding process.

PhodexGames
Автор

"If you want a coin that disappears when you touch it, one simple way to achieve that, is to just, make a coin that disappears when you touch it. Next question"
"wait wh-"

NickMirambeau
Автор

Divide problems in too smaller problems.

Now this makes perfectly sense, the problem is when you have a problem divided in small parts and the small parts are still confusing.

xeviusUsagi
Автор

This is excellent advice that took me forever to realize on my own. As a novice, I focused too much on the specific contextual action I wanted my character to perform, like "Jump on an enemy", for example. Once I realized I needed to simplify my thinking to "If A collides with B" things became much easier.

Many different actions are basically the same as far as the code is concerned.

ShelbyAQD
Автор

I'm making games in unity for like 3 months now, few hours a day and basically it's amazing that I've discovered it few weeks ago. Just one day something clicked in my brain about developing new features and basically you can do anything as long as you can break it down into smaller logical steps and operations. Great video for people that cannot comprehand how particular features in games actually work underneath. Also, more functionality you know in the game engine, the easier and more 'handy' you can do it but most of the time, limitation is in our mind, not knowledge.

MiszaFoF
Автор

The way I learned this is by simply making things from scratch without Wikipedia or Google. I've made working 3d renderers and physics engines in a very small amount of time just by trying things out and inventing my own theories about how it should work.

Coding is a much better learning process when you do everything yourself, and sadly I don't see that being taught anywhere anymore. We always search the web for answers, but the most personally valuable answer is going to be one drafted yourself, even if it requires improvement or redesign later.

HyperCodec
Автор

this is how i usually code my game.
i don't have good memory about syntax. so I usually breakdown the features that I want to implement then google the basic of the code like how to detect collision, how to move using vector3, how to perform action using specific button, etc

clumsypanda
Автор

I can't fathom how well explained this is. This is literally lesson one I got when I started programming and most classmates were struggling after that because they missed the whole point. Organizing your toughts from ideas to processes to steps is the whole reason pseudocode exists, stopping right before coding. If done properly, you could design the whole program and have someone else code it for you following your steps because of how neatly organized everything can be, and videogame development is simply one of the many scenarios. It's just like creating a cooking recipe: describe it properly and anyone can follow along, and even if you yourself get lost at some point you can just read again and understand it as long as it's written properly.

Belhenix
Автор

Excellent advice! I've been doing programming for decades at this point and I couldn't have said it better myself.

jbkhan
Автор

As a software engineer, I think this is a great introduction to the concepts of development. It can go a lot deeper, but you have to start somewhere, and this is a good place. It begin with an excellent point that isn't obvious to non-developers: the important skills you learn as a developer are not specific to one kind of task or domain, but generally how to model desired behavior with computers in general.

Learning how to break down problems and strategically execute on those tasks is what it's all about. A skilled engineer can go from working on games to websites to databases with only having to spend a small amount of time to understand the specifics of the domain they are working in. It can take some practice to get the most out of a set of tools and APIs, but the hard part is always general problem solving.

Semiotichazey
Автор

You're no longer just a programmer at this point, are truly an artist! You're now simply expressing your ideas into visual form

joshuasim
Автор

1:00 that's actually my way of thinking for solving even irl issues.

InnerEagle
Автор

Excellent video, great to see a more generalised "tutorial" for problem solving. It'd also be cool to get your advice on how to debug or find issues in code if something isn't working as intended.

reshift
Автор

My goal is to never look up something basic more than twice. If I'm looking at something for the 2nd time, I make sure to really take a second to make sure I understand it. I don't remember everything forever like this, but it helps me not just rely on looking things up immediately and forces myself to think about things logically to recreate what I can remember.

coolbrotherf
Автор

Very important video. A lot of newbies when they code seem to have difficulties generalizing. That leads them to ask over-specific questions like "how to implement coins?" when really the sort of questions programmers should be asking is "how does this class work?", "what's the syntax for language feature x?", "what's the best way to handle this data type?", etc.

All the concrete problems can be broken down into your language's abstractions :)

olbluelips
Автор

Recently i started doing more code by my self when learning how to make games. This video helped me even more with that

liriani
Автор

Beginner Web Dev here. And this is supposed to be for the first minutes of the video in which he is talking about trying to learn code.
What I do to learn certain things is pretty simple.
1 .Make a little plan: In my Case for example a simple registration with SQL. And Look up what you need.
2. Think in Pseudo-Code how it could look like. (This can be hard for hard beginners I think)
3. Search on what to do but try not to copy it right away. Read it carefully and try to understand it.
4. Try to code it from your memorie as far as you can. you dont have to get far.
5. Look it up again.
In short. Its a basic try and error. If its not working read again, try to understand what is happening.
Then try to code it and when its not working. Try the same again.
I dont know if this applies to certain areas in Game-Dev (cuz im still learning the basics)
but this helps me a lot to memorize certain code structures. for example a simple SQL query.
Sorry for typos and fuckups. Its 6 am and I am typing this on a laptop with an nearly broken keyboard while laying down.

LakayFTW