Posts for: #Game

Converting a Game Written in Basic to Python - Part III

In this third part, we have the following objectives:

  • Clean up the classes
  • Multiple planes
  • Multiple shots.
  • Generalize the game objects into a superclass
  • Display a score
  • Assign keys to shoot and play again or exit

In the version of Part II, the classes have a lot of repeated code. By analyzing each of them, we can reach a conclusion about a common behavior regarding how to draw and update the objects. A method to remove the object from the game is also used.

Read more

Converting a Game Written in Basic to Python - Part III

In this third part, we have the following objectives:

  • Clean up the classes
  • Multiple planes
  • Multiple shots.
  • Generalize the game objects into a superclass
  • Display a score
  • Assign keys to shoot and play again or exit

In the version of Part II, the classes have a lot of repeated code. By analyzing each of them, we can reach a conclusion about a common behavior regarding how to draw and update the objects. A method to remove the object from the game is also used.

Read more

Converting a Basic Game to Python - Part II

In this second post, we’re going to improve our game.

Although the new version runs in Python, it still looks like an old 80s game. The first thing to fix is the animation. Since we’re using a 280 by 192 point coordinate system to simulate Apple coordinates, we multiply each coordinate by 4 when drawing. To make it look similar to the original Apple, I reduced the number of frames to 8 per second. That’s why the animation looks so jerky! To get it running at 60 frames, we need to multiply the velocities by the ratio between the old and new frame numbers: 8/60. The new version defines some constants for this:

Read more

Converting a Basic Game to Python - Part II

In this second post, we’re going to improve our game.

Although the new version runs in Python, it still looks like an old 80s game. The first thing to fix is the animation. Since we’re using a 280 by 192 point coordinate system to simulate Apple coordinates, we multiply each coordinate by 4 when drawing. To make it look similar to the original Apple, I reduced the number of frames to 8 per second. That’s why the animation looks so jerky! To get it running at 60 frames, we need to multiply the velocities by the ratio between the old and new frame numbers: 8/60. The new version defines some constants for this:

Read more

Converting a Game Written in Basic to Python - Part I

The nostalgia of 80s computers is something I have never stopped feeling. As a child, I was fortunate to use several 8-bit computers, such as the ZX-81, ZX-Spectrum, Apple II, and MSX, or rather, their national clones (TK-85, TK-90X, TK2000), since Brazil was experiencing the era of the Informatics Market Reserve.

In a time when there was no Internet, we spent our time typing programs. A series of books on game programming was published by the Lutécia publishing house in Brazil, but the original American versions were released by Usborne.

Read more

Converting a Game Written in Basic to Python - Part I

The nostalgia of 80s computers is something I have never stopped feeling. As a child, I was fortunate to use several 8-bit computers, such as the ZX-81, ZX-Spectrum, Apple II, and MSX, or rather, their national clones (TK-85, TK-90X, TK2000), since Brazil was experiencing the era of the Informatics Market Reserve.

In a time when there was no Internet, we spent our time typing programs. A series of books on game programming was published by the Lutécia publishing house in Brazil, but the original American versions were released by Usborne.

Read more