149: Step By Step Perfection.

Take Up Code - Un pódcast de Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes

Categorías:

Knowing where to spend your time and focus will help you finish projects without getting stuck in details. I’m building a 2D side-scroller game and just got the project to the point where the main character can move left, right, and jump on tiles. A game needs a background and tiles form that background by repeating small rectangular images. Some might look like dirt with some grass on top. Some might look like ice. And some can be dangerous with pointy spikes. The game uses these tiles to form the environment that the hero can move around on. They form the ground. Even if some of that ground might look like it’s floating. It’s still a solid surface that the hero can jump up and down on and move left and right. There’s a lot of details so far including some more such as: To simulate falling, the hero will move down on the screen at an increasing rate as soon as the player moves the hero off of a tile and into open space. Jumping should start out fast, then come to a stop at the top and then speed up again as the hero falls. The hero should only be able to jump when currently on a tile. Since this is not a space game, the hero can’t change direction in the air while jumping. But if the hero’s already moving, then that should continue. This leads to a nice curved path when jumping while running. The hero should stop moving left or right when hitting the side of a tile. This is like running into a wall. If the player stops pressing the left or right arrow keys, the hero should come to a gradual stop. The stopping distance should be longer the faster the hero is moving. This is just like how it takes a longer distance to stop a car on a highway and a much shorter distance when driving slowly on a residential street. I like to explain programming through game development because it’s fun. If you can build a game, though, then you can write any kind of software. It doesn’t matter what you’re building, there will be details like these that you need to think about and decide how to handle. I like to take things in steps. So when I started this, I wasn’t thinking about any of these details. I knew that there would be a hero character moving around the screen. But I didn’t worry about all these details at the beginning. Listen to the full episode to learn more about what details I’m working on now and what I’ve ignored so far. You can follow a similar approach to focusing on the most important things at each stage of development. Read further for the full transcript of the episode below. Transcript Attention to detail is critical to programming. You don’t need a lot of math and I’ve said this many times. You do need to understand logic. And you have to watch out for small things that can cause problems later. I thought I’d take a break from distributed computing for a while and talk about a project I’m currently working on and describe where and how I focus my efforts. I’m building a 2D side-scroller game and just got the project to the point where the main character can move left, right, and jump on tiles. A game needs a background and tiles form that background by repeating small rectangular images. Some might look like dirt with some grass on top. Some might look like ice. And some can be dangerous with pointy spikes. The game uses these tiles to form the environment that the hero can move around on. They form the ground. Even if some of that ground might look like it’s floating. It’s still a solid surface that the hero can jump up and down on and move left and right. There’s a lot of details so far including some more such as: ◦ To simulate falling, the hero will move down on the screen at an increasing rate as soon as the player moves the hero off of a tile and into open space. ◦ Jumping should start out fast, then come to a stop at the top and then speed up again as the hero falls. ◦ The hero should only

Visit the podcast's native language site