This is one part of a multi-part post. To see other posts in the same series, please click below: Part 1 Part 2 Part 3 Part 4 Recently one of my friends asked me if I intended to continue the series “How to Learn Coding,” of which the last part I wrote was one year and a half ago (tbh, I had already forgotten about that series). Well, reading again what I wrote back then, I think I ended the series for good: those lessons that the past me brought up there were all valid, and I don’t believe the today me can bring up any additional critical point.
I hope that by trying removals and changing parameters, you have figured out what these lines of code do: op := &ebiten.DrawImageOptions{} op.GeoM.Translate(-float64(frameWidth)/2, -float64(frameHeight)/2) op.GeoM.Translate(screenWidth/2, screenHeight/2) In case you haven’t, let’s quickly check the Cheatsheet for ebiten.DrawImageOptions type DrawImageOptions struct { // GeoM is a geometry matrix to draw. // The default (zero) value is identify, which draws the image at (0, 0). GeoM GeoM // ColorM is a color matrix to draw.
Last time, we stopped at mentioning that there are three functions needed for the game loop: Update(), Draw() and Layout(), of which all are functions of the Game struct. According to the cheatsheet, the whole Game struct is an instance of the Game interface, as follow: type Game interface { // Update updates a game by one tick. The given argument represents a screen image. Update(screen *Image) error // Draw draw the game screen.
This weekend I decided to start another tutorial series in this blog, as I did learn a lot during making the last one. This time I decided to up the ante by picking up on a language that I am not very familiar with: Go Programming Language, or Golang. If it is the first time you heard of it, Go is a language designed at Google, is syntactically similar to C and is very well-designed to support concurrency.
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part post. To see other posts in the same series, please click below: Part 1 Part 2 Part 3 Part 4 6. Find something you’re interested in and start doing This is an important point: Programming is not about remembering all the little detail about your language of choice, nor it is about reading a lot of books or watching several tutorial videos. It is about mastering some tools so that you can make things you want to make.
This is one part of a multi-part post. To see other posts in the same series, please click below: Part 1 Part 2 Part 3 3. Learn how to learn One of the things that everyone should know but have almost never been taught at school is the skill to acquire knowledge. Instead, we were taught how to pass the exams by cramming into our mind a bunch of cr*p that, most of the time, have no practical values.
A buddy of mine from college just started learning programming in Python, and he told me that it was “very complicated” and there are too many things to remember, which he normally mix up. As someone who just started teaching himself to code a few years ago, I understand the feeling, and for that reason I would like to write this post to share some of my experience. Hopefully it will have the chance to help some of you guys out there, who, like my friend and I, want to learn programming but find it too challenging.