Learn to Code Asteroids – Lesson 1 – Drawing Vector Graphics

Game



Asteroids is one of my favourite games from the early arcades. It’s great fun to play, but even more fun to code for yourself.

In this beginners level programming course I’ll take you through the complete rebuild of the game using the BBC micro version , Meteors, as a guide. You’ll learn how to model the vector shapes in your code, move and rotate 2D points around the screen and simulate rocket motor thrust and deceleration.

We’ll also learn how to add precise object collision detection where we’ll calculate if two irregular polygons are colliding using the crossing line technique.

The course is suitable for anyone who’s followed my Space Invaders course, or who has a basic understanding of computer programming. We’ll be using TIC 80 as the development system so make sure you check out the first Space Invaders lesson to find out how to get hold of the software.

In this first lesson we’ll get the basic game set up and then work out how to store the vector shape information in an object that we can then pass to our own vector drawing function which will do a full 2D rotation and translation of the shape to render our graphics on the screen.

All the source code is available on the project pages on my website.

Check out my Space Invaders course if you’re new to coding.

Nguồn: https://onvideonews.com/

Xem thêm bài viết khác: https://onvideonews.com/game/

Leave a Reply

Your email address will not be published. Required fields are marked *